org.prevayler.demos.memento
Class Account

java.lang.Object
  extended by org.prevayler.demos.memento.Account
All Implemented Interfaces:
Serializable

public class Account
extends Object
implements Serializable

The Account class without the notification to listeners and including a memento.

See Also:
Serialized Form

Nested Class Summary
 class Account.InvalidAmount
           
 class Account.InvalidHolder
           
 
Method Summary
 long balance()
           
 void createMemento(MementoCollector collector)
          Create a memento of the current state.
 void deposit(long amount, Date timestamp)
           
 String holder()
           
 void holder(String holder)
           
 long number()
           
 String numberString()
           
 String toString()
           
 List transactionHistory()
           
 void withdraw(long amount, Date timestamp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createMemento

public void createMemento(MementoCollector collector)
Create a memento of the current state.


number

public long number()

toString

public String toString()
Overrides:
toString in class Object

numberString

public String numberString()

holder

public String holder()

holder

public void holder(String holder)
            throws Account.InvalidHolder
Throws:
Account.InvalidHolder

balance

public long balance()

deposit

public void deposit(long amount,
                    Date timestamp)
             throws Account.InvalidAmount
Throws:
Account.InvalidAmount

withdraw

public void withdraw(long amount,
                     Date timestamp)
              throws Account.InvalidAmount
Throws:
Account.InvalidAmount

transactionHistory

public List transactionHistory()


Copyright © 2001-2013. All Rights Reserved.