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 CommandManager
commandManager
protected boolean
committed
-
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 void
cancel()
Cancel the transaction.void
commit()
Commit the transaction.protected abstract void
doCancel()
protected abstract void
doExecute()
protected abstract void
doUndo()
void
execute()
void
move(int xd, int yd)
void
undo()
-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, merge, 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)
-
-