Top Description Fields Constructors Methods
org.eclipse.persistence.internal.sessions

public abstract Class DeferrableChangeRecord

extends ChangeRecord
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.sessions.CollectionChangeRecord, org.eclipse.persistence.internal.sessions.DirectCollectionChangeRecord, org.eclipse.persistence.internal.sessions.DirectMapChangeRecord
Imports
org.eclipse.persistence.indirection.IndirectCollection, org.eclipse.persistence.internal.queries.ContainerPolicy

Abstract change record for collection type records that allow deferrable change detection. Used for change tracking when user sets entire collection.

Field Summary

Modifier and TypeField and Description
protected boolean
isDeferred

Defines if this change should be calculated at commit time using the two collections.

protected transient Object
latestCollection

Used for change tracking when user sets entire collection.

protected transient Object
originalCollection

Used for change tracking when user sets entire collection.

Inherited from org.eclipse.persistence.internal.sessions.ChangeRecord:
attributemappingowner

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
public abstract void
clearChanges()

Clears info about added / removed objects set by change tracker.

public Object
getLatestCollection()

Used for change tracking when user sets entire collection.

public Object
getOldValue()

Implements org.eclipse.persistence.sessions.changesets.ChangeRecord.getOldValue.

ADVANCED: If the owning UnitOfWork has shouldChangeRecordKeepOldValue set to true, then return the old value of the attribute represented by this ChangeRecord.
public Object
getOldValue(Object currentCollection, AbstractSession session)

public Object
getOriginalCollection()

Used for change tracking when user sets entire collection.

public abstract void
internalRecreateOriginalCollection(Object currentCollection, AbstractSession session)

Recreates the original state of currentCollection.

public boolean
isDeferred()

Returns if this change should be calculated at commit time using the two collections.

public void
recreateOriginalCollection(Object currentCollection, AbstractSession session)

Recreates the original state of the collection.

public void
setIsDeferred(boolean isDeferred)

Sets if this change should be calculated at commit time using the two collections.

public void
setLatestCollection(Object latestCollection)

Used for change tracking when user sets entire collection.

public void
setOriginalCollection(Object originalCollection)

Used for change tracking when user sets entire collection.

Inherited from org.eclipse.persistence.internal.sessions.ChangeRecord:
getAttributegetMappinggetOwnermergeRecordprepareForSynchronizationsetAttributesetMappingsetOwnertoStringupdateChangeRecordWithNewValueupdateReferences

Field Detail

isDeferredback to summary
protected boolean isDeferred

Defines if this change should be calculated at commit time using the two collections. This is used to handle collection replacement.

latestCollectionback to summary
protected transient Object latestCollection

Used for change tracking when user sets entire collection.

originalCollectionback to summary
protected transient Object originalCollection

Used for change tracking when user sets entire collection.

Constructor Detail

DeferrableChangeRecordback to summary
protected DeferrableChangeRecord()
DeferrableChangeRecordback to summary
protected DeferrableChangeRecord(ObjectChangeSet owner)

Method Detail

clearChangesback to summary
public abstract void clearChanges()

Clears info about added / removed objects set by change tracker. Called after the change info has been already used for creation of originalCollection. Also called to make sure there is no change info before comparison for change is performed (change info is still in the record after comparison for change is performed and may cause wrong results when the second comparison for change performed on the same change record).

getLatestCollectionback to summary
public Object getLatestCollection()

Used for change tracking when user sets entire collection. This is the last collection that was set on the object.

getOldValueback to summary
public Object getOldValue()

Implements org.eclipse.persistence.sessions.changesets.ChangeRecord.getOldValue.

ADVANCED: If the owning UnitOfWork has shouldChangeRecordKeepOldValue set to true, then return the old value of the attribute represented by this ChangeRecord.

Annotations
@Override
getOldValueback to summary
public Object getOldValue(Object currentCollection, AbstractSession session)
getOriginalCollectionback to summary
public Object getOriginalCollection()

Used for change tracking when user sets entire collection. This is the original collection that was set on the object when it was cloned.

internalRecreateOriginalCollectionback to summary
public abstract void internalRecreateOriginalCollection(Object currentCollection, AbstractSession session)

Recreates the original state of currentCollection.

isDeferredback to summary
public boolean isDeferred()

Returns if this change should be calculated at commit time using the two collections. This is used to handle collection replacement.

recreateOriginalCollectionback to summary
public void recreateOriginalCollection(Object currentCollection, AbstractSession session)

Recreates the original state of the collection.

setIsDeferredback to summary
public void setIsDeferred(boolean isDeferred)

Sets if this change should be calculated at commit time using the two collections. This is used to handle collection replacement.

setLatestCollectionback to summary
public void setLatestCollection(Object latestCollection)

Used for change tracking when user sets entire collection. This is the last collection that was set on the object.

setOriginalCollectionback to summary
public void setOriginalCollection(Object originalCollection)

Used for change tracking when user sets entire collection. This is the original collection that was set on the object when it was cloned.