Module org.eclipse.persistence.core
Class ArrayCollectionMappingHelper
java.lang.Object
org.eclipse.persistence.mappings.structures.ArrayCollectionMappingHelper
Helper class to consolidate all the heinous comparing
and merging code for the Array collection mappings.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
compareElements
(Object element1, Object element2, AbstractSession session) Convenience method.protected boolean
compareElementsForChange
(Object element1, Object element2, AbstractSession session) Convenience method.compareForChange
(Object clone, Object backup, ObjectChangeSet owner, AbstractSession session) INTERNAL: Build and return the change record that results from comparing the two collection attributes.boolean
compareObjects
(Object object1, Object object2, AbstractSession session) INTERNAL: Compare the attributes belonging to this mapping for the objects.INTERNAL: Return the mapping, casted a bit more generally.INTERNAL: Return the mapping.void
mergeChangesIntoObject
(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession) INTERNAL: Merge changes from the source to the target object.void
mergeIntoObject
(Object target, boolean isTargetUnInitialized, Object source, MergeManager mergeManager, AbstractSession targetSession) INTERNAL: Merge changes from the source to the target object.void
simpleAddToCollectionChangeRecord
(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session) ADVANCED: This method is used to add an object to a collection once the changeSet is applied.void
simpleRemoveFromCollectionChangeRecord
(Object referenceKey, Object changeSetToRemove, ObjectChangeSet changeSet, AbstractSession session) ADVANCED: This method is used to remove an object from a collection once the changeSet is applied.
-
Constructor Details
-
ArrayCollectionMappingHelper
Constructor.
-
-
Method Details
-
compareElements
Convenience method. Check for null values before delegating to the mapping. -
compareElementsForChange
protected boolean compareElementsForChange(Object element1, Object element2, AbstractSession session) Convenience method. Check for null values before delegating to the mapping. -
getMapping
INTERNAL: Return the mapping. -
compareForChange
public ChangeRecord compareForChange(Object clone, Object backup, ObjectChangeSet owner, AbstractSession session) INTERNAL: Build and return the change record that results from comparing the two collection attributes. -
compareObjects
INTERNAL: Compare the attributes belonging to this mapping for the objects. -
mergeChangesIntoObject
public void mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession) INTERNAL: Merge changes from the source to the target object. -
mergeIntoObject
public void mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, MergeManager mergeManager, AbstractSession targetSession) INTERNAL: Merge changes from the source to the target object. Simply replace the entire target collection. -
simpleAddToCollectionChangeRecord
public void simpleAddToCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session) ADVANCED: This method is used to add an object to a collection once the changeSet is applied. The referenceKey parameter should only be used for direct Maps. -
simpleRemoveFromCollectionChangeRecord
public void simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object changeSetToRemove, ObjectChangeSet changeSet, AbstractSession session) ADVANCED: This method is used to remove an object from a collection once the changeSet is applied. The referenceKey parameter should only be used for direct Maps. -
getDatabaseMapping
INTERNAL: Return the mapping, casted a bit more generally.
-