KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > ipanema > accounting > Accountant


1  /*
2  * Created on 27.10.2004
3  */

4 package com.nightlabs.ipanema.accounting;
5
6 import java.io.Serializable JavaDoc;
7
8 import com.nightlabs.ipanema.trade.LegalEntity;
9
10 /**
11  * An Accountant is responsible for splitting money into several accounts and for
12  * vetoing if a money transfer cannot be done. One Accountant can be responsible for an
13  * undefinite number of Account-s or for only one. The main job of the Accountant is
14  * to split amounts e.g. into certain taxes.
15  *
16  * @author Marco Schulze - marco at nightlabs dot de
17  *
18  * @jdo.persistence-capable
19  * identity-type = "application"
20  * objectid-class = "com.nightlabs.ipanema.accounting.id.AccountantID"
21  * detachable = "true"
22  *
23  * @jdo.inheritance strategy = "new-table"
24  */

25 public abstract class Accountant implements Serializable JavaDoc
26 {
27     /**
28      * @jdo.field primary-key="true"
29      * @jdo.column length="100"
30      */

31     private String JavaDoc organisationID;
32     /**
33      * @jdo.field primary-key="true"
34      * @jdo.column length="100"
35      */

36     private String JavaDoc accountantID;
37
38     protected Accountant() { }
39     public Accountant(String JavaDoc organisationID, String JavaDoc accountantID)
40     {
41         this.organisationID = organisationID;
42         this.accountantID = accountantID;
43     }
44
45     /**
46      * @return Returns the organisationID.
47      */

48     public String JavaDoc getOrganisationID()
49     {
50         return organisationID;
51     }
52     /**
53      * @return Returns the accountantID.
54      */

55     public String JavaDoc getAccountantID()
56     {
57         return accountantID;
58     }
59     public abstract void bookTransfer(LegalEntity mandator, MoneyTransfer transfer);
60 }
61
Popular Tags