org.modelsphere.jack.baseDb.db
Class DbSetCommand

java.lang.Object
  extended by org.modelsphere.jack.baseDb.db.DbUpdateCommand
      extended by org.modelsphere.jack.baseDb.db.DbSetCommand

public class DbSetCommand
extends DbUpdateCommand

This command class is used to record set(), setRelation11(), and setRelation1N() operations on a given DbObject.

See Also:
DbSetRelationNNCommand, Db.set(DbObject, MetaField, Object, Object, int, int)

Constructor Summary
DbSetCommand(DbObject anUpdatedObject, MetaField anUpdatedField, java.lang.Object anOldValue, java.lang.Object aNewValue, int anOldIndex, int aNewIndex)
           
 
Method Summary
 void redo()
          Reapply the new value on the object.
 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

DbSetCommand

public DbSetCommand(DbObject anUpdatedObject,
                    MetaField anUpdatedField,
                    java.lang.Object anOldValue,
                    java.lang.Object aNewValue,
                    int anOldIndex,
                    int aNewIndex)
Method Detail

undo

public final void undo()
                throws DbException
Description copied from class: DbUpdateCommand
Set the old value on the object to restore its previous state.

Specified by:
undo in class DbUpdateCommand
Throws:
DbException

redo

public final void redo()
                throws DbException
Description copied from class: DbUpdateCommand
Reapply the new value on the object.

Specified by:
redo in class DbUpdateCommand
Throws:
DbException


Open ModelSphere 2007. All Rights Reserved.