org.prevayler.demos.memento.commands
Class AccountDeletion

java.lang.Object
  extended by org.prevayler.util.memento.MementoTransaction
      extended by org.prevayler.demos.memento.commands.AccountDeletion
All Implemented Interfaces:
Serializable

public class AccountDeletion
extends MementoTransaction

See Also:
Serialized Form

Field Summary
protected  Bank bank
          Set by findObjects(...)
 
Constructor Summary
AccountDeletion(Account account)
           
 
Method Summary
protected  void checkPrecondition()
          Check the precondition.
protected  void createMementos(MementoCollector collector)
          Create mementos for all objects which (possibly) get modified.
protected  Account execute(MementoCollector collector)
          Execute the actual command.
protected  void findObjects(Bank prevalentSystem)
          Find the objects this command modifies.
 
Methods inherited from class org.prevayler.util.memento.MementoTransaction
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bank

protected transient Bank bank
Set by findObjects(...)

Constructor Detail

AccountDeletion

public AccountDeletion(Account account)
Method Detail

findObjects

protected void findObjects(Bank prevalentSystem)
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.

checkPrecondition

protected void checkPrecondition()
Description copied from class: MementoTransaction
Check the precondition.

Specified by:
checkPrecondition in class MementoTransaction

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 Bank.AccountNotFound
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:
Bank.AccountNotFound


Copyright © 2001-2013. All Rights Reserved.