KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > prevayler > demos > demo2 > business > transactions > Transfer


1 package org.prevayler.demos.demo2.business.transactions;
2
3 import java.util.Date JavaDoc;
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() {} //Necessary for Skaringa XML serialization
15
public Transfer(long originAccountNumber, long destinationAccountNumber, long amount) {
16         _originAccountNumber = originAccountNumber;
17         _destinationAccountNumber = destinationAccountNumber;
18         _amount = amount;
19     }
20
21
22     public Object JavaDoc executeAndQuery(Bank bank, Date JavaDoc timestamp) throws Exception JavaDoc {
23         bank.transfer(_originAccountNumber, _destinationAccountNumber, _amount, timestamp);
24         return null;
25     }
26
27 }
28
Popular Tags