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
public class DirectMapChangeRecord extends DeferrableChangeRecord
Change record used by DirectMapMapping. Only needs to track unique keys added/removed.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected HashMap
addObjectsList
protected HashMap
removeObjectsList
-
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
Constructors Constructor Description DirectMapChangeRecord()
DirectMapChangeRecord(ObjectChangeSet owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
clearChanges()
Clears info about added / removed objects set by change tracker.HashMap
getAddObjects()
Returns the added items list.HashMap
getRemoveObjects()
Returns the removed items list.boolean
hasChanges()
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
-
-
-
-
Constructor Detail
-
DirectMapChangeRecord
public DirectMapChangeRecord()
-
DirectMapChangeRecord
public DirectMapChangeRecord(ObjectChangeSet owner)
-
-
Method Detail
-
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
public void addAdditionChange(HashMap additions)
Adds the items that were added to the collection.
-
addRemoveChange
public void addRemoveChange(HashMap subtractions)
Adds the items that were removed from the collection.
-
addAdditionChange
public void addAdditionChange(Object key, Object value)
Adds the items that were added to the collection.
-
addRemoveChange
public void addRemoveChange(Object key, Object value)
Adds the items that were removed from the collection.
-
setAddObjects
public void setAddObjects(HashMap addObjects)
Sets the added items list.
-
getAddObjects
public HashMap getAddObjects()
Returns the added items list.
-
setRemoveObjects
public void setRemoveObjects(HashMap removeObjects)
Sets the removed items list.
-
getRemoveObjects
public HashMap 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
public void internalRecreateOriginalCollection(Object currentMap, AbstractSession session)
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
-
-