public class TreeObjectBuilder extends XMLObjectBuilder
Purpose: Perform the unmarshal and marshal operations based on the object-to-XML mapping metadata.
Responsibilities:
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CYCLE_RECOVERABLE |
static java.lang.String |
CYCLE_RECOVERABLE_CONTEXT |
static java.lang.String |
ON_CYCLE_DETECTED |
| Constructor and Description |
|---|
TreeObjectBuilder(ClassDescriptor descriptor) |
| Modifier and Type | Method and Description |
|---|---|
XPathNode |
addChild(XPathFragment xPathFragment,
NodeValue nodeValue,
NamespaceResolver namespaceResolver) |
void |
addContainerValue(ContainerValue containerValue) |
void |
addDefaultEmptyContainerValue(ContainerValue containerValue) |
void |
addNullCapableValue(NullCapableValue nullCapableValue) |
void |
addTransformationMapping(AbstractTransformationMapping transformationMapping) |
AbstractRecord |
buildRow(AbstractRecord record,
java.lang.Object object,
AbstractSession session,
DatabaseMapping.WriteType writeType)
Build the row representation of an object.
|
AbstractRecord |
buildRow(AbstractRecord record,
java.lang.Object object,
AbstractSession session,
XMLMarshaller marshaller,
XPathFragment rootFragment,
DatabaseMapping.WriteType writeType) |
AbstractRecord |
createRecord(AbstractSession session)
Create a new row/record for the object builder.
|
AbstractRecord |
createRecord(int size,
AbstractSession session)
Create a new row/record for the object builder.
|
AbstractRecord |
createRecord(java.lang.String rootName,
AbstractSession session)
Create a new row/record for the object builder with the given name.
|
AbstractRecord |
createRecord(java.lang.String rootName,
org.w3c.dom.Node parent,
AbstractSession session)
Create a new row/record for the object builder with the given name.
|
java.util.List |
getContainerValues() |
java.util.List |
getDefaultEmptyContainerValues() |
java.util.List |
getNullCapableValues() |
java.util.List<DatabaseMapping> |
getPrimaryKeyMappings()
Return primary key mappings.
|
XPathNode |
getRootXPathNode() |
java.util.List |
getTransformationMappings() |
void |
initialize(AbstractSession session)
Cache all the mappings by their attribute and fields.
|
boolean |
marshalAttributes(MarshalRecord marshalRecord,
java.lang.Object object,
AbstractSession session) |
addNamespaceDeclarations, addXsiTypeAndClassIndicatorIfRequired, addXsiTypeAndClassIndicatorIfRequired, buildAttributesIntoObject, buildIntoNestedRow, buildIntoNestedRow, buildIntoNestedRow, buildObject, buildRow, buildRow, buildRow, createRecord, createRecordFor, createRecordFor, createRecordFor, extractPrimaryKeyFromExpression, extractPrimaryKeyFromObject, extractPrimaryKeyRowFromExpression, getNamespaceResolver, isXMLObjectBuilder, removeExtraNamespacesFromNamespaceResolver, setDescriptor, writeExtraNamespaces, writeOutMappingsaddPrimaryKeyForNonDefaultTable, addPrimaryKeyForNonDefaultTable, assignReturnRow, assignReturnValueForField, assignSequenceNumber, assignSequenceNumber, buildAttributesIntoShallowObject, buildAttributesIntoWorkingCopyClone, buildBackupClone, buildDeleteExpression, buildExpressionFromExample, buildNewInstance, buildObject, buildObjectFromResultSet, buildObjectsInto, buildPrimaryKeyAttributesIntoObject, buildPrimaryKeyExpression, buildPrimaryKeyExpressionFromKeys, buildPrimaryKeyExpressionFromObject, buildRow, buildRowForShallowInsert, buildRowForShallowInsert, buildRowForTranslation, buildRowForUpdate, buildRowForUpdate, buildRowForUpdateAfterShallowInsert, buildRowForUpdateAfterShallowInsert, buildRowForUpdateBeforeShallowDelete, buildRowForUpdateBeforeShallowDelete, buildRowForUpdateWithChangeSet, buildRowForWhereClause, buildRowFromPrimaryKeyValues, buildRowWithChangeSet, buildTemplateInsertRow, buildTemplateInsertRow, buildTemplateUpdateRow, buildUpdateExpression, cacheForeignKeyValues, cacheForeignKeyValues, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemove, cascadePerformRemovePrivateOwnedObjectFromChangeSet, cascadeRegisterNewForCreate, clearPrimaryKey, clone, compareForChange, compareObjects, copyInto, copyInto, copyObject, createObjectChangeSet, createObjectChangeSet, createObjectChangeSet, createPrimaryKeyExpression, extractPrimaryKeyFromObject, extractPrimaryKeyFromRow, extractPrimaryKeyRowFromObject, extractRowFromExpression, extractValueFromObjectForField, fixObjectReferences, getBaseChangeRecordForField, getBaseMappingForField, getBaseValueForField, getBatchFetchedAttributes, getCloningMappings, getDescriptor, getEagerMappings, getFieldClassification, getFieldForQueryKeyName, getFieldsMap, getJoinedAttributes, getLockAttribute, getMappingForAttributeName, getMappingForField, getMappingsByField, getParentObjectForField, getPrimaryKeyClassifications, getPrimaryKeyExpression, getReadOnlyMappingsByField, getReadOnlyMappingsForField, getRelationshipMappings, getSequenceMapping, getTargetFieldForQueryKeyName, hasBatchFetchedAttributes, hasInBatchFetchedAttribute, hasJoinedAttributes, hasWrapperPolicy, initializeBatchFetchedAttributes, initializeJoinedAttributes, initializePrimaryKey, instantiateClone, instantiateEagerMappings, instantiateWorkingCopyClone, instantiateWorkingCopyCloneFromRow, isPrimaryKeyComponentInvalid, isPrimaryKeyExpression, isPrimaryKeyMapping, isSimple, iterate, mergeChangesIntoObject, mergeChangesIntoObject, mergeIntoObject, mergeIntoObject, populateAttributesForClone, postInitialize, recordPrivateOwnedRemovals, rehashFieldDependancies, setHasInBatchFetchedAttribute, setHasWrapperPolicy, setMappingsByField, setPrimaryKeyClassifications, setPrimaryKeyExpression, setReadOnlyMappingsByField, setSequenceMapping, toString, trimFieldsForInsert, unwrapObject, updateCachedAttributes, validate, verifyDelete, wrapObject, writeIntoRowFromPrimaryKeyValuespublic static final java.lang.String CYCLE_RECOVERABLE
public static final java.lang.String CYCLE_RECOVERABLE_CONTEXT
public static final java.lang.String ON_CYCLE_DETECTED
public TreeObjectBuilder(ClassDescriptor descriptor)
public XPathNode getRootXPathNode()
public java.util.List<DatabaseMapping> getPrimaryKeyMappings()
ObjectBuildergetPrimaryKeyMappings in class ObjectBuilderpublic void addTransformationMapping(AbstractTransformationMapping transformationMapping)
public java.util.List getTransformationMappings()
public java.util.List getContainerValues()
public void addDefaultEmptyContainerValue(ContainerValue containerValue)
public void addContainerValue(ContainerValue containerValue)
public java.util.List getNullCapableValues()
public java.util.List getDefaultEmptyContainerValues()
public void addNullCapableValue(NullCapableValue nullCapableValue)
public void initialize(AbstractSession session)
ObjectBuilderinitialize in class XMLObjectBuilderpublic XPathNode addChild(XPathFragment xPathFragment, NodeValue nodeValue, NamespaceResolver namespaceResolver)
public AbstractRecord buildRow(AbstractRecord record, java.lang.Object object, AbstractSession session, DatabaseMapping.WriteType writeType)
ObjectBuilderbuildRow in class ObjectBuilderpublic AbstractRecord buildRow(AbstractRecord record, java.lang.Object object, AbstractSession session, XMLMarshaller marshaller, XPathFragment rootFragment, DatabaseMapping.WriteType writeType)
public boolean marshalAttributes(MarshalRecord marshalRecord, java.lang.Object object, AbstractSession session)
public AbstractRecord createRecord(AbstractSession session)
createRecord in class XMLObjectBuilderpublic AbstractRecord createRecord(java.lang.String rootName, AbstractSession session)
createRecord in class XMLObjectBuilderpublic AbstractRecord createRecord(java.lang.String rootName, org.w3c.dom.Node parent, AbstractSession session)
createRecord in class XMLObjectBuilderpublic AbstractRecord createRecord(int size, AbstractSession session)
createRecord in class XMLObjectBuilderEclipseLink 2.4.2, "build v20130514-5956486" API Reference