public class XMLObjectReferenceMapping extends AggregateMapping implements org.eclipse.persistence.internal.oxm.mappings.ObjectReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.oxm.record.UnmarshalRecord,XMLField,XMLRecord>, XMLMapping
DatabaseMapping.WriteType| Constructor and Description |
|---|
XMLObjectReferenceMapping()
PUBLIC: The default constructor initializes the sourceToTargetKeyFieldAssociations and sourceToTargetKeys data structures.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSourceToTargetKeyFieldAssociation(java.lang.String srcXPath, java.lang.String tgtXPath)
PUBLIC: Add a source-target xpath pair to the map.
|
void |
addSourceToTargetKeyFieldAssociation(XMLField srcField, XMLField tgtField) |
java.lang.Object |
buildFieldValue(java.lang.Object targetObject, XMLField xmlFld, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Retrieve the target object's primary key value that is mapped to a given source xpath (in the source-target key field association list).
|
void |
buildReference(org.eclipse.persistence.internal.oxm.record.UnmarshalRecord record, XMLField xmlField, java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Create (if necessary) and populate a reference object that will be used during the mapping reference resolution phase after unmarshalling is complete.
|
void |
cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
INTERNAL: Cascade perform delete through mappings that require the cascade
|
void |
cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
INTERNAL: Cascade registerNew for Create through mappings that require the cascade
|
java.util.Vector |
getFields()
INTERNAL: Return a list of XMLFields based on the source XPath values in the source-target key field associations list.
|
XMLInverseReferenceMapping |
getInverseReferenceMapping() |
java.util.HashMap |
getSourceToTargetKeyFieldAssociations()
INTERNAL: Return a list of source-target xmlfield pairs.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Register a ReferenceResolver as an event listener on the session, if one doesn't already exist.
|
boolean |
isObjectReferenceMapping()
INTERNAL: Related mapping should implement this method to return true.
|
boolean |
isWriteOnly()
INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).
|
boolean |
isXMLMapping()
INTERNAL: Indicates that this is an XML mapping.
|
void |
preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Allow for initialization of properties and validation.
|
java.lang.Object |
readFromRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object targetObject, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected)
INTERNAL: Extract the primary key values from the row, then create an org.eclipse.persistence.internal.oxm.Reference instance and store it on the session's org.eclipse.persistence.internal.oxm.ReferenceResolver.
|
void |
setAttributeValueInObject(java.lang.Object object, java.lang.Object value)
INTERNAL: Set the value of the attribute mapped by this mapping.
|
void |
setField(org.eclipse.persistence.internal.helper.DatabaseField field) |
void |
setIsWriteOnly(boolean b) |
void |
setSourceToTargetKeyFieldAssociations(java.util.HashMap sourceToTargetKeyFieldAssociations)
INTERNAL: Set the list of source-target xmlfield pairs.
|
void |
writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)
INTERNAL: Write the attribute value from the object to the row.
|
void |
writeSingleValue(java.lang.Object value, java.lang.Object parent, XMLRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: A method that marshals a single value to the provided Record based on this mapping's XPath.
|
buildBackupClone, buildClone, buildCloneFromRow, buildCopy, buildExpression, compareForChange, compareObjects, convertClassNamesToClasses, fixObjectReferences, getReferenceClass, getReferenceClassName, getReferenceDescriptor, hasNestedIdentityReference, isAggregateMapping, iterate, load, loadAll, mergeChangesIntoObject, mergeIntoObject, postDelete, postDeleteAttributeValue, postInsert, postInsertAttributeValue, postUpdate, postUpdateAttributeValue, preDelete, preDeleteAttributeValue, preInsert, preInsertAttributeValue, preUpdate, preUpdateAttributeValue, remoteInitialization, setReferenceClass, setReferenceClassName, updateChangeRecord, verifyDeleteaddUnconvertedProperty, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, clone, collectQueryParameters, createCloneValueHolder, derivesId, earlyPreDelete, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDerivedIdMapping, getDescriptor, getField, getFieldClassification, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasUnconvertedProperties, instantiateAttribute, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateObjectMapping, isAttributeValueFromObjectInstantiated, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isChangeTrackingSupported, isCloningRequired, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isElementCollectionMapping, isForeignReferenceMapping, isInAndOutSopObject, isInOnlySopObject, isInSopObject, isJoiningSupported, isJPAId, isLazy, isLockableMapping, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOutOnlySopObject, isOutSopObject, isOwned, isPrimaryKeyMapping, isPrivateOwned, isReadOnly, isReferenceMapping, isRelationalMapping, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, iterateOnRealAttributeValue, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postInitialize, postInitializeSourceAndTargetExpressions, prepareCascadeLockingPolicy, readFromResultSetIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setGetMethodName, setIsCacheable, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, toString, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, valueFromRow, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRowequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetReferenceClass, getReferenceClassName, setReferenceClassNameconvertClassNamesToClassesgetAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDescriptor, getField, getReferenceDescriptor, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isCollectionMapping, isReadOnly, isReferenceMapping, isTransformationMapping, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setProperties, setSetMethodNamepublic XMLObjectReferenceMapping()
public void addSourceToTargetKeyFieldAssociation(java.lang.String srcXPath,
java.lang.String tgtXPath)
addSourceToTargetKeyFieldAssociation in interface org.eclipse.persistence.internal.oxm.mappings.ObjectReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.oxm.record.UnmarshalRecord,XMLField,XMLRecord>srcXPath -tgtXPath -public void addSourceToTargetKeyFieldAssociation(XMLField srcField, XMLField tgtField)
public java.lang.Object buildFieldValue(java.lang.Object targetObject,
XMLField xmlFld,
org.eclipse.persistence.internal.sessions.AbstractSession session)
buildFieldValue in interface org.eclipse.persistence.internal.oxm.mappings.ObjectReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.oxm.record.UnmarshalRecord,XMLField,XMLRecord>sourceObject -xmlFld -session -
public void buildReference(org.eclipse.persistence.internal.oxm.record.UnmarshalRecord record,
XMLField xmlField,
java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
buildReference in interface org.eclipse.persistence.internal.oxm.mappings.ObjectReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.oxm.record.UnmarshalRecord,XMLField,XMLRecord>record -xmlField -object -session -
public void cascadePerformRemoveIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
cascadePerformRemoveIfRequired in class DatabaseMapping
public void cascadeRegisterNewIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
cascadeRegisterNewIfRequired in class DatabaseMappingpublic java.util.Vector getFields()
getFields in interface org.eclipse.persistence.internal.oxm.mappings.ObjectReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.oxm.record.UnmarshalRecord,XMLField,XMLRecord>getFields in class DatabaseMappingpublic java.util.HashMap getSourceToTargetKeyFieldAssociations()
getSourceToTargetKeyFieldAssociations in interface org.eclipse.persistence.internal.oxm.mappings.ObjectReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.oxm.record.UnmarshalRecord,XMLField,XMLRecord>
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
initialize in class AggregateMappingDescriptorExceptionReferenceResolver, NamespaceResolver
public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
DatabaseMappingpreInitialize in class DatabaseMappingDescriptorExceptionpublic boolean isXMLMapping()
isXMLMapping in class DatabaseMapping
public java.lang.Object readFromRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
java.lang.Object targetObject,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected)
throws DatabaseException
readFromRowIntoObject in class DatabaseMappingDatabaseExceptionpublic void setField(org.eclipse.persistence.internal.helper.DatabaseField field)
field -public void setSourceToTargetKeyFieldAssociations(java.util.HashMap sourceToTargetKeyFieldAssociations)
public void writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session,
DatabaseMapping.WriteType writeType)
writeFromObjectIntoRow in class DatabaseMapping
public void writeSingleValue(java.lang.Object value,
java.lang.Object parent,
XMLRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
XMLMappingwriteSingleValue in interface org.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>writeSingleValue in interface XMLMappingvalue - - The value to be marshalledrow - - The Record the value is being marshalled too.public void setIsWriteOnly(boolean b)
setIsWriteOnly in interface org.eclipse.persistence.internal.oxm.mappings.ObjectReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.oxm.record.UnmarshalRecord,XMLField,XMLRecord>setIsWriteOnly in interface XMLMappingpublic boolean isWriteOnly()
DatabaseMappingisWriteOnly in interface org.eclipse.persistence.internal.oxm.mappings.ObjectReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.oxm.record.UnmarshalRecord,XMLField,XMLRecord>isWriteOnly in interface XMLMappingisWriteOnly in class DatabaseMapping
public void setAttributeValueInObject(java.lang.Object object,
java.lang.Object value)
throws DescriptorException
DatabaseMappingsetAttributeValueInObject in interface org.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>setAttributeValueInObject in class DatabaseMappingDescriptorExceptionpublic XMLInverseReferenceMapping getInverseReferenceMapping()
getInverseReferenceMapping in interface org.eclipse.persistence.internal.oxm.mappings.ObjectReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.oxm.record.UnmarshalRecord,XMLField,XMLRecord>public boolean isObjectReferenceMapping()
DatabaseMappingisObjectReferenceMapping in class DatabaseMapping