Module org.eclipse.persistence.core
Class DirectMapChangeRecord
java.lang.Object
org.eclipse.persistence.internal.sessions.ChangeRecord
org.eclipse.persistence.internal.sessions.DeferrableChangeRecord
org.eclipse.persistence.internal.sessions.DirectMapChangeRecord
- All Implemented Interfaces:
Serializable
,ChangeRecord
Change record used by DirectMapMapping.
Only needs to track unique keys added/removed.
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.sessions.DeferrableChangeRecord
isDeferred, latestCollection, originalCollection
Fields inherited from class org.eclipse.persistence.internal.sessions.ChangeRecord
attribute, mapping, owner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdditionChange
(Object key, Object value) Adds the items that were added to the collection.void
addAdditionChange
(HashMap additions) Adds the items that were added to the collection.void
addRemoveChange
(Object key, Object value) Adds the items that were removed from the collection.void
addRemoveChange
(HashMap subtractions) Adds the items that were removed from the collection.void
Clears info about added / removed objects set by change tracker.Returns the added items list.Returns the removed items list.boolean
Returns true if the change set has changes.void
internalRecreateOriginalCollection
(Object currentMap, AbstractSession session) Recreates the original state of the collection.void
mergeRecord
(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet) This method will be used to merge one record into another.void
setAddObjects
(HashMap addObjects) Sets the added items list.void
setRemoveObjects
(HashMap removeObjects) Sets the removed items list.void
updateReferences
(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet) This method will be used to update the objectsChangeSets references.Methods inherited from class org.eclipse.persistence.internal.sessions.DeferrableChangeRecord
getLatestCollection, getOldValue, getOldValue, getOriginalCollection, isDeferred, recreateOriginalCollection, setIsDeferred, setLatestCollection, setOriginalCollection
Methods inherited from class org.eclipse.persistence.internal.sessions.ChangeRecord
getAttribute, getMapping, getOwner, prepareForSynchronization, setAttribute, setMapping, setOwner, toString, updateChangeRecordWithNewValue
-
Field Details
-
addObjectsList
-
removeObjectsList
-
-
Constructor Details
-
DirectMapChangeRecord
public DirectMapChangeRecord() -
DirectMapChangeRecord
-
-
Method Details
-
hasChanges
public boolean hasChanges()Returns true if the change set has changes. -
mergeRecord
public void mergeRecord(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet) This method will be used to merge one record into another.- Specified by:
mergeRecord
in classChangeRecord
-
addAdditionChange
Adds the items that were added to the collection. -
addRemoveChange
Adds the items that were removed from the collection. -
addAdditionChange
Adds the items that were added to the collection. -
addRemoveChange
Adds the items that were removed from the collection. -
setAddObjects
Sets the added items list. -
getAddObjects
Returns the added items list. -
setRemoveObjects
Sets the removed items list. -
getRemoveObjects
Returns the removed items list. -
updateReferences
public void updateReferences(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet) This method will be used to update the objectsChangeSets references.- Specified by:
updateReferences
in classChangeRecord
-
internalRecreateOriginalCollection
Recreates the original state of the collection.- Specified by:
internalRecreateOriginalCollection
in classDeferrableChangeRecord
-
clearChanges
public void clearChanges()Clears info about added / removed objects set by change tracker.- Specified by:
clearChanges
in classDeferrableChangeRecord
-