KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.prevayler.demos.demo2.business.transactions;
2
3 import java.util.Date JavaDoc;
4
5 import org.prevayler.demos.demo2.business.*;
6
7
8 abstract class AccountTransaction extends BankTransaction {
9
10     private long _accountNumber;
11
12
13     AccountTransaction() {} //Necessary for Skaringa XML serialization. This would normally be private, but must be package visible (or protected) in this case in order for subclasses to supply private default constructors and actually compile.
14
protected AccountTransaction(Account account) {
15         _accountNumber = account.number();
16     }
17
18     protected Object JavaDoc executeAndQuery(Bank bank, Date JavaDoc timestamp) throws Exception JavaDoc {
19         executeAndQuery(bank.findAccount(_accountNumber), timestamp);
20         return null;
21     }
22
23     protected abstract void executeAndQuery(Account account, Date JavaDoc timestamp) throws Exception JavaDoc;
24 }
Popular Tags