gpt4 book ai didi

org.eclipse.persistence.oxm.mappings.XMLBinaryDataMapping.getAttributeClassification()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 08:18:40 26 4
gpt4 key购买 nike

本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLBinaryDataMapping.getAttributeClassification()方法的一些代码示例,展示了XMLBinaryDataMapping.getAttributeClassification()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLBinaryDataMapping.getAttributeClassification()方法的具体详情如下:
包路径:org.eclipse.persistence.oxm.mappings.XMLBinaryDataMapping
类名称:XMLBinaryDataMapping
方法名:getAttributeClassification

XMLBinaryDataMapping.getAttributeClassification介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Handle swaRef and inline attribute cases.
 */
public void attribute(UnmarshalRecord unmarshalRecord, String URI, String localName, String value) {
  unmarshalRecord.removeNullCapableValue(this);
  XMLField xmlField = (XMLField) xmlBinaryDataMapping.getField();
  XPathFragment lastFragment = xmlField.getLastXPathFragment();
  
  Object fieldValue = null;
  if (xmlBinaryDataMapping.isSwaRef()) {
    if (unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller() != null) {
      if (xmlBinaryDataMapping.getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
        fieldValue = unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller().getAttachmentAsDataHandler(value);
      } else {
        fieldValue = unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller().getAttachmentAsByteArray(value);
      }
      xmlBinaryDataMapping.setAttributeValueInObject(unmarshalRecord.getCurrentObject(), XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(fieldValue, xmlBinaryDataMapping.getAttributeClassification(), unmarshalRecord.getSession()));
    }
  } else {
    // value should be base64 binary string
    fieldValue = ((XMLConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager()).convertSchemaBase64ToByteArray(value);
    xmlBinaryDataMapping.setAttributeValueInObject(unmarshalRecord.getCurrentObject(), XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(fieldValue, xmlBinaryDataMapping.getAttributeClassification(), unmarshalRecord.getSession()));
  }
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
      value = marshaller.getAttachmentMarshaller().addSwaRefAttachment((DataHandler) attributeValue);
    } else {
    throw XMLMarshalException.invalidSwaRefAttribute(getAttributeClassification().getName());
if ((getAttributeClassification() == ClassConstants.ABYTE) || (getAttributeClassification() == ClassConstants.APBYTE)) {
  if (getAttributeClassification() == ClassConstants.ABYTE) {
    attributeValue = ((XMLConversionManager) session.getDatasourcePlatform().getConversionManager()).convertObject(attributeValue, ClassConstants.APBYTE);
} else if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
  if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
    c_id = marshaller.getAttachmentMarshaller().addSwaRefAttachment((DataHandler) attributeValue);
  } else {
if ((getAttributeClassification() == ClassConstants.ABYTE) || (getAttributeClassification() == ClassConstants.APBYTE)) {
  record.put(textField, attributeValue);
} else {

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

if (value instanceof String) {
  if (this.isSwaRef() && (unmarshaller.getAttachmentUnmarshaller() != null)) {
    if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
      fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsDataHandler((String) value);
    } else {
    String includeValue = (String) record.get(field);
    if (includeValue != null) {
      if ((getAttributeClassification() == ClassConstants.ABYTE) || (getAttributeClassification() == ClassConstants.APBYTE)) {
        fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsByteArray(includeValue);
      } else {
attributeValue = XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(attributeValue, getAttributeClassification(), executionSession, null);

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
      value = marshaller.getAttachmentMarshaller().addSwaRefAttachment((DataHandler) attributeValue);
    } else {
    throw XMLMarshalException.invalidSwaRefAttribute(getAttributeClassification().getName());
if ((getAttributeClassification() == ClassConstants.ABYTE) || (getAttributeClassification() == ClassConstants.APBYTE)) {
  if (getAttributeClassification() == ClassConstants.ABYTE) {
    attributeValue = ((XMLConversionManager) session.getDatasourcePlatform().getConversionManager()).convertObject(attributeValue, ClassConstants.APBYTE);
} else if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
  if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
    c_id = marshaller.getAttachmentMarshaller().addSwaRefAttachment((DataHandler) attributeValue);
  } else {
if ((getAttributeClassification() == ClassConstants.ABYTE) || (getAttributeClassification() == ClassConstants.APBYTE)) {
  record.put(textField, attributeValue);
} else {

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if (value instanceof String) {
  if (this.isSwaRef() && (unmarshaller.getAttachmentUnmarshaller() != null)) {
    if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
      fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsDataHandler((String) value);
    } else {
    String includeValue = (String) record.get(field);
    if (includeValue != null) {
      if ((getAttributeClassification() == ClassConstants.ABYTE) || (getAttributeClassification() == ClassConstants.APBYTE)) {
        fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsByteArray(includeValue);
      } else {
attributeValue = XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(attributeValue, getAttributeClassification(), executionSession);

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

if (value instanceof String) {
  if (this.isSwaRef() && (unmarshaller.getAttachmentUnmarshaller() != null)) {
    if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
      fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsDataHandler((String) value);
    } else {
    String includeValue = (String) record.get(field);
    if (includeValue != null) {
      if ((getAttributeClassification() == ClassConstants.ABYTE) || (getAttributeClassification() == ClassConstants.APBYTE)) {
        fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsByteArray(includeValue);
      } else {
attributeValue = XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(attributeValue, getAttributeClassification(), executionSession, null);

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
      value = marshaller.getAttachmentMarshaller().addSwaRefAttachment((DataHandler) attributeValue);
    } else {
    throw XMLMarshalException.invalidSwaRefAttribute(getAttributeClassification().getName());
if ((getAttributeClassification() == ClassConstants.ABYTE) || (getAttributeClassification() == ClassConstants.APBYTE)) {
  if (getAttributeClassification() == ClassConstants.ABYTE) {
    attributeValue = ((XMLConversionManager) session.getDatasourcePlatform().getConversionManager()).convertObject(attributeValue, ClassConstants.APBYTE);
} else if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
  if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
    c_id = marshaller.getAttachmentMarshaller().addSwaRefAttachment((DataHandler) attributeValue);
  } else {
if ((getAttributeClassification() == ClassConstants.ABYTE) || (getAttributeClassification() == ClassConstants.APBYTE)) {
  record.put(textField, attributeValue);
} else {

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if (xmlBinaryDataMapping.isSwaRef() && (marshaller.getAttachmentMarshaller() != null)) {
  if (xmlBinaryDataMapping.getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
    c_id = marshaller.getAttachmentMarshaller().addSwaRefAttachment((DataHandler) objectValue);
    if(c_id == null) {
    bytes = (byte[]) objectValue;
    c_id = marshaller.getAttachmentMarshaller().addMtomAttachment(bytes, 0, bytes.length, this.xmlBinaryDataMapping.getMimeType(object), lastFrag.getLocalName(), lastFrag.getNamespaceURI());
  } else if (xmlBinaryDataMapping.getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
    c_id = marshaller.getAttachmentMarshaller().addMtomAttachment((DataHandler) objectValue, lastFrag.getLocalName(), lastFrag.getNamespaceURI());
    if(c_id == null) {

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com