// 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");
...
| Modifier and Type | Field and Description |
|---|---|
| private ContainerPolicy | |
| private DatabaseMapping | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | buildBackupClone(Object
TODO clone, Object TODO backup, UnitOfWorkImpl TODO unitOfWork)Overrides org. |
| public void | buildClone(Object
TODO original, CacheKey TODO cacheKey, Object TODO clone, Integer TODO refreshCascade, AbstractSession TODO cloningSession)Overrides org. |
| public void | buildCloneFromRow(AbstractRecord
TODO databaseRow, JoinedAttributeManager TODO joinManager, Object TODO clone, CacheKey TODO sharedCacheKey, ObjectBuildingQuery TODO sourceQuery, UnitOfWorkImpl TODO unitOfWork, AbstractSession TODO executionSession)Overrides org. |
| public void | cascadePerformRemoveIfRequired(Object
TODO object, UnitOfWorkImpl TODO uow, Map<K, V> TODO visitedObjects)Implements abstract org. |
| public void | cascadeRegisterNewIfRequired(Object
TODO object, UnitOfWorkImpl TODO uow, Map<K, V> TODO visitedObjects)Implements abstract org. |
| public ChangeRecord | compareForChange(Object
TODO clone, Object TODO backup, ObjectChangeSet TODO owner, AbstractSession TODO session)Overrides org. |
| public boolean | compareObjects(Object
TODO firstObject, Object TODO secondObject, AbstractSession TODO session)Overrides org. |
| public void | fixObjectReferences(Object
TODO object, Map<Object, ObjectDescriptor> TODO objectDescriptors, Map<Object, Object> TODO processedObjects, ObjectLevelReadQuery TODO query, DistributedSession TODO session)Overrides org. |
| public ContainerPolicy | getContainerPolicy()
Overrides org. Implements org. |
| public DatabaseMapping | |
| public String | |
| public void | initialize(AbstractSession session)
Overrides org. |
| public boolean | isXMLMapping()
Overrides org. |
| public void | iterate(DescriptorIterator iterator)
Overrides org. |
| public void | mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession)
Overrides org. |
| public void | mergeIntoObject(Object target, boolean isTargetUninitialized, Object source, MergeManager mergeManager, AbstractSession targetSession)
Overrides org. |
| public void | postInitialize(AbstractSession session)
Overrides org. |
| public void | preInitialize(AbstractSession session)
Overrides org. |
| public void | setContainerPolicy(ContainerPolicy containerPolicy)
Implements org. |
| public void | |
| public void | |
| public void | useCollectionClass(Class<?> concreteClass)
Implements org. |
| public void | useCollectionClassName(String concreteClass)
Implements org. |
| public void | useListClassName(String concreteClass)
Implements org. |
| public void | useMapClass(Class<?> concreteClass, String methodName)
Implements org. |
| public void | useMapClassName(String concreteClass, String methodName)
Implements org. |
| public void | writeSingleValue(Object value, Object object, XMLRecord<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>> record, AbstractSession session)
Implements org. |
| containerPolicy | back to summary |
|---|---|
| private ContainerPolicy containerPolicy | |
| inlineMapping | back to summary |
|---|---|
| private DatabaseMapping inlineMapping | |
| mappedBy | back to summary |
|---|---|
| private String mappedBy | |
| XMLInverseReferenceMapping | back to summary |
|---|---|
| public XMLInverseReferenceMapping() | |
| buildBackupClone | back to summary |
|---|---|
| public void buildBackupClone(Object clone, Object backup, UnitOfWorkImpl unitOfWork) Overrides org. Doc from org. INTERNAL: Clone the attribute from the clone and assign it to the backup.
| |
| buildClone | back to summary |
|---|---|
| public void buildClone(Object original, CacheKey cacheKey, Object clone, Integer refreshCascade, AbstractSession cloningSession) Overrides org. Doc from org. INTERNAL: Clone the attribute from the original and assign it to the clone.
| |
| buildCloneFromRow | back to summary |
|---|---|
| public void buildCloneFromRow(AbstractRecord databaseRow, JoinedAttributeManager joinManager, Object clone, CacheKey sharedCacheKey, ObjectBuildingQuery sourceQuery, UnitOfWorkImpl unitOfWork, AbstractSession executionSession) Overrides org. Doc from org. INTERNAL: A combination of readFromRowIntoObject and buildClone. buildClone 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.
| |
| cascadePerformRemoveIfRequired | back to summary |
|---|---|
| public void cascadePerformRemoveIfRequired(Object object, UnitOfWorkImpl uow, Map<K, V> visitedObjects) Implements abstract org. Doc from org. INTERNAL: Cascade registerNew for Create through mappings that require the cascade
| |
| cascadeRegisterNewIfRequired | back to summary |
|---|---|
| public void cascadeRegisterNewIfRequired(Object object, UnitOfWorkImpl uow, Map<K, V> visitedObjects) Implements abstract org. Doc from org. INTERNAL: Cascade registerNew for Create through mappings that require the cascade
| |
| compareForChange | back to summary |
|---|---|
| public ChangeRecord compareForChange(Object clone, Object backup, ObjectChangeSet owner, AbstractSession session) Overrides org. Doc from org. INTERNAL: Compare the changes between two aggregates. Return a change record holding the changes.
| |
| compareObjects | back to summary |
|---|---|
| public boolean compareObjects(Object firstObject, Object secondObject, AbstractSession session) Overrides org. Doc from org. INTERNAL: Compare the attributes belonging to this mapping for the objects.
| |
| getContainerPolicy | back to summary |
|---|---|
| public ContainerPolicy getContainerPolicy() Overrides org. Implements org. Doc from org. PUBLIC: Return the mapping's container policy.
| |
| getInlineMapping | back to summary |
|---|---|
| public DatabaseMapping getInlineMapping() Implements org.
| |
| getMappedBy | back to summary |
|---|---|
| public String getMappedBy() | |
| initialize | back to summary |
|---|---|
| public void initialize(AbstractSession session) throws DescriptorException Overrides org. Doc from org. INTERNAL: Initialize the reference descriptor.
| |
| isXMLMapping | back to summary |
|---|---|
| public boolean isXMLMapping() Overrides org. Doc from org. INTERNAL: All relational mappings should implement this method to return true.
| |
| iterate | back to summary |
|---|---|
| public void iterate(DescriptorIterator iterator) Overrides org. Doc from org. INTERNAL: Iterate on the appropriate attribute value.
| |
| mergeChangesIntoObject | back to summary |
|---|---|
| public void mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession) Overrides org. Doc from org. INTERNAL: Merge changes from the source to the target object. With aggregates the merge must cascade to the object changes for the aggregate object because aggregate objects have no identity outside of themselves. The actual aggregate object does not need to be replaced, because even if the clone references another aggregate it appears the same to TopLink
| |
| mergeIntoObject | back to summary |
|---|---|
| public void mergeIntoObject(Object target, boolean isTargetUninitialized, Object source, MergeManager mergeManager, AbstractSession targetSession) Overrides org. Doc from org. INTERNAL: Merge changes from the source to the target object. This merge is only called when a changeSet for the target does not exist or the target is uninitialized
| |
| postInitialize | back to summary |
|---|---|
| public void postInitialize(AbstractSession session) throws DescriptorException Overrides org. Doc from org. INTERNAL: Allow for initialization of properties and validation that have dependecies no the descriptor being initialized.
| |
| preInitialize | back to summary |
|---|---|
| public void preInitialize(AbstractSession session) Overrides org. Doc from org. INTERNAL: Allow for initialization of properties and validation.
| |
| setContainerPolicy | back to summary |
|---|---|
| public void setContainerPolicy(ContainerPolicy containerPolicy) Implements org. Doc from org. PUBLIC: Set the mapping's container policy.
| |
| setInlineMapping | back to summary |
|---|---|
| public void setInlineMapping(DatabaseMapping inlineMapping) Implements org.
| |
| setMappedBy | back to summary |
|---|---|
| public void setMappedBy(String mappedBy) Implements org.
| |
| useCollectionClass | back to summary |
|---|---|
| public void useCollectionClass(Class<?> concreteClass) Implements org. Doc from org. PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. The container class must implement (directly or indirectly) the
| |
| useCollectionClassName | back to summary |
|---|---|
| public void useCollectionClassName(String concreteClass) Implements org. Doc from org. PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. The container class must implement (directly or indirectly) the
| |
| useListClassName | back to summary |
|---|---|
| public void useListClassName(String concreteClass) Implements org. Doc from org. PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. The container class must implement (directly or indirectly) the
| |
| useMapClass | back to summary |
|---|---|
| public void useMapClass(Class<?> concreteClass, String methodName) Implements org. Doc from org. PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects. The key used to index a value in the
The container class must implement (directly or indirectly) the
To facilitate resolving the method, the mapping's referenceClass must set before calling this method.
| |
| useMapClassName | back to summary |
|---|---|
| public void useMapClassName(String concreteClass, String methodName) Implements org. Doc from org. PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects. The key used to index a value in the
The container class must implement (directly or indirectly) the
To facilitate resolving the method, the mapping's referenceClass must set before calling this method.
| |
| writeSingleValue | back to summary |
|---|---|
| public void writeSingleValue(Object value, Object object, XMLRecord<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>> record, AbstractSession session) Implements org.
| |