com.ibm.etill.framework.archive
Class CommitPoint

java.lang.Object
  |
  +--com.ibm.etill.framework.archive.CommitPoint
All Implemented Interfaces:
Commitable

public class CommitPoint
extends Object
implements Commitable


Constructor Summary
CommitPoint()
           
 
Method Summary
 void addToBoundOrders(Order order)
          Deprecated.  
 void addToCreateList(Archivable newItem)
          Adds an Archivable object to the list of objects to be created.
 void addToDeleteList(Archivable newItem)
          Adds an Archivable object to the list of objects to be deleted
 void addToEventList(PSEvent event)
          Adds an PSEvent object to the list of events to be generated when the next commit occurs.
 void addToRestoreList(Restorable newItem)
          Adds an Archivable object to the list of objects to be restored.
 void addToUpdateList(Archivable newItem)
          Adds an Archivable object to the list of objects to be updated.
 void commit()
          Causes all the collected Archivable objects to be commited to the database and notifications to be generated for all of the collected PSEvent objects.
 void noCommit()
          Causes all the Restorable objects on the restoreList to be restored from the database.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommitPoint

public CommitPoint()
Method Detail

addToCreateList

public void addToCreateList(Archivable newItem)
Adds an Archivable object to the list of objects to be created.
Specified by:
addToCreateList in interface Commitable
Parameters:
newItem - The item to create in the database upon the next commit. This will be accomplished by calling the object's createRecord method when this Commitable object's commit is invoked.

addToUpdateList

public void addToUpdateList(Archivable newItem)
Adds an Archivable object to the list of objects to be updated.
Specified by:
addToUpdateList in interface Commitable
Parameters:
newItem - The item to be updated in the database upon the next commit. This will be accomplished by calling the object's updateRecord method when this Commitable object's commit is invoked.

addToDeleteList

public void addToDeleteList(Archivable newItem)
Adds an Archivable object to the list of objects to be deleted
Specified by:
addToDeleteList in interface Commitable
Parameters:
newItem - The item to be deleted in the database upon the next commit. This will be accomplished by calling the object's deleteRecord method when this Commitable object's commit is invoked.

addToRestoreList

public void addToRestoreList(Restorable newItem)
Adds an Archivable object to the list of objects to be restored.
Parameters:
newItem - The item to be restored from the database upon the next noCommit. This will be accomplished by calling the object's restoreRecord method when this Commitable object's noCommit is invoked.

addToEventList

public void addToEventList(PSEvent event)
Adds an PSEvent object to the list of events to be generated when the next commit occurs.
Parameters:
event - The PSEvent object to be generated upon the next commit.

commit

public void commit()
Causes all the collected Archivable objects to be commited to the database and notifications to be generated for all of the collected PSEvent objects. Specifically:
Specified by:
commit in interface Commitable
Throws:
ETillFrameworkException - Thrown if the commit fails.

noCommit

public void noCommit()
Causes all the Restorable objects on the restoreList to be restored from the database. No events are generated. The create, update, and delete lists of Archivable objects are cleared.
Specified by:
noCommit in interface Commitable
Throws:
ETillFrameworkException - Thrown if the commit fails.

addToBoundOrders

public void addToBoundOrders(Order order)
Deprecated.  

Deprecated function that doesn't do anything.
Specified by:
addToBoundOrders in interface Commitable