|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.plasma.sdo.core.CoreChangeSummary
public class CoreChangeSummary
A change summary is used to record changes to DataObjects, allowing applications to efficiently and incrementally update back-end storage when required.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface commonj.sdo.ChangeSummary |
|---|
ChangeSummary.Setting |
| Constructor Summary | |
|---|---|
CoreChangeSummary(PlasmaDataGraph dataGraph)
|
|
| Method Summary | |
|---|---|
void |
beginLogging()
Clears the List of changes and turns change logging on. |
void |
clear(DataObject dataObject)
Removes all change information for the given data object within this change summary. |
void |
created(DataObject dataObject)
Register the given data object as a created object within this change summary. |
void |
deleted(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. |
java.util.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)
Returns the value of the container data object
at the point when logging began. |
Property |
getOldContainmentProperty(DataObject dataObject)
Returns the value of the containment property data object property
at the point when logging began. |
Sequence |
getOldSequence(DataObject dataObject)
Returns the value of the sequence for the data object
at the point when logging began. |
ChangeSummary.Setting |
getOldValue(DataObject dataObject,
Property property)
Returns a setting for the specified property
representing the property value of the given dataObject
at the point when logging began. |
java.util.List<ChangeSummary.Setting> |
getOldValues(DataObject dataObject)
Returns a list of settings
that represent the property values of the given dataObject
at the point when logging began. |
int |
getPathDepth(DataObject dataObject)
Returns the path depth within the data graph for the given data object. |
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 |
modified(DataObject dataObject,
Property property,
java.lang.Object value)
Register the given data object as a modified object within this change summary for the given property. |
java.lang.String |
toString()
|
void |
undoChanges()
This method is intended for use by service implementations only. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CoreChangeSummary(PlasmaDataGraph dataGraph)
| Method Detail |
|---|
public void created(DataObject dataObject)
PlasmaChangeSummary
created in interface PlasmaChangeSummarydataObject - the created data objectpublic void deleted(DataObject dataObject)
PlasmaChangeSummary
deleted in interface PlasmaChangeSummarydataObject - the deleted data object
public void modified(DataObject dataObject,
Property property,
java.lang.Object value)
PlasmaChangeSummary
modified in interface PlasmaChangeSummarydataObject - the modified data objectproperty - the modified propertyvalue - the previous value for the given propertypublic void clear(DataObject dataObject)
PlasmaChangeSummary
clear 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 ChangeSummaryendLogging(),
isLogging()public void endLogging()
endLogging in interface ChangeSummarybeginLogging(),
isLogging()public java.util.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.
getChangedDataObjects in interface ChangeSummaryisCreated(DataObject),
isDeleted(DataObject),
isModified(DataObject)public DataGraph getDataGraph()
data graph associated with this change summary or null.
getDataGraph in interface ChangeSummaryDataGraph.getChangeSummary()public DataObject getOldContainer(DataObject dataObject)
container data object
at the point when logging began.
getOldContainer in interface ChangeSummarydataObject - the object in question.
public Property getOldContainmentProperty(DataObject dataObject)
containment property data object property
at the point when logging began.
getOldContainmentProperty in interface ChangeSummarydataObject - the object in question.
public Sequence getOldSequence(DataObject dataObject)
sequence for the data object
at the point when logging began.
getOldSequence in interface ChangeSummarydataObject - the object in question.
public 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.
getOldValue in interface ChangeSummarydataObject - the object in question.property - the property of the object.
getChangedDataObjects()public java.util.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.
getOldValues in interface ChangeSummarydataObject - the object in question.
getChangedDataObjects()public DataObject getRootObject()
getRootObject in interface ChangeSummarypublic 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.
isCreated in interface ChangeSummarydataObject - the data object in question.
true if the specified data object was created.getChangedDataObjects()public 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.
isModified in interface ChangeSummarydataObject - the data object in question.
true if the specified data object was modified.getChangedDataObjects()public boolean isDeleted(DataObject dataObject)
logging.
Any object that is not in scope but was in scope when logging began
will be considered deleted.
isDeleted in interface ChangeSummarydataObject - the data object in question.
true if the specified data object was deleted.getChangedDataObjects()public int getPathDepth(DataObject dataObject)
PlasmaChangeSummary
getPathDepth in interface PlasmaChangeSummarydataObject - the data object
public boolean isLogging()
true) or off (false).
isLogging in interface ChangeSummarytrue if change logging is on.beginLogging(),
endLogging()public void undoChanges()
undoChanges in interface ChangeSummarybeginLogging(),
endLogging(),
isLogging()public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||