FileDocCategorySizeDatePackage
ObjectReferenceChangeRecord.javaAPI DocGlassfish v2 API5135Tue May 22 16:54:44 BST 2007oracle.toplink.essentials.internal.sessions

ObjectReferenceChangeRecord

public class ObjectReferenceChangeRecord extends ChangeRecord implements ObjectReferenceChangeRecord

Purpose: To record the changes for an attribute that references a single Object

see
RelatedClasses prototype.changeset.CollectionChangeRecord,prototype.changeset.SingleObjectChangeRecord

Fields Summary
protected ObjectChangeSet
newValue
This is the object change set that the attribute points to.
protected transient Object
oldValue
A reference to the old value must also be sotred. This is only required for the commit and must never be serialized.
Constructors Summary
public ObjectReferenceChangeRecord()
INTERNAL: This default constructor is reference internally by SDK XML project to mapp this class

        super();
    
public ObjectReferenceChangeRecord(ObjectChangeSet owner)
INTERNAL: This Constructor is used to create an ObjectReferenceChangeRecord With an owner

param
owner prototype.changeset.ObjectChangeSet

        this.owner = owner;
    
Methods Summary
public oracle.toplink.essentials.changesets.ObjectChangeSetgetNewValue()
ADVANCED: Returns the new reference for this object

return
prototype.changeset.ObjectChangeSet

        return newValue;
    
public java.lang.ObjectgetOldValue()
Return the old value of the object reference. This is used during the commit for private-owned references.

        return oldValue;
    
public voidmergeRecord(oracle.toplink.essentials.internal.sessions.ChangeRecord mergeFromRecord, oracle.toplink.essentials.internal.sessions.UnitOfWorkChangeSet mergeToChangeSet, oracle.toplink.essentials.internal.sessions.UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method will be used to merge one record into another

        ObjectChangeSet localChangeSet = mergeToChangeSet.findOrIntegrateObjectChangeSet((ObjectChangeSet)((ObjectReferenceChangeRecord)mergeFromRecord).getNewValue(), mergeFromChangeSet);
        this.newValue = localChangeSet;
    
public voidsetNewValue(oracle.toplink.essentials.changesets.ObjectChangeSet newValue)
This method sets the value of the change to be made.

param
newValue prototype.changeset.ObjectChangeSet

        this.newValue = (ObjectChangeSet)newValue;
    
public voidsetNewValue(oracle.toplink.essentials.internal.sessions.ObjectChangeSet newValue)
This method sets the value of the change to be made.

param
newValue prototype.changeset.ObjectChangeSet

        this.newValue = newValue;
    
public voidsetOldValue(java.lang.Object oldValue)
Set the old value of the object reference. This is used during the commit for private-owned references.

        this.oldValue = oldValue;
    
public voidupdateReferences(oracle.toplink.essentials.internal.sessions.UnitOfWorkChangeSet mergeToChangeSet, oracle.toplink.essentials.internal.sessions.UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method will be used to update the objectsChangeSets references

        this.setNewValue(mergeToChangeSet.findOrIntegrateObjectChangeSet((ObjectChangeSet)this.getNewValue(), mergeFromChangeSet));