Purpose: This is the overall collection of changes.
Description: It holds all of the object changes and all ObjectChanges, with the same classType and primary keys, referenced in a changeSet should be the same object.
| Modifier and Type | Field and Description |
|---|---|
| protected Map | |
| protected Map | |
| protected Map | |
| protected Map | |
| protected boolean | hasChanges
This attribute is set to true if a changeSet with changes has been added |
| protected boolean | |
| protected boolean | isChangeSetFromOutsideUOW
Flag set when calling commitToDatabaseWithPreBuiltChangeSet so we are aware the UOW does not contain the changes from this change set. |
| protected Map | |
| protected Map | objectChanges
This is the collection of ObjectChanges held by this ChangeSet |
| protected Map | |
| protected transient AbstractSession | session
Stores unit of work before it is serialized. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addDeletedObject(Object object, AbstractSession session)
INTERNAL: Add the Deleted object to the changeSet. |
| public void | addDeletedObjects(Map<K, V> deletedObjects, AbstractSession session)
INTERNAL: Add the Deleted objects to the changeSet. |
| protected void | addNewObjectChangeSet(ObjectChangeSet
the new object change set objectChanges, AbstractSession session)INTERNAL: Add to the changes for 'object' object to this changeSet. |
| public void | addObjectChangeSet(ObjectChangeSet objectChanges, AbstractSession session, boolean
- Any pre commit actions should pass in true
since new objects have extra-handling. Anything post commit, pass in
false. forceToNewObjectList)INTERNAL: Add to the changes for 'object' object to this changeSet. |
| public void | addObjectChangeSetForIdentity(ObjectChangeSet
prototype.changeset.ObjectChanges objectChanges, Object object)INTERNAL: Add change records to the lists used to maintain identity. |
| public UnitOfWorkChangeSet | buildCacheCoordinationMergeChangeSet(AbstractSession
current database session session)INTERNAL: Return a new UnitOfWorkChangeSet that only includes data require for the remote merge, for cache coordination. |
| private void | ensureChanges(final AbstractSession
current database session session, final ObjectChangeSet change set to populate changeSet, final ClassDescriptor class (relational) descriptor related to the change set descriptor)Ensure the change set is populated for cache coordination. |
| public ObjectChangeSet | findObjectChangeSet(ObjectChangeSet changeSet, UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method can be used find the equivalent changeset within this UnitOfWorkChangeSet Aggregates, and new objects without primaryKeys from serialized ChangeSets will not be found Which may result in duplicates, in the UnitOfWorkChangeSet. |
| public ObjectChangeSet | findOrCreateLocalObjectChangeSet(Object entityClone, ClassDescriptor descriptor, boolean isNew)
INTERNAL" This method is used during the merge process to either find the existing ChangeSet or create a new one. |
| public ObjectChangeSet | findOrIntegrateObjectChangeSet(ObjectChangeSet tofind, UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method will be used during the merge process to either find an equivalent change set within this UnitOfWorkChangeSet or integrate that changeset into this UOW ChangeSet |
| public Set | findUpdatedObjectsClasses()
INTERNAL: Returns the set of classes corresponding to updated objects in objectChanges. |
| public Map | |
| public Map | getAllChangeSets()
Implements org. |
| public Map | |
| public Map | getDeletedObjects()
Implements org. |
| public Map | getNewObjectChangeSets()
INTERNAL: This method will return a reference to the new object change set collections. |
| public Map | |
| public ObjectChangeSet | Returns: ObjectChangeSet the changeSet that represents a particular cloneImplements org. |
| protected Map | Returns: MapINTERNAL: This method returns a reference to the collection |
| public AbstractSession | |
| public Object | Returns: Object the clone represented by the changeSetImplements org. |
| public boolean | hasChanges()
Implements org. |
| public boolean | |
| public boolean | Returns: booleanINTERNAL: Returns true if this uowChangeSet contains an objectChangeSet that has forced SQL changes. |
| public boolean | isChangeSetFromOutsideUOW()
INTERNAL: Get the internal flag that tells that this change set was built outside this UOW and the changes it contains cannot be calculated from the contents of this UOW |
| public ObjectChangeSet | mergeObjectChanges(ObjectChangeSet objectChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method will be used to merge a change set into an UnitOfWorkChangeSet This method returns the local instance of the changeset |
| public void | mergeUnitOfWorkChangeSet(UnitOfWorkChangeSet mergeFromChangeSet, AbstractSession session, boolean postCommit)
INTERNAL: THis method will be used to merge another changeset into this changeset. |
| public void | putNewObjectInChangesList(ObjectChangeSet objectChangeSet, AbstractSession session)
INTERNAL: Used to rehash the new objects back into the objectChanges list for serialization Assumes the transaction in in post commit stage. |
| public void | removeObjectChangeSet(ObjectChangeSet changeSet)
INTERNAL: Add the changed Object's records to the ChangeSet. |
| public void | removeObjectChangeSetFromNewList(ObjectChangeSet objectChangeSet, AbstractSession session)
INTERNAL: Used to remove a new object from the new objects list once it has been inserted and added to the objectChangesList |
| public void | setAllChangeSets(Map<K, V> allChangeSets)
INTERNAL: Sets the collection of ObjectChanges in the change Set. |
| public void | setCloneToObjectChangeSet(Map<Object, ObjectChangeSet> cloneToObjectChangeSet)
INTERNAL: This method is used to set the map for cloneToObject reference. |
| public void | |
| public void | |
| public void | setIsChangeSetFromOutsideUOW(boolean isChangeSetFromOutsideUOW)
INTERNAL: Set the internal flag that tells that this change set was built outside this UOW and the changes it contains cannot be calculated from the contents of this UOW |
| protected void | setObjectChanges(Map<K, V> objectChanges)
INTERNAL: Sets the collection of ObjectChanges in the change Set. |
| public void | setObjectChangeSetToUOWClone(Map<ObjectChangeSet, Object> objectChangeSetToUOWClone)
INTERNAL: This method is used to insert a new collection into the UOWChangeSet. |
| public void |
| aggregateChangeSets | back to summary |
|---|---|
| protected Map<ObjectChangeSet, ObjectChangeSet> aggregateChangeSets | |
| allChangeSets | back to summary |
|---|---|
| protected Map<ObjectChangeSet, ObjectChangeSet> allChangeSets | |
| cloneToObjectChangeSet | back to summary |
|---|---|
| protected Map<Object, ObjectChangeSet> cloneToObjectChangeSet | |
| deletedObjects | back to summary |
|---|---|
| protected Map<ObjectChangeSet, ObjectChangeSet> deletedObjects | |
| hasChanges | back to summary |
|---|---|
| protected boolean hasChanges This attribute is set to true if a changeSet with changes has been added | |
| hasForcedChanges | back to summary |
|---|---|
| protected boolean hasForcedChanges | |
| isChangeSetFromOutsideUOW | back to summary |
|---|---|
| protected boolean isChangeSetFromOutsideUOW Flag set when calling commitToDatabaseWithPreBuiltChangeSet so we are aware the UOW does not contain the changes from this change set. | |
| newObjectChangeSets | back to summary |
|---|---|
| protected Map<Class<?>, Map<ObjectChangeSet, ObjectChangeSet>> newObjectChangeSets | |
| objectChanges | back to summary |
|---|---|
| protected Map<Class<?>, Map<ObjectChangeSet, ObjectChangeSet>> objectChanges This is the collection of ObjectChanges held by this ChangeSet | |
| objectChangeSetToUOWClone | back to summary |
|---|---|
| protected Map<ObjectChangeSet, Object> objectChangeSetToUOWClone | |
| session | back to summary |
|---|---|
| protected transient AbstractSession session Stores unit of work before it is serialized. | |
| UnitOfWorkChangeSet | back to summary |
|---|---|
| public UnitOfWorkChangeSet() INTERNAL: Create a ChangeSet | |
| UnitOfWorkChangeSet | back to summary |
|---|---|
| public UnitOfWorkChangeSet(AbstractSession session) INTERNAL: Create a ChangeSet | |
| addDeletedObject | back to summary |
|---|---|
| public void addDeletedObject(Object object, AbstractSession session) INTERNAL: Add the Deleted object to the changeSet. | |
| addDeletedObjects | back to summary |
|---|---|
| public void addDeletedObjects(Map<K, V> deletedObjects, AbstractSession session) INTERNAL: Add the Deleted objects to the changeSet. | |
| addNewObjectChangeSet | back to summary |
|---|---|
| protected void addNewObjectChangeSet(ObjectChangeSet objectChanges, AbstractSession session) INTERNAL: Add to the changes for 'object' object to this changeSet. This method will not add to the lists that are used for identity lookups. It is called specifically for new objects, and new object will be moved to the standard changes list by the QueryMechanism after insert.
| |
| addObjectChangeSet | back to summary |
|---|---|
| public void addObjectChangeSet(ObjectChangeSet objectChanges, AbstractSession session, boolean forceToNewObjectList) INTERNAL: Add to the changes for 'object' object to this changeSet. This method will not add to the lists that are used for identity lookups. The passed change set *must* either have changes or forced changes.
| |
| addObjectChangeSetForIdentity | back to summary |
|---|---|
| public void addObjectChangeSetForIdentity(ObjectChangeSet objectChanges, Object object) INTERNAL: Add change records to the lists used to maintain identity. This will not actually add the changes to 'object' to the change set.
| |
| buildCacheCoordinationMergeChangeSet | back to summary |
|---|---|
| public UnitOfWorkChangeSet buildCacheCoordinationMergeChangeSet(AbstractSession session) INTERNAL: Return a new UnitOfWorkChangeSet that only includes data require for the remote merge, for cache coordination.
| |
| ensureChanges | back to summary |
|---|---|
| private void ensureChanges(final AbstractSession session, final ObjectChangeSet changeSet, final ClassDescriptor descriptor) Ensure the change set is populated for cache coordination.
| |
| findObjectChangeSet | back to summary |
|---|---|
| public ObjectChangeSet findObjectChangeSet(ObjectChangeSet changeSet, UnitOfWorkChangeSet mergeFromChangeSet) INTERNAL: This method can be used find the equivalent changeset within this UnitOfWorkChangeSet Aggregates, and new objects without primaryKeys from serialized ChangeSets will not be found Which may result in duplicates, in the UnitOfWorkChangeSet. | |
| findOrCreateLocalObjectChangeSet | back to summary |
|---|---|
| public ObjectChangeSet findOrCreateLocalObjectChangeSet(Object entityClone, ClassDescriptor descriptor, boolean isNew) INTERNAL" This method is used during the merge process to either find the existing ChangeSet or create a new one. | |
| findOrIntegrateObjectChangeSet | back to summary |
|---|---|
| public ObjectChangeSet findOrIntegrateObjectChangeSet(ObjectChangeSet tofind, UnitOfWorkChangeSet mergeFromChangeSet) INTERNAL: This method will be used during the merge process to either find an equivalent change set within this UnitOfWorkChangeSet or integrate that changeset into this UOW ChangeSet | |
| findUpdatedObjectsClasses | back to summary |
|---|---|
| public Set INTERNAL: Returns the set of classes corresponding to updated objects in objectChanges. | |
| getAggregateChangeSets | back to summary |
|---|---|
| public Map INTERNAL: Get the Aggregate list. Lazy initializes the map if required. | |
| getAllChangeSets | back to summary |
|---|---|
| public Map Implements org. INTERNAL: This method returns a reference to the collection.
| |
| getCloneToObjectChangeSet | back to summary |
|---|---|
| public Map INTERNAL: Get the clone to object change hash table. Lazy initializes the map if required. | |
| getDeletedObjects | back to summary |
|---|---|
| public Map Implements org. INTERNAL: This method returns the reference to the deleted objects from the changeSet.
| |
| getNewObjectChangeSets | back to summary |
|---|---|
| public Map INTERNAL: This method will return a reference to the new object change set collections. | |
| getObjectChanges | back to summary |
|---|---|
| public Map INTERNAL: Returns the ObjectChanges held by this ChangeSet. | |
| getObjectChangeSetForClone | back to summary |
|---|---|
| public ObjectChangeSet getObjectChangeSetForClone(Object clone) Implements org. ADVANCED: Get ChangeSet for a particular clone
| |
| getObjectChangeSetToUOWClone | back to summary |
|---|---|
| protected Map INTERNAL: This method returns a reference to the collection
| |
| getSession | back to summary |
|---|---|
| public AbstractSession getSession() Return the session. This only exists before serialization. | |
| getUOWCloneForObjectChangeSet | back to summary |
|---|---|
| public Object getUOWCloneForObjectChangeSet(ObjectChangeSet changeSet) Implements org. ADVANCED: This method returns the Clone for a particular changeSet | |
| hasChanges | back to summary |
|---|---|
| public boolean hasChanges() Implements org. INTERNAL: Returns true if the Unit Of Work change Set has changes
| |
| hasDeletedObjects | back to summary |
|---|---|
| public boolean hasDeletedObjects() INTERNAL: Returns true if any deleted objects. This should be used before accessing deleted object to avoid creation of map. | |
| hasForcedChanges | back to summary |
|---|---|
| public boolean hasForcedChanges() INTERNAL: Returns true if this uowChangeSet contains an objectChangeSet that has forced SQL changes. This is true whenever CMPPolicy.getForceUpdate() == true.
| |
| isChangeSetFromOutsideUOW | back to summary |
|---|---|
| public boolean isChangeSetFromOutsideUOW() INTERNAL: Get the internal flag that tells that this change set was built outside this UOW and the changes it contains cannot be calculated from the contents of this UOW | |
| mergeObjectChanges | back to summary |
|---|---|
| public ObjectChangeSet mergeObjectChanges(ObjectChangeSet objectChangeSet, UnitOfWorkChangeSet mergeFromChangeSet) INTERNAL: This method will be used to merge a change set into an UnitOfWorkChangeSet This method returns the local instance of the changeset | |
| mergeUnitOfWorkChangeSet | back to summary |
|---|---|
| public void mergeUnitOfWorkChangeSet(UnitOfWorkChangeSet mergeFromChangeSet, AbstractSession session, boolean postCommit) INTERNAL: THis method will be used to merge another changeset into this changeset. The Main use of this method is for non-deferred writes and checkpointing so that the accumulated changes are collected and merged at the end of the transaction. | |
| putNewObjectInChangesList | back to summary |
|---|---|
| public void putNewObjectInChangesList(ObjectChangeSet objectChangeSet, AbstractSession session) INTERNAL: Used to rehash the new objects back into the objectChanges list for serialization Assumes the transaction in in post commit stage. | |
| removeObjectChangeSet | back to summary |
|---|---|
| public void removeObjectChangeSet(ObjectChangeSet changeSet) INTERNAL: Add the changed Object's records to the ChangeSet. | |
| removeObjectChangeSetFromNewList | back to summary |
|---|---|
| public void removeObjectChangeSetFromNewList(ObjectChangeSet objectChangeSet, AbstractSession session) INTERNAL: Used to remove a new object from the new objects list once it has been inserted and added to the objectChangesList | |
| setAllChangeSets | back to summary |
|---|---|
| public void setAllChangeSets(Map<K, V> allChangeSets) INTERNAL: Sets the collection of ObjectChanges in the change Set. | |
| setCloneToObjectChangeSet | back to summary |
|---|---|
| public void setCloneToObjectChangeSet(Map<Object, ObjectChangeSet> cloneToObjectChangeSet) INTERNAL: This method is used to set the map for cloneToObject reference. | |
| setDeletedObjects | back to summary |
|---|---|
| public void setDeletedObjects(Map<K, V> deletedObjects) INTERNAL: Sets the collection of deleted objects. | |
| setHasChanges | back to summary |
|---|---|
| public void setHasChanges(boolean flag) INTERNAL: Set whether the Unit Of Work change Set has changes | |
| setIsChangeSetFromOutsideUOW | back to summary |
|---|---|
| public void setIsChangeSetFromOutsideUOW(boolean isChangeSetFromOutsideUOW) INTERNAL: Set the internal flag that tells that this change set was built outside this UOW and the changes it contains cannot be calculated from the contents of this UOW | |
| setObjectChanges | back to summary |
|---|---|
| protected void setObjectChanges(Map<K, V> objectChanges) INTERNAL: Sets the collection of ObjectChanges in the change Set. | |
| setObjectChangeSetToUOWClone | back to summary |
|---|---|
| public void setObjectChangeSetToUOWClone(Map<ObjectChangeSet, Object> objectChangeSetToUOWClone) INTERNAL: This method is used to insert a new collection into the UOWChangeSet. | |
| setSession | back to summary |
|---|---|
| public void setSession(AbstractSession session) INTERNAL: Set the session. This only exists before serialization. | |