FileDocCategorySizeDatePackage
AggregateChangeRecord.javaAPI DocGlassfish v2 API5132Tue May 22 16:54:42 BST 2007oracle.toplink.essentials.internal.sessions

AggregateChangeRecord

public class AggregateChangeRecord extends ChangeRecord implements AggregateChangeRecord
This change Record is used to record the changes for AggregateObjectMapping.

Fields Summary
protected ObjectChangeSet
changedObject
Constructors Summary
public AggregateChangeRecord()
This default constructor is reference internally by SDK XML project to mapp this class

        super();
    
public AggregateChangeRecord(ObjectChangeSet owner)
This constructor returns an ChangeRecord representing. an AggregateMapping.

param
owner prototype.changeset.ObjectChangeSet represents the changeSet that uses this record

        this.owner = owner;
    
Methods Summary
public oracle.toplink.essentials.changesets.ObjectChangeSetgetChangedObject()
ADVANCED: This method is used to return the ObjectChangeSet representing the changed Aggregate.

return
prototype.changeset.ObjectChanges

        return changedObject;
    
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

        if (this.changedObject == null) {
            this.changedObject = ((AggregateChangeRecord)mergeFromRecord).getChangedObject();
            if(this.changedObject == null) {
                return;
            } else {
                mergeToChangeSet.addObjectChangeSetForIdentity((ObjectChangeSet)this.changedObject, mergeFromChangeSet.getUOWCloneForObjectChangeSet(this.changedObject));
                ((ObjectChangeSet)this.changedObject).updateReferences(mergeToChangeSet, mergeFromChangeSet);
                return;
            }
        }
        ((ObjectChangeSet)this.changedObject).mergeObjectChanges((ObjectChangeSet)((AggregateChangeRecord)mergeFromRecord).getChangedObject(), mergeToChangeSet, mergeFromChangeSet);
    
public voidsetChangedObject(oracle.toplink.essentials.changesets.ObjectChangeSet newValue)
INTERNAL: This method is used to set the changed value or values

param
newValue prototype.changeset.ObjectChanges

        changedObject = newValue;
    
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 If this is an aggregate change set then there is no need to update the reference as the ChangeSet has no identity outside of this record Check to see if it exists here already to prevent us from creating a little extra garbage.

        Object localChangeSet = mergeToChangeSet.getUOWCloneForObjectChangeSet(this.changedObject);
        if (localChangeSet == null) {
            mergeToChangeSet.addObjectChangeSetForIdentity((ObjectChangeSet)this.changedObject, mergeFromChangeSet.getUOWCloneForObjectChangeSet(this.changedObject));
        }