public interface ChangeSummary
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ChangeSummary.Setting
|
| Modifier and Type | Method and Description |
|---|---|
void |
beginLogging()
Clears the List of
changes and turns change
logging on. |
void |
endLogging()
An implementation that requires logging may throw an
UnsupportedOperationException.
|
List<DataObject> |
getChangedDataObjects()
Returns a list consisting of all the
data objects that
have been changed while logging. |
DataGraph |
getDataGraph()
Returns the
data graph associated with this change
summary or null. |
DataObject |
getOldContainer(DataObject dataObject)
|
Property |
getOldContainmentProperty(DataObject dataObject)
Returns the value of the
containment property data object property at the point when logging
began. |
Sequence |
getOldSequence(DataObject dataObject)
|
ChangeSummary.Setting |
getOldValue(DataObject dataObject,
Property property)
|
List<ChangeSummary.Setting> |
getOldValues(DataObject dataObject)
|
DataObject |
getRootObject()
Returns the ChangeSummary root DataObject - the object from which changes
are tracked.
|
boolean |
isCreated(DataObject dataObject)
Returns whether or not the specified data object was created while
logging. |
boolean |
isDeleted(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(DataObject dataObject)
Returns whether or not the specified data object was updated while
logging. |
void |
undoChanges()
This method is intended for use by service implementations only.
|
boolean isLogging()
true) or off (
false).true if change logging is on.beginLogging(),
endLogging()DataGraph getDataGraph()
data graph associated with this change
summary or null.DataGraph.getChangeSummary()List<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.
isCreated(DataObject),
isDeleted(DataObject),
isModified(DataObject)boolean isCreated(DataObject dataObject)
logging. Any object that was added to the scope but was
not in the scope when logging began, will be considered created.dataObject - the data object in question.true if the specified data object was created.getChangedDataObjects()boolean isDeleted(DataObject dataObject)
logging. Any object that is not in scope but was in
scope when logging began will be considered deleted.dataObject - the data object in question.true if the specified data object was deleted.getChangedDataObjects()List<ChangeSummary.Setting> getOldValues(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.
dataObject - the object in question.getChangedDataObjects()void beginLogging()
changes and turns change
logging on. No operation occurs if logging is already on.endLogging(),
isLogging()void endLogging()
beginLogging(),
isLogging()boolean isModified(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.
dataObject - the data object in question.true if the specified data object was modified.getChangedDataObjects()DataObject getRootObject()
ChangeSummary.Setting getOldValue(DataObject dataObject, 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.
dataObject - the object in question.property - the property of the object.getChangedDataObjects()DataObject getOldContainer(DataObject dataObject)
dataObject - the object in question.Property getOldContainmentProperty(DataObject dataObject)
containment property data object property at the point when logging
began.dataObject - the object in question.Sequence getOldSequence(DataObject dataObject)
dataObject - the object in question.void undoChanges()
beginLogging(),
endLogging(),
isLogging()Copyright © 2021. All rights reserved.