if (am != null) {
marshaller = new SDOAttachmentMarshaller(am);
}
// check Primitives for T
SDOXMLHelper sdoXMLHelper = (SDOXMLHelper) context.getXMLHelper();
// Bug 8909750 - Toplink already sets this to "GMT". ADF
// resets it before we get here, so don't change it again.
//sdoXMLHelper.setTimeZone(TimeZone.getTimeZone("GMT"));
sdoXMLHelper.setTimeZoneQualified(true);
XMLDocument xmlDoc = sdoXMLHelper.createDocument((DataObject) java, xmlTag.getNamespaceURI(), xmlTag.getLocalPart());
if (xmlDoc == null) {
return;
}
xmlDoc.setXMLDeclaration(false);
DataObject saveOptions = null;
if (marshaller != null) {
DataFactory dataFactory = parent.getHelperContext().getDataFactory();
saveOptions = dataFactory.create(SDOConstants.ORACLE_SDO_URL,
SDOConstants.XMLHELPER_LOAD_OPTIONS);
saveOptions.set(SDOConstants.ATTACHMENT_MARSHALLER_OPTION, marshaller);
}
sdoXMLHelper.save(xmlDoc, result, saveOptions);
} catch (Exception e) {
throw new SDODatabindingException(e);
}
}