public class CoreChangeSummary extends Object implements PlasmaChangeSummary, Serializable
| Constructor and Description |
|---|
CoreChangeSummary(PlasmaDataGraph dataGraph) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginLogging()
Clears the List of
changes and turns change
logging on. |
void |
clear(commonj.sdo.DataObject dataObject)
Removes all change information for the given data object within this change
summary.
|
void |
created(commonj.sdo.DataObject dataObject)
Register the given data object as a created object within this change
summary.
|
void |
deleted(commonj.sdo.DataObject dataObject)
Register the given data object as a deleted object within this change
summary.
|
void |
endLogging()
An implementation that requires logging may throw an
UnsupportedOperationException.
|
List<commonj.sdo.DataObject> |
getChangedDataObjects()
Returns a list consisting of all the
data objects that
have been changed while logging. |
commonj.sdo.DataGraph |
getDataGraph()
Returns the
data graph associated with this change
summary or null. |
commonj.sdo.DataObject |
getOldContainer(commonj.sdo.DataObject dataObject)
Returns the value of the
container data
object at the point when logging began. |
commonj.sdo.Property |
getOldContainmentProperty(commonj.sdo.DataObject dataObject)
Returns the value of the
containment property data object property at the point when logging
began. |
commonj.sdo.Sequence |
getOldSequence(commonj.sdo.DataObject dataObject)
Returns the value of the
sequence for the
data object at the point when logging began. |
commonj.sdo.ChangeSummary.Setting |
getOldValue(commonj.sdo.DataObject dataObject,
commonj.sdo.Property property)
Returns a
setting for the specified property
representing the property value of the given dataObject at the
point when logging began. |
List<commonj.sdo.ChangeSummary.Setting> |
getOldValues(commonj.sdo.DataObject dataObject)
Returns a list of
settings that represent the
property values of the given dataObject at the point when
logging began. |
int |
getPathDepth(commonj.sdo.DataObject dataObject)
Returns the path depth within the data graph for the given data object.
|
commonj.sdo.DataObject |
getRootObject()
Returns the ChangeSummary root DataObject - the object from which changes
are tracked.
|
boolean |
isCreated(commonj.sdo.DataObject dataObject)
Returns whether or not the specified data object was created while
logging. |
boolean |
isDeleted(commonj.sdo.DataObject dataObject)
Returns whether or not the specified data object was deleted while
logging. |
boolean |
isLogging()
Indicates whether change logging is on (
true) or off (
false). |
boolean |
isModified(commonj.sdo.DataObject dataObject)
Returns whether or not the specified data object was updated while
logging. |
void |
modified(commonj.sdo.DataObject dataObject,
commonj.sdo.Property property,
Object value)
Register the given data object as a modified object within this change
summary for the given property.
|
String |
toString() |
void |
undoChanges()
This method is intended for use by service implementations only.
|
public CoreChangeSummary(PlasmaDataGraph dataGraph)
public void created(commonj.sdo.DataObject dataObject)
PlasmaChangeSummarycreated in interface PlasmaChangeSummarydataObject - the created data objectpublic void deleted(commonj.sdo.DataObject dataObject)
PlasmaChangeSummarydeleted in interface PlasmaChangeSummarydataObject - the deleted data objectpublic void modified(commonj.sdo.DataObject dataObject,
commonj.sdo.Property property,
Object value)
PlasmaChangeSummarymodified in interface PlasmaChangeSummarydataObject - the modified data objectproperty - the modified propertyvalue - the previous value for the given propertypublic void clear(commonj.sdo.DataObject dataObject)
PlasmaChangeSummaryclear in interface PlasmaChangeSummarydataObject - the data objectpublic void beginLogging()
changes and turns change
logging on. No operation occurs if logging is already on.beginLogging in interface commonj.sdo.ChangeSummaryendLogging(),
isLogging()public void endLogging()
endLogging in interface commonj.sdo.ChangeSummarybeginLogging(),
isLogging()public List<commonj.sdo.DataObject> getChangedDataObjects()
data objects that
have been changed while logging.
The new and modified objects in the
List are references to objects associated with this ChangeSummary. The
deleted objects in the List are references to objects at
the time that event logging was enabled;
Each changed object must have exactly one of the following methods return
true: isCreated, isDeleted, or
isModified.
getChangedDataObjects in interface commonj.sdo.ChangeSummaryisCreated(DataObject),
isDeleted(DataObject),
isModified(DataObject)public commonj.sdo.DataGraph getDataGraph()
data graph associated with this change
summary or null.getDataGraph in interface commonj.sdo.ChangeSummaryDataGraph.getChangeSummary()public commonj.sdo.DataObject getOldContainer(commonj.sdo.DataObject dataObject)
container data
object at the point when logging began.getOldContainer in interface commonj.sdo.ChangeSummarydataObject - the object in question.public commonj.sdo.Property getOldContainmentProperty(commonj.sdo.DataObject dataObject)
containment property data object property at the point when logging
began.getOldContainmentProperty in interface commonj.sdo.ChangeSummarydataObject - the object in question.public commonj.sdo.Sequence getOldSequence(commonj.sdo.DataObject dataObject)
sequence for the
data object at the point when logging began.getOldSequence in interface commonj.sdo.ChangeSummarydataObject - the object in question.public commonj.sdo.ChangeSummary.Setting getOldValue(commonj.sdo.DataObject dataObject,
commonj.sdo.Property property)
setting for the specified property
representing the property value of the given dataObject at the
point when logging began.
Returns null if the property was not modified and has not been
deleted.
getOldValue in interface commonj.sdo.ChangeSummarydataObject - the object in question.property - the property of the object.getChangedDataObjects()public List<commonj.sdo.ChangeSummary.Setting> getOldValues(commonj.sdo.DataObject dataObject)
settings that represent the
property values of the given dataObject at the point when
logging began.
In the case of a deleted object, the List
will include settings for all the Properties.
An old value setting indicates the value at the point logging begins. A
setting is only produced for modified objects if either
the old value differs from the current value or if the isSet differs from
the current value.
No settings are produced for created objects.
getOldValues in interface commonj.sdo.ChangeSummarydataObject - the object in question.getChangedDataObjects()public commonj.sdo.DataObject getRootObject()
getRootObject in interface commonj.sdo.ChangeSummarypublic boolean isCreated(commonj.sdo.DataObject dataObject)
logging. Any object that was added to the scope but was
not in the scope when logging began, will be considered created.isCreated in interface commonj.sdo.ChangeSummarydataObject - the data object in question.true if the specified data object was created.getChangedDataObjects()public boolean isModified(commonj.sdo.DataObject dataObject)
logging. An object that was contained in the scope when
logging began and remains in the scope when logging ends will be considered
potentially modified.
An object considered modified must have at least one old value setting.
isModified in interface commonj.sdo.ChangeSummarydataObject - the data object in question.true if the specified data object was modified.getChangedDataObjects()public boolean isDeleted(commonj.sdo.DataObject dataObject)
logging. Any object that is not in scope but was in
scope when logging began will be considered deleted.isDeleted in interface commonj.sdo.ChangeSummarydataObject - the data object in question.true if the specified data object was deleted.getChangedDataObjects()public int getPathDepth(commonj.sdo.DataObject dataObject)
PlasmaChangeSummarygetPathDepth in interface PlasmaChangeSummarydataObject - the data objectpublic boolean isLogging()
true) or off (
false).isLogging in interface commonj.sdo.ChangeSummarytrue if change logging is on.beginLogging(),
endLogging()public void undoChanges()
undoChanges in interface commonj.sdo.ChangeSummarybeginLogging(),
endLogging(),
isLogging()Copyright © 2021. All rights reserved.