本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLBinaryDataMapping.isSwaRef()
方法的一些代码示例,展示了XMLBinaryDataMapping.isSwaRef()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLBinaryDataMapping.isSwaRef()
方法的具体详情如下:
包路径:org.eclipse.persistence.oxm.mappings.XMLBinaryDataMapping
类名称:XMLBinaryDataMapping
方法名:isSwaRef
暂无
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if (mapping.isSwaRef()) {
schemaTypeString = getSchemaTypeString(XMLConstants.SWA_REF_QNAME, workingSchema);
} else {
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
XMLUnmarshaller unmarshaller = ((XMLRecord) row).getUnmarshaller();
if (value instanceof String) {
if (this.isSwaRef() && (unmarshaller.getAttachmentUnmarshaller() != null)) {
if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsDataHandler((String) value);
fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsByteArray((String) value);
} else if (!this.isSwaRef()) {
if ((unmarshaller.getAttachmentUnmarshaller() != null) && unmarshaller.getAttachmentUnmarshaller().isXOPPackage() && !this.isSwaRef() && !this.shouldInlineBinaryData()) {
} else if ((unmarshaller.getAttachmentUnmarshaller() != null) && isSwaRef()) {
String refValue = (String) record.get(XMLConstants.TEXT);
if (refValue != null) {
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
XMLUnmarshaller unmarshaller = ((XMLRecord) row).getUnmarshaller();
if (value instanceof String) {
if (this.isSwaRef() && (unmarshaller.getAttachmentUnmarshaller() != null)) {
if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsDataHandler((String) value);
fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsByteArray((String) value);
} else if (!this.isSwaRef()) {
record.setSession(executionSession);
if ((unmarshaller.getAttachmentUnmarshaller() != null) && unmarshaller.getAttachmentUnmarshaller().isXOPPackage() && !this.isSwaRef() && !this.shouldInlineBinaryData()) {
} else if ((unmarshaller.getAttachmentUnmarshaller() != null) && isSwaRef()) {
String refValue = (String) record.get(XMLConstants.TEXT);
if (refValue != null) {
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
XMLUnmarshaller unmarshaller = ((XMLRecord) row).getUnmarshaller();
if (value instanceof String) {
if (this.isSwaRef() && (unmarshaller.getAttachmentUnmarshaller() != null)) {
if (getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsDataHandler((String) value);
fieldValue = unmarshaller.getAttachmentUnmarshaller().getAttachmentAsByteArray((String) value);
} else if (!this.isSwaRef()) {
if ((unmarshaller.getAttachmentUnmarshaller() != null) && unmarshaller.getAttachmentUnmarshaller().isXOPPackage() && !this.isSwaRef() && !this.shouldInlineBinaryData()) {
} else if ((unmarshaller.getAttachmentUnmarshaller() != null) && isSwaRef()) {
String refValue = (String) record.get(XMLConstants.TEXT);
if (refValue != null) {
代码示例来源: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
XMLField field = (XMLField) getField();
if (field.getLastXPathFragment().isAttribute()) {
if (isSwaRef() && (marshaller.getAttachmentMarshaller() != null)) {
if (record.isXOPPackage() && !isSwaRef() && !shouldInlineBinaryData()) {
} else if (isSwaRef() && (marshaller.getAttachmentMarshaller() != null)) {
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
XMLField field = (XMLField) getField();
if (field.getLastXPathFragment().isAttribute()) {
if (isSwaRef() && (marshaller.getAttachmentMarshaller() != null)) {
if (record.isXOPPackage() && !isSwaRef() && !shouldInlineBinaryData()) {
} else if (isSwaRef() && (marshaller.getAttachmentMarshaller() != null)) {
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if (xmlBinaryDataMapping.isSwaRef() && (marshaller.getAttachmentMarshaller() != null)) {
marshalRecord.closeStartElement();
if (xmlBinaryDataMapping.isSwaRef() && (marshaller.getAttachmentMarshaller() != null)) {
if(c_id != null) {
marshalRecord.characters(c_id);
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
field = (XMLField)((XMLBinaryDataCollectionMapping)mapping).getField();
} else {
isSwaRef = ((XMLBinaryDataMapping)mapping).isSwaRef();
field = (XMLField)((XMLBinaryDataMapping)mapping).getField();
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if (isSwaRef() && (marshaller.getAttachmentMarshaller() != null)) {
if (record.isXOPPackage() && !isSwaRef() && !shouldInlineBinaryData()) {
} else if (isSwaRef() && (marshaller.getAttachmentMarshaller() != null)) {
内容来源于网络,如有侵权,请联系作者删除!