Class ChangeRecord
- java.lang.Object
-
- org.eclipse.persistence.internal.sessions.ChangeRecord
-
- All Implemented Interfaces:
Serializable
,ChangeRecord
- Direct Known Subclasses:
AggregateChangeRecord
,DeferrableChangeRecord
,DirectToFieldChangeRecord
,ObjectReferenceChangeRecord
,TransformationMappingChangeRecord
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
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
attribute
This is the attribute name that this change record representsprotected DatabaseMapping
mapping
This attribute stores the mapping along with the attribute so that the mapping does not need to be looked upprotected ObjectChangeSet
owner
This is the object change set that holds this record
-
Constructor Summary
Constructors Constructor Description ChangeRecord()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getAttribute()
ADVANCED: Returns the name of the attribute this ChangeRecord RepresentsDatabaseMapping
getMapping()
ADVANCED: Returns the mapping for the attribute this ChangeRecord RepresentsObjectChangeSet
getOwner()
ADVANCED: This method returns the ObjectChangeSet that references this ChangeRecordabstract void
mergeRecord(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method will be used to merge one record into anothervoid
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 ChangeRecordvoid
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 representsvoid
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 implementationabstract void
updateReferences(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method will be used to update the objectsChangeSets references-
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
getOldValue
-
-
-
-
Field Detail
-
attribute
protected String attribute
This is the attribute name that this change record represents
-
mapping
protected transient DatabaseMapping mapping
This attribute stores the mapping along with the attribute so that the mapping does not need to be looked up
-
owner
protected ObjectChangeSet owner
This is the object change set that holds this record
-
-
Method Detail
-
getAttribute
public String getAttribute()
ADVANCED: Returns the name of the attribute this ChangeRecord Represents- Specified by:
getAttribute
in interfaceChangeRecord
- Returns:
- String
-
getMapping
public DatabaseMapping getMapping()
ADVANCED: Returns the mapping for the attribute this ChangeRecord Represents
-
getOwner
public ObjectChangeSet getOwner()
Description copied from interface:ChangeRecord
ADVANCED: This method returns the ObjectChangeSet that references this ChangeRecord- Specified by:
getOwner
in interfaceChangeRecord
- Returns:
- org.eclipse.persistence.sessions.changesets.ObjectChangeSet
-
mergeRecord
public abstract void mergeRecord(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method will be used to merge one record into another
-
prepareForSynchronization
public 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
-
setAttribute
public void setAttribute(String newValue)
Sets the name of the attribute that this Record represents.
-
setMapping
public void setMapping(DatabaseMapping mapping)
Sets the mapping for the attribute that this Record represents
-
setOwner
public void setOwner(ObjectChangeSet newOwner)
INTERNAL: This method is used to set the ObjectChangeSet that uses this Record in that Record.- Parameters:
newOwner
- The changeSet that uses this record.
-
updateChangeRecordWithNewValue
public void updateChangeRecordWithNewValue(Object newValue)
INTERNAL: used by the record to update the new value ignores the value in the default implementation
-
updateReferences
public abstract void updateReferences(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL: This method will be used to update the objectsChangeSets references
-
-