org.modelsphere.jack.baseDb.db
Class DbUpdateCommand

java.lang.Object
  extended by org.modelsphere.jack.baseDb.db.DbUpdateCommand
Direct Known Subclasses:
DbReinsertCommand, DbSetCommand, DbSetRelationNNCommand

public abstract class DbUpdateCommand
extends java.lang.Object

Super class for all transaction's commands. For each update occurring inside a transaction, a command object is added to the transaction object. Sub classes are required to store a new and old value for undo redo operations. The object for which the update applies can't be used for holding these values since many changes can occur on the same object-property within the same transaction.

See Also:
DbTransaction

Constructor Summary
DbUpdateCommand()
           
 
Method Summary
abstract  void redo()
          Reapply the new value on the object.
abstract  void undo()
          Set the old value on the object to restore its previous state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbUpdateCommand

public DbUpdateCommand()
Method Detail

undo

public abstract void undo()
                   throws DbException
Set the old value on the object to restore its previous state.

Throws:
DbException

redo

public abstract void redo()
                   throws DbException
Reapply the new value on the object.

Throws:
DbException


Open ModelSphere 2007. All Rights Reserved.