Module org.eclipse.persistence.core
Class ObjectReferenceChangeRecord
- java.lang.Object
-
- org.eclipse.persistence.internal.sessions.ChangeRecord
-
- org.eclipse.persistence.internal.sessions.ObjectReferenceChangeRecord
-
- All Implemented Interfaces:
Serializable,ChangeRecord,ObjectReferenceChangeRecord
public class ObjectReferenceChangeRecord extends ChangeRecord implements ObjectReferenceChangeRecord
Purpose: To record the changes for an attribute that references a single Object
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ObjectChangeSetnewValueThis is the object change set that the attribute points to.protected ObjectoldValueA reference to the old value must also be stored.-
Fields inherited from class org.eclipse.persistence.internal.sessions.ChangeRecord
attribute, mapping, owner
-
-
Constructor Summary
Constructors Constructor Description ObjectReferenceChangeRecord()INTERNAL: This default constructor.ObjectReferenceChangeRecord(ObjectChangeSet owner)INTERNAL: This Constructor is used to create an ObjectReferenceChangeRecord With an owner
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectChangeSetgetNewValue()ADVANCED: Returns the new reference for this objectObjectgetOldValue()Return the old value of the object reference.voidmergeRecord(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)INTERNAL: This method will be used to merge one record into anothervoidsetNewValue(ObjectChangeSet newValue)This method sets the value of the change to be made.voidsetNewValue(ObjectChangeSet newValue)This method sets the value of the change to be made.voidsetOldValue(Object oldValue)Set the old value of the object reference.voidupdateReferences(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)INTERNAL: This method will be used to update the objectsChangeSets references-
Methods inherited from class org.eclipse.persistence.internal.sessions.ChangeRecord
getAttribute, getMapping, getOwner, prepareForSynchronization, setAttribute, setMapping, setOwner, toString, updateChangeRecordWithNewValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.sessions.changesets.ChangeRecord
getAttribute, getOwner
-
-
-
-
Field Detail
-
newValue
protected ObjectChangeSet newValue
This is the object change set that the attribute points to.
-
oldValue
protected transient Object oldValue
A reference to the old value must also be stored. This is only required for the commit and must never be serialized.
-
-
Constructor Detail
-
ObjectReferenceChangeRecord
public ObjectReferenceChangeRecord()
INTERNAL: This default constructor.
-
ObjectReferenceChangeRecord
public ObjectReferenceChangeRecord(ObjectChangeSet owner)
INTERNAL: This Constructor is used to create an ObjectReferenceChangeRecord With an owner
-
-
Method Detail
-
getNewValue
public ObjectChangeSet getNewValue()
ADVANCED: Returns the new reference for this object- Specified by:
getNewValuein interfaceObjectReferenceChangeRecord- Returns:
- org.eclipse.persistence.sessions.changesets.ObjectChangeSet
-
mergeRecord
public void mergeRecord(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method will be used to merge one record into another- Specified by:
mergeRecordin classChangeRecord
-
setNewValue
public void setNewValue(ObjectChangeSet newValue)
This method sets the value of the change to be made.- Parameters:
newValue- ObjectChangeSet
-
setNewValue
public void setNewValue(ObjectChangeSet newValue)
This method sets the value of the change to be made.
-
getOldValue
public Object getOldValue()
Return the old value of the object reference. This is used during the commit for private-owned references.- Specified by:
getOldValuein interfaceChangeRecord- Specified by:
getOldValuein interfaceObjectReferenceChangeRecord
-
setOldValue
public void setOldValue(Object oldValue)
Set the old value of the object reference. This is used during the commit for private-owned references.
-
updateReferences
public void updateReferences(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method will be used to update the objectsChangeSets references- Specified by:
updateReferencesin classChangeRecord
-
-