org.modelsphere.jack.baseDb.db
Class DbReinsertCommand

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

public class DbReinsertCommand
extends DbUpdateCommand

Command for reordering inside a relation (reinsert()). This command uses old and new indexes.

See Also:
Db.reinsert(DbRelationN, DbObject, int, int)

Constructor Summary
DbReinsertCommand(DbRelationN dbRelN, DbObject neighbor, int oldIndex, int newIndex)
           
 
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

DbReinsertCommand

public DbReinsertCommand(DbRelationN dbRelN,
                         DbObject neighbor,
                         int oldIndex,
                         int newIndex)
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.