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
FieldsModifier and TypeFieldDescriptionprotected ObjectChangeSetThis is the object change set that the attribute points to.protected ObjectA reference to the old value must also be stored.Fields inherited from class org.eclipse.persistence.internal.sessions.ChangeRecord
attribute, mapping, owner -
Constructor Summary
ConstructorsConstructorDescriptionINTERNAL: 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.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 referencesMethods inherited from class org.eclipse.persistence.internal.sessions.ChangeRecord
getAttribute, getMapping, getOwner, prepareForSynchronization, setAttribute, setMapping, setOwner, toString, updateChangeRecordWithNewValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
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
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:
getOldValuein interfaceChangeRecord- Specified by:
getOldValuein 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:
updateReferencesin classChangeRecord
-