Package com.uppaal.model.core2
Class AbstractTransaction
- java.lang.Object
-
- com.uppaal.model.core2.AbstractCommand
-
- com.uppaal.model.core2.AbstractTransaction
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
AddAnchorCommand,ChangeAnchorCommand,ChangeMessageEndCommand,InsertEdgeCommand,InsertElementCommand,InsertMessageCommand,RemoveAnchorCommand,SetEndPointCommand,SetLengthCommand,TranslationCommand
public abstract class AbstractTransaction extends AbstractCommand
The abstract class transaction
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandManagercommandManagerprotected booleancommitted-
Fields inherited from class com.uppaal.model.core2.AbstractCommand
version
-
-
Constructor Summary
Constructors Constructor Description AbstractTransaction(CommandManager commandManager)Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancel the transaction.voidcommit()Commit the transaction.protected abstract voiddoCancel()protected abstract voiddoExecute()protected abstract voiddoUndo()voidexecute()voidmove(int xd, int yd)voidundo()-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, setVersion
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.uppaal.model.core2.Command
getModifiedElement
-
-
-
-
Field Detail
-
committed
protected boolean committed
-
commandManager
protected CommandManager commandManager
-
-
Constructor Detail
-
AbstractTransaction
public AbstractTransaction(CommandManager commandManager)
Constructor- Parameters:
commandManager- - The command manager
-
-
Method Detail
-
commit
public void commit()
Commit the transaction.
-
cancel
public void cancel()
Cancel the transaction.
-
doCancel
protected abstract void doCancel()
-
doExecute
protected abstract void doExecute()
-
doUndo
protected abstract void doUndo()
-
execute
public void execute()
-
undo
public void undo()
-
move
public void move(int xd, int yd)
-
-