org.prevayler.demos.memento.commands
Class Withdrawal
java.lang.Object
org.prevayler.util.memento.MementoTransaction
org.prevayler.demos.memento.commands.Withdrawal
- All Implemented Interfaces:
- Serializable
public class Withdrawal
- extends MementoTransaction
- See Also:
- Serialized Form
Constructor Summary |
Withdrawal(long accountNumber,
long amount)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Withdrawal
public Withdrawal(long accountNumber,
long amount)
findObjects
protected void findObjects(Bank prevalentSystem)
throws Exception
- Description copied from class:
MementoTransaction
- Find the objects this command modifies.
- Specified by:
findObjects
in class MementoTransaction
- Parameters:
prevalentSystem
- The prevalent system in which to find the objects.
- Throws:
Exception
checkPrecondition
protected void checkPrecondition()
throws Exception
- Description copied from class:
MementoTransaction
- Check the precondition.
- Specified by:
checkPrecondition
in class MementoTransaction
- Throws:
Exception
createMementos
protected void createMementos(MementoCollector collector)
- Description copied from class:
MementoTransaction
- Create mementos for all objects which (possibly) get modified.
- Specified by:
createMementos
in class MementoTransaction
- Parameters:
collector
- The memento collector to which to add the mementos.
execute
protected Account execute(MementoCollector collector)
throws Exception
- Description copied from class:
MementoTransaction
- Execute the actual command.
- Specified by:
execute
in class MementoTransaction
- Parameters:
collector
- The memento collector which can be used to execute subcommands.
- Returns:
- The object returned by the execution of this command. Most commands simply return null.
- Throws:
Exception
Copyright © 2001-2013. All Rights Reserved.