1 package org.prevayler.demos.demo2.business.transactions; 2 3 import java.util.Date ; 4 5 import org.prevayler.demos.demo2.business.Bank; 6 7 public class Transfer extends BankTransaction { 8 9 private long _originAccountNumber; 10 private long _destinationAccountNumber; 11 private long _amount; 12 13 14 private Transfer() {} public Transfer(long originAccountNumber, long destinationAccountNumber, long amount) { 16 _originAccountNumber = originAccountNumber; 17 _destinationAccountNumber = destinationAccountNumber; 18 _amount = amount; 19 } 20 21 22 public Object executeAndQuery(Bank bank, Date timestamp) throws Exception { 23 bank.transfer(_originAccountNumber, _destinationAccountNumber, _amount, timestamp); 24 return null; 25 } 26 27 } 28 | Popular Tags |