public abstract class ChangeRecord extends Object implements Serializable, ChangeRecord
Purpose: This class was designed as a superclass to all possible Change Record types. These Change Records holds the changes made to the objects
prototype.changeset.CollectionChangeRecord,prototype.changeset.DirectToFieldChangeRecord,prototype.changeset.SingleObjectChangeRecord
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected String |
attribute
This is the attribute name that this change record represents
|
protected DatabaseMapping |
mapping
This attribute stores the mapping allong with the attribute so that the mapping does not need to be looked up
|
protected ObjectChangeSet |
owner
This is the object change set that holds this record
|
Constructor and Description |
---|
ChangeRecord() |
Modifier and Type | Method and Description |
---|---|
String |
getAttribute()
ADVANCED:
Returns the name of the attribute this ChangeRecord Represents
|
DatabaseMapping |
getMapping()
ADVANCED:
Returns the mapping for the attribute this ChangeRecord Represents
|
ObjectChangeSet |
getOwner()
Insert the method's description here.
|
abstract void |
mergeRecord(ChangeRecord mergeFromRecord,
UnitOfWorkChangeSet mergeToChangeSet,
UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL:
This method will be used to merge one record into another
|
void |
prepareForSynchronization(AbstractSession session)
INTERNAL:
Ensure this change record is ready to by sent remotely for cache synchronization
In general, this means setting the CacheSynchronizationType on any ObjectChangeSets
associated with this ChangeRecord
|
void |
setAttribute(String newValue)
Sets the name of the attribute that this Record represents
|
void |
setMapping(DatabaseMapping mapping)
Sets the mapping for the attribute that this Record represents
|
void |
setOwner(ObjectChangeSet newOwner)
INTERNAL:
This method is used to set the ObjectChangeSet that uses this Record in that Record
|
String |
toString() |
void |
updateChangeRecordWithNewValue(Object newValue)
INTERNAL:
used by the record to update the new value ignores the value in the default implementation
|
abstract void |
updateReferences(UnitOfWorkChangeSet mergeToChangeSet,
UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL:
This method will be used to update the objectsChangeSets references
|
protected String attribute
protected transient DatabaseMapping mapping
protected ObjectChangeSet owner
public String getAttribute()
getAttribute
in interface ChangeRecord
public DatabaseMapping getMapping()
public ObjectChangeSet getOwner()
getOwner
in interface ChangeRecord
public abstract void mergeRecord(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
public void prepareForSynchronization(AbstractSession session)
public void setAttribute(String newValue)
newValue
- java.lang.Stringpublic void setMapping(DatabaseMapping mapping)
public void setOwner(ObjectChangeSet newOwner)
newOwner
- prototype.changeset.ObjectChangeSet The changeSet that uses this recordpublic void updateChangeRecordWithNewValue(Object newValue)
public abstract void updateReferences(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
Copyright © 2022. All rights reserved.