|
EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.persistence.core.mappings.CoreMapping<AttributeAccessor,org.eclipse.persistence.internal.sessions.AbstractSession,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField>
org.eclipse.persistence.mappings.DatabaseMapping
org.eclipse.persistence.mappings.AggregateMapping
org.eclipse.persistence.oxm.mappings.XMLInverseReferenceMapping
public class XMLInverseReferenceMapping
This mapping is used to map a back-pointer. It represents the "opposite" of one of the
following relationship mappings:
// EMPLOYEE has a collection of PHONEs (phoneNumbers)
// PHONE has a back-pointer to EMPLOYEE (owningEmployee)
// EMPLOYEE Descriptor
XMLCompositeCollectionMapping phone = new XMLCompositeCollectionMapping();
phone.setReferenceClassName("org.example.PhoneNumber");
phone.setAttributeName("phoneNumbers");
...
// PHONE Descriptor
XMLInverseReferenceMapping owningEmployee = new XMLInverseReferenceMapping();
owningEmployee.setReferenceClassName("org.example.Employee");
owningEmployee.setMappedBy("phoneNumbers");
owningEmployee.setAttributeName("owningEmployee");
...
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
|---|
DatabaseMapping.WriteType |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.persistence.mappings.AggregateMapping |
|---|
referenceClass, referenceClassName, referenceDescriptor |
| Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
|---|
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM |
| Constructor Summary | |
|---|---|
XMLInverseReferenceMapping()
|
|
| Method Summary | |
|---|---|
void |
buildBackupClone(java.lang.Object clone,
java.lang.Object backup,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL: Clone the attribute from the clone and assign it to the backup. |
void |
buildClone(java.lang.Object original,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
java.lang.Object clone,
java.lang.Integer refreshCascade,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
INTERNAL: Clone the attribute from the original and assign it to the clone. |
void |
buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
java.lang.Object clone,
org.eclipse.persistence.internal.identitymaps.CacheKey sharedCacheKey,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL: A combination of readFromRowIntoObject and buildClone. |
void |
cascadePerformRemoveIfRequired(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 |
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 |
org.eclipse.persistence.internal.sessions.ChangeRecord |
compareForChange(java.lang.Object clone,
java.lang.Object backup,
org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Compare the changes between two aggregates. |
boolean |
compareObjects(java.lang.Object firstObject,
java.lang.Object secondObject,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Compare the attributes belonging to this mapping for the objects. |
void |
fixObjectReferences(java.lang.Object object,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
DistributedSession session)
INTERNAL: An object has been serialized from the server to the remote client. |
org.eclipse.persistence.internal.queries.ContainerPolicy |
getContainerPolicy()
INTERNAL: Return the mapping's containerPolicy. |
DatabaseMapping |
getInlineMapping()
|
java.lang.String |
getMappedBy()
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the reference descriptor. |
boolean |
isXMLMapping()
INTERNAL: All relational mappings should implement this method to return true. |
void |
iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
INTERNAL: Iterate on the appropriate attribute value. |
void |
mergeChangesIntoObject(java.lang.Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL: Merge changes from the source to the target object. |
void |
mergeIntoObject(java.lang.Object target,
boolean isTargetUninitialized,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL: Merge changes from the source to the target object. |
void |
postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Allow for initialization of properties and validation that have dependecies no the descriptor being initialized. |
void |
preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Allow for initialization of properties and validation. |
void |
setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
PUBLIC: Set the mapping's container policy. |
void |
setInlineMapping(DatabaseMapping inlineMapping)
|
void |
setMappedBy(java.lang.String mappedBy)
|
void |
useCollectionClass(java.lang.Class concreteClass)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. |
void |
useCollectionClassName(java.lang.String concreteClass)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. |
void |
useListClassName(java.lang.String concreteClass)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. |
void |
useMapClass(java.lang.Class concreteClass,
java.lang.String methodName)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. |
void |
useMapClassName(java.lang.String concreteClass,
java.lang.String methodName)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. |
void |
writeSingleValue(java.lang.Object value,
java.lang.Object object,
org.eclipse.persistence.internal.oxm.record.XMLRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.InverseReferenceMapping |
|---|
getGetMethodName, getReferenceClassName, setReferenceClassName |
| Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.Mapping |
|---|
convertClassNamesToClasses, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDescriptor, getField, getReferenceDescriptor, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isCollectionMapping, isReadOnly, isReferenceMapping, isTransformationMapping, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setGetMethodName, setIsReadOnly, setProperties, setSetMethodName |
| Constructor Detail |
|---|
public XMLInverseReferenceMapping()
| Method Detail |
|---|
public boolean isXMLMapping()
DatabaseMapping
isXMLMapping in class DatabaseMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
AggregateMapping
initialize in class AggregateMappingDescriptorExceptionpublic void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
DatabaseMapping
preInitialize in class DatabaseMapping
public void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
DatabaseMapping
postInitialize in class DatabaseMappingDescriptorExceptionpublic java.lang.String getMappedBy()
public void setMappedBy(java.lang.String mappedBy)
setMappedBy in interface org.eclipse.persistence.internal.oxm.mappings.InverseReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,DatabaseMapping,org.eclipse.persistence.internal.oxm.record.XMLRecord>
public void buildBackupClone(java.lang.Object clone,
java.lang.Object backup,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
AggregateMapping
buildBackupClone in class AggregateMapping
public void buildClone(java.lang.Object original,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
java.lang.Object clone,
java.lang.Integer refreshCascade,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
AggregateMapping
buildClone in class AggregateMapping
public void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
java.lang.Object clone,
org.eclipse.persistence.internal.identitymaps.CacheKey sharedCacheKey,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
AggregateMappingbuildClone assumes the attribute value exists on the original and can simply be copied.
readFromRowIntoObject assumes that one is building an original.
Both of the above assumptions are false in this method, and actually attempts to do both at the same time.
Extract value from the row and set the attribute to this value in the working copy clone. In order to bypass the shared cache when in transaction a UnitOfWork must be able to populate working copies directly from the row.
buildCloneFromRow in class AggregateMapping
public void cascadePerformRemoveIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
DatabaseMapping
cascadePerformRemoveIfRequired in class DatabaseMapping
public void cascadeRegisterNewIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
DatabaseMapping
cascadeRegisterNewIfRequired in class DatabaseMapping
public org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone,
java.lang.Object backup,
org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
org.eclipse.persistence.internal.sessions.AbstractSession session)
AggregateMapping
compareForChange in class AggregateMapping
public boolean compareObjects(java.lang.Object firstObject,
java.lang.Object secondObject,
org.eclipse.persistence.internal.sessions.AbstractSession session)
AggregateMapping
compareObjects in class AggregateMapping
public void fixObjectReferences(java.lang.Object object,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
DistributedSession session)
AggregateMapping
fixObjectReferences in class AggregateMappingpublic void iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
AggregateMapping
iterate in class AggregateMapping
public void mergeChangesIntoObject(java.lang.Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
AggregateMapping
mergeChangesIntoObject in class AggregateMapping
public void mergeIntoObject(java.lang.Object target,
boolean isTargetUninitialized,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
AggregateMapping
mergeIntoObject in class AggregateMappingpublic void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
ContainerMapping
setContainerPolicy in interface org.eclipse.persistence.internal.oxm.mappings.InverseReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,DatabaseMapping,org.eclipse.persistence.internal.oxm.record.XMLRecord>setContainerPolicy in interface ContainerMappingpublic org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
DatabaseMapping
getContainerPolicy 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,org.eclipse.persistence.internal.oxm.record.XMLRecord>getContainerPolicy in interface ContainerMappinggetContainerPolicy in class DatabaseMappingpublic void useCollectionClass(java.lang.Class concreteClass)
ContainerMappingThe container class must implement (directly or indirectly) the
java.util.Collection interface.
useCollectionClass in interface org.eclipse.persistence.internal.oxm.mappings.InverseReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,DatabaseMapping,org.eclipse.persistence.internal.oxm.record.XMLRecord>useCollectionClass in interface ContainerMappingpublic void useCollectionClassName(java.lang.String concreteClass)
ContainerMappingThe container class must implement (directly or indirectly) the
java.util.Collection interface.
useCollectionClassName in interface ContainerMappingpublic void useListClassName(java.lang.String concreteClass)
ContainerMappingThe container class must implement (directly or indirectly) the
java.util.List interface.
useListClassName in interface ContainerMapping
public void useMapClass(java.lang.Class concreteClass,
java.lang.String methodName)
ContainerMappingMap is the value returned by a call to the specified
zero-argument method.
The method must be implemented by the class (or a superclass) of any
value to be inserted into the Map.
The container class must implement (directly or indirectly) the
java.util.Map interface.
To facilitate resolving the method, the mapping's referenceClass must set before calling this method.
useMapClass in interface ContainerMapping
public void useMapClassName(java.lang.String concreteClass,
java.lang.String methodName)
ContainerMappingMap is the value returned by a call to the specified
zero-argument method.
The method must be implemented by the class (or a superclass) of any
value to be inserted into the Map.
The container class must implement (directly or indirectly) the
java.util.Map interface.
To facilitate resolving the method, the mapping's referenceClass must set before calling this method.
useMapClassName in interface ContainerMappingpublic DatabaseMapping getInlineMapping()
getInlineMapping in interface org.eclipse.persistence.internal.oxm.mappings.InverseReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,DatabaseMapping,org.eclipse.persistence.internal.oxm.record.XMLRecord>public void setInlineMapping(DatabaseMapping inlineMapping)
setInlineMapping in interface org.eclipse.persistence.internal.oxm.mappings.InverseReferenceMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,DatabaseMapping,org.eclipse.persistence.internal.oxm.record.XMLRecord>
public void writeSingleValue(java.lang.Object value,
java.lang.Object object,
org.eclipse.persistence.internal.oxm.record.XMLRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
writeSingleValue 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,org.eclipse.persistence.internal.oxm.record.XMLRecord>
|
EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||