Module org.eclipse.persistence.core
Class TreeObjectBuilder
java.lang.Object
org.eclipse.persistence.internal.core.descriptors.CoreObjectBuilder<AbstractRecord,AbstractSession,DatabaseField,DatabaseMapping>
org.eclipse.persistence.internal.descriptors.ObjectBuilder
org.eclipse.persistence.internal.oxm.XMLObjectBuilder
org.eclipse.persistence.internal.oxm.TreeObjectBuilder
- All Implemented Interfaces:
Serializable,Cloneable,ObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller>
public class TreeObjectBuilder
extends XMLObjectBuilder
implements ObjectBuilder<AbstractRecord,AbstractSession,ClassDescriptor,XMLMarshaller>
INTERNAL:
Purpose: Perform the unmarshal and marshal operations based on the object-to-XML mapping metadata.
Responsibilities:
- Convert mapping metadata to a tree of XPathNodes. This tree is then traversed during unmarshal and marshal operations.
- Create records appropriate to this implementation of ObjectBuilder.
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.descriptors.ObjectBuilder
batchFetchedAttributes, cloningMappings, descriptor, eagerMappings, fieldsMap, hasCacheIndexesInSopObject, hasInBatchFetchedAttribute, hasWrapperPolicy, isSimple, joinedAttributes, lockAttribute, mappingsByAttribute, mappingsByField, mayHaveNullInPrimaryKey, nonPrimaryKeyMappings, primaryKeyClassifications, primaryKeyExpression, primaryKeyMappings, readOnlyMappingsByField, relationshipMappings, sequenceMapping, shouldKeepRow -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddClassIndicatorFieldToRow(AbstractMarshalRecord abstractMarshalRecord) addExtraNamespacesToNamespaceResolver(Descriptor desc, AbstractMarshalRecord marshalRecord, CoreAbstractSession session, boolean allowOverride, boolean ignoreEqualResolvers) buildRow(XMLRecord record, Object object, CoreAbstractSession session, XMLMarshaller marshaller, XPathFragment rootFragment) buildRow(AbstractRecord record, Object object, AbstractSession session, DatabaseMapping.WriteType writeType) Build the row representation of an object.Class<?> classFromRow(UnmarshalRecord unmarshalRecord, AbstractSession session) createRecord(int size, AbstractSession session) Create a new row/record for the object builder.createRecord(String rootName, AbstractSession session) Create a new row/record for the object builder with the given name.createRecord(String rootName, Node parent, AbstractSession session) Create a new row/record for the object builder with the given name.createRecord(AbstractSession session) Create a new row/record for the object builder.Return primary key mappings.protected voidinitialize(ClassDescriptor descriptor) voidinitialize(AbstractSession session) Cache all the mappings by their attribute and fields.booleanmarshalAttributes(MarshalRecord marshalRecord, Object object, CoreAbstractSession session) Methods inherited from class org.eclipse.persistence.internal.oxm.XMLObjectBuilder
addNamespaceDeclarations, buildAttributesIntoObject, buildIntoNestedRow, buildIntoNestedRow, buildIntoNestedRow, buildObject, buildRow, buildRow, buildRow, createRecord, createRecordFor, createRecordFor, createRecordFor, createRecordForPKExtraction, extractPrimaryKeyFromExpression, extractPrimaryKeyFromObject, extractPrimaryKeyRowFromExpression, getNamespaceResolver, isXmlDescriptor, isXMLObjectBuilder, isXsiTypeIndicatorField, setDescriptor, writeExtraNamespaces, writeOutMappingsMethods inherited from class org.eclipse.persistence.internal.descriptors.ObjectBuilder
addPrimaryKeyForNonDefaultTable, addPrimaryKeyForNonDefaultTable, assignReturnRow, assignReturnValueForField, assignReturnValueToMapping, assignSequenceNumber, assignSequenceNumber, assignSequenceNumber, assignSequenceNumber, buildAttributesIntoObjectSOP, buildAttributesIntoShallowObject, buildAttributesIntoWorkingCopyClone, buildAttributesIntoWorkingCopyCloneSOP, buildBackupClone, buildDeleteExpression, buildExpressionFromExample, buildNewInstance, buildObject, buildObject, buildObject, buildObjectFromResultSet, buildObjectInUnitOfWork, buildObjectsFromCursorInto, buildObjectsFromResultSetInto, buildObjectsInto, buildPrimaryKeyAttributesIntoObject, buildPrimaryKeyExpression, buildPrimaryKeyExpressionFromKeys, buildPrimaryKeyExpressionFromObject, buildProtectedObject, buildRow, buildRowForShallowInsert, buildRowForShallowInsert, buildRowForTranslation, buildRowForUpdate, buildRowForUpdate, buildRowForUpdateAfterShallowInsert, buildRowForUpdateAfterShallowInsert, buildRowForUpdateBeforeShallowDelete, buildRowForUpdateBeforeShallowDelete, buildRowForUpdateWithChangeSet, buildRowForWhereClause, buildRowFromPrimaryKeyValues, buildRowWithChangeSet, buildTemplateInsertRow, buildTemplateInsertRow, buildTemplateUpdateRow, buildUpdateExpression, buildWorkingCopyCloneFromRow, buildWorkingCopyCloneNormally, cacheForeignKeyValues, cacheForeignKeyValues, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemove, cascadePerformRemovePrivateOwnedObjectFromChangeSet, cascadeRegisterNewForCreate, clearPrimaryKey, clone, compareForChange, compareObjects, copyInto, copyInto, copyObject, copyQueryInfoToCacheKey, createObjectChangeSet, createObjectChangeSet, createObjectChangeSet, createPrimaryKeyExpression, createRecordFromXMLContext, extractPrimaryKeyFromObject, extractPrimaryKeyFromRow, extractPrimaryKeyRowFromObject, extractRowFromExpression, extractValueFromObjectForField, fixObjectReferences, getBaseChangeRecordForField, getBaseMappingForField, getBaseValueForField, getBatchFetchedAttributes, getCloningMappings, getDescriptor, getEagerMappings, getFieldClassification, getFieldForQueryKeyName, getFieldsMap, getJoinedAttributes, getLockAttribute, getMappingForAttributeName, getMappingForField, getMappingsByAttribute, getMappingsByField, getNonPrimaryKeyMappings, getParentObjectForField, getPrimaryKeyClassifications, getPrimaryKeyExpression, getReadOnlyMappingsByField, getReadOnlyMappingsForField, getRelationshipMappings, getSequenceMapping, getTargetFieldForQueryKeyName, hasBatchFetchedAttributes, hasCacheIndexesInSopObject, hasInBatchFetchedAttribute, hasJoinedAttributes, hasWrapperPolicy, initializeBatchFetchedAttributes, initializeJoinedAttributes, initializePrimaryKey, instantiateClone, instantiateEagerMappings, instantiateWorkingCopyClone, instantiateWorkingCopyCloneFromRow, isPrimaryKeyComponentInvalid, isPrimaryKeyExpression, isPrimaryKeyMapping, isSimple, iterate, load, loadAll, loadAll, loadBatchReadAttributes, loadJoinedAttributes, mergeChangesIntoObject, mergeChangesIntoObject, mergeIntoObject, mergeIntoObject, populateAttributesForClone, postBuildAttributesIntoObjectEvent, postBuildAttributesIntoWorkingCopyCloneEvent, postInitialize, recordPrivateOwnedRemovals, refreshObjectIfRequired, rehashFieldDependancies, setFieldsMap, setHasInBatchFetchedAttribute, setHasWrapperPolicy, setMappingsByAttribute, setMappingsByField, setNonPrimaryKeyMappings, setPrimaryKeyClassifications, setPrimaryKeyExpression, setPrimaryKeyMappings, setReadOnlyMappingsByField, setSequenceMapping, shouldKeepRow, toString, trimFieldsForInsert, unwrapObject, updateCachedAttributes, validate, verifyDelete, wrapObject, writeIntoRowFromPrimaryKeyValuesMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.persistence.internal.oxm.ObjectBuilder
buildNewInstance, extractPrimaryKeyFromObject, getDescriptor, isXsiTypeIndicatorField
-
Constructor Details
-
TreeObjectBuilder
-
-
Method Details
-
initialize
- Overrides:
initializein classObjectBuilder
-
getRootXPathNode
- Specified by:
getRootXPathNodein interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller>
-
getPrimaryKeyMappings
Description copied from class:ObjectBuilderReturn primary key mappings.- Overrides:
getPrimaryKeyMappingsin classObjectBuilder
-
getTransformationMappings
- Specified by:
getTransformationMappingsin interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller>
-
getContainerValues
- Specified by:
getContainerValuesin interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller>
-
getNullCapableValues
- Specified by:
getNullCapableValuesin interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller>
-
getDefaultEmptyContainerValues
- Specified by:
getDefaultEmptyContainerValuesin interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller>
-
initialize
Description copied from class:ObjectBuilderCache all the mappings by their attribute and fields.- Overrides:
initializein classXMLObjectBuilder
-
buildRow
public AbstractRecord buildRow(AbstractRecord record, Object object, AbstractSession session, DatabaseMapping.WriteType writeType) Description copied from class:ObjectBuilderBuild the row representation of an object.- Overrides:
buildRowin classObjectBuilder
-
buildRow
public XMLRecord buildRow(XMLRecord record, Object object, CoreAbstractSession session, XMLMarshaller marshaller, XPathFragment rootFragment) - Specified by:
buildRowin interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller>
-
marshalAttributes
public boolean marshalAttributes(MarshalRecord marshalRecord, Object object, CoreAbstractSession session) - Specified by:
marshalAttributesin interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller>
-
createRecord
Create a new row/record for the object builder. This allows subclasses to define different record types.- Specified by:
createRecordin interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller> - Overrides:
createRecordin classXMLObjectBuilder
-
createRecord
Create a new row/record for the object builder with the given name. This allows subclasses to define different record types.- Overrides:
createRecordin classXMLObjectBuilder
-
createRecord
Create a new row/record for the object builder with the given name. This allows subclasses to define different record types.- Overrides:
createRecordin classXMLObjectBuilder
-
createRecord
Create a new row/record for the object builder. This allows subclasses to define different record types.- Overrides:
createRecordin classXMLObjectBuilder
-
addExtraNamespacesToNamespaceResolver
public List addExtraNamespacesToNamespaceResolver(Descriptor desc, AbstractMarshalRecord marshalRecord, CoreAbstractSession session, boolean allowOverride, boolean ignoreEqualResolvers) - Specified by:
addExtraNamespacesToNamespaceResolverin interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller> - Overrides:
addExtraNamespacesToNamespaceResolverin classXMLObjectBuilder
-
addClassIndicatorFieldToRow
- Specified by:
addClassIndicatorFieldToRowin interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller>
-
classFromRow
- Specified by:
classFromRowin interfaceObjectBuilder<AbstractRecord,AbstractSession, ClassDescriptor, XMLMarshaller>
-