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:
-
Field Summary
Modifier and TypeFieldDescriptionprotected ObjectChangeSet
This is the object change set that the attribute points to.protected Object
A reference to the old value must also be stored.Fields inherited from class org.eclipse.persistence.internal.sessions.ChangeRecord
attribute, mapping, owner
-
Constructor Summary
ConstructorDescriptionINTERNAL: This default constructor.INTERNAL: This Constructor is used to create an ObjectReferenceChangeRecord With an owner -
Method Summary
Modifier and TypeMethodDescriptionADVANCED: Returns the new reference for this objectReturn the old value of the object reference.void
mergeRecord
(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet) INTERNAL: This method will be used to merge one record into anothervoid
setNewValue
(ObjectChangeSet newValue) This method sets the value of the change to be made.void
setNewValue
(ObjectChangeSet newValue) This method sets the value of the change to be made.void
setOldValue
(Object oldValue) Set the old value of the object reference.void
updateReferences
(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet) INTERNAL: This method will be used to update the objectsChangeSets referencesMethods 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 Details
-
newValue
This is the object change set that the attribute points to. -
oldValue
A reference to the old value must also be stored. This is only required for the commit and must never be serialized.
-
-
Constructor Details
-
ObjectReferenceChangeRecord
public ObjectReferenceChangeRecord()INTERNAL: This default constructor. -
ObjectReferenceChangeRecord
INTERNAL: This Constructor is used to create an ObjectReferenceChangeRecord With an owner
-
-
Method Details
-
getNewValue
ADVANCED: Returns the new reference for this object- Specified by:
getNewValue
in 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:
mergeRecord
in classChangeRecord
-
setNewValue
This method sets the value of the change to be made.- Parameters:
newValue
- ObjectChangeSet
-
setNewValue
This method sets the value of the change to be made. -
getOldValue
Return the old value of the object reference. This is used during the commit for private-owned references.- Specified by:
getOldValue
in interfaceChangeRecord
- Specified by:
getOldValue
in interfaceObjectReferenceChangeRecord
-
setOldValue
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:
updateReferences
in classChangeRecord
-