} else {
xmlField = (XMLField)((XMLBinaryDataMapping)mapping).getField();
}
if(XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {
//Get the attachment and set it in the object.
XMLAttachmentUnmarshaller attachmentUnmarshaller = record.getUnmarshaller().getAttachmentUnmarshaller();
Object data = null;
Class attributeClassification = null;
if(isCollection) {
attributeClassification = ((XMLBinaryDataCollectionMapping)mapping).getAttributeElementClass();
} else {
attributeClassification = mapping.getAttributeClassification();
}
if(attachmentUnmarshaller == null) {
//if there's no attachment unmarshaller, it isn't possible to retrieve
//the attachment. Throw an exception.
throw XMLMarshalException.noAttachmentUnmarshallerSet(this.c_id);
}
if(attributeClassification.equals(XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER)) {
data = attachmentUnmarshaller.getAttachmentAsDataHandler(this.c_id);
} else {
data = attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);
}
data = XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(data, mapping.getAttributeClassification(), record.getSession());
if (this.converter != null) {
Converter converter = this.converter;
if (converter instanceof XMLConverter) {