KickJava   Java API By Example, From Geeks To Geeks.

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


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 public class Withdrawal extends AccountTransaction {
9
10     protected long _amount;
11
12     private Withdrawal() {} //Necessary for Skaringa XML serialization
13
public Withdrawal(Account account, long amount) {
14         super(account);
15         _amount = amount;
16     }
17
18     public void executeAndQuery(Account account, Date JavaDoc timestamp) throws Account.InvalidAmount {
19         account.withdraw(_amount, timestamp);
20     }
21 }
22
Popular Tags