Package org.prevayler.util.memento

Examples of org.prevayler.util.memento.MementoTransaction


  protected void createMementos(MementoCollector collector) {
  }

  protected Account execute(MementoCollector collector) throws Exception {
    MementoTransaction command = new Withdrawal(sourceNumber, amount);
    command.execute(collector, bank);

    command = new Deposit(destinationNumber, amount);
    command.execute(collector, bank);

    return null;
  }
View Full Code Here


  public static void run() throws Exception {
    Account account1 = null, account2 = null;

    System.out.println("*** Creating account 1");
    MementoTransaction command = new AccountCreation("Owner 1");
    account1 = execute(command);

    System.out.println("*** Creating account 2");
    command = new AccountCreation("Owner 2");
    account2 = execute(command);
View Full Code Here

TOP

Related Classes of org.prevayler.util.memento.MementoTransaction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.