commonj.sdo
Interface ChangeSummary

All Known Subinterfaces:
EChangeSummary
All Known Implementing Classes:
EChangeSummaryImpl

public interface ChangeSummary

A change summary is used to record changes to the objects in a data graph, allowing applications to efficiently and incrementally update back-end storage when required.


Nested Class Summary
static interface ChangeSummary.Setting
          A setting encapsulates a property and a corresponding single value of the property's type.
 
Method Summary
 void beginLogging()
          Clears the list of changes and turns change logging on.
 void endLogging()
          Turns change logging off.
 java.util.List 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 log.
 java.util.List getOldValues(DataObject dataObject)
          Returns a list of settings that represent the property values of the given dataObject at the point when logging began.
 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).
 

Method Detail

beginLogging

void beginLogging()
Clears the list of changes and turns change logging on.

See Also:
endLogging(), isLogging()

endLogging

void endLogging()
Turns change logging off.

See Also:
beginLogging(), isLogging()

isLogging

boolean isLogging()
Indicates whether change logging is on (true) or off (false).

Returns:
true if change logging is on.
See Also:
beginLogging(), endLogging()

getDataGraph

DataGraph getDataGraph()
Returns the data graph associated with this change log.

Returns:
the data graph.
See Also:
DataGraph.getChangeSummary()

getChangedDataObjects

java.util.List getChangedDataObjects()
Returns a list consisting of all the data objects that have been changed while logging.

The new and modified objects in the list are references to objects that are contained in the data graph associated with this log. The deleted objects in the list are references to copies of the objects as they appeared at the time that event logging was first enabled; if the deleted objects have references to other objects, the references will also refer to copies of the target objects.

Returns:
a list of changed data objects.
See Also:
isCreated(DataObject), isDeleted(DataObject)

isCreated

boolean isCreated(DataObject dataObject)
Returns whether or not the specified data object was created while logging. Any object that was added to the data graph but was not contained in the data graph when logging began, will be considered created.

Parameters:
dataObject - the data object in question.
Returns:
true if the specified data object was created.
See Also:
getChangedDataObjects()

isDeleted

boolean isDeleted(DataObject dataObject)
Returns whether or not the specified data object was deleted while logging. Any object that is not contained by the data graph will be considered deleted.

Parameters:
dataObject - the data object in question.
Returns:
true if the specified data object was deleted.
See Also:
getChangedDataObjects()

getOldValues

java.util.List getOldValues(DataObject dataObject)
Returns a list of 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.

Parameters:
dataObject - the object in question.
Returns:
a list of settings.
See Also:
getChangedDataObjects()

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.