org.prevayler.demos.memento.commands
Class Deposit
java.lang.Object
   org.prevayler.util.memento.MementoTransaction
org.prevayler.util.memento.MementoTransaction
       org.prevayler.demos.memento.commands.Deposit
org.prevayler.demos.memento.commands.Deposit
- All Implemented Interfaces: 
- Serializable
- public class Deposit 
- extends MementoTransaction
- See Also:
- Serialized Form
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
Deposit
public Deposit(Account account,
               long amount)
Deposit
public Deposit(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:
- findObjectsin class- MementoTransaction
 
- 
- Parameters:
- prevalentSystem- The prevalent system in which to find the objects.
- Throws:
- Exception
 
checkPrecondition
protected void checkPrecondition()
- Description copied from class: MementoTransaction
- Check the precondition.
 
- 
- Specified by:
- checkPreconditionin class- MementoTransaction
 
- 
 
createMementos
protected void createMementos(MementoCollector collector)
- Description copied from class: MementoTransaction
- Create mementos for all objects which (possibly) get modified.
 
- 
- Specified by:
- createMementosin 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:
- executein 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.