KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > ebank > util > AccountDetails


1 /*
2  * Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved. U.S.
3  * Government Rights - Commercial software. Government users are subject
4  * to the Sun Microsystems, Inc. standard license agreement and
5  * applicable provisions of the FAR and its supplements. Use is subject
6  * to license terms.
7  *
8  * This distribution may include materials developed by third parties.
9  * Sun, Sun Microsystems, the Sun logo, Java and J2EE are trademarks
10  * or registered trademarks of Sun Microsystems, Inc. in the U.S. and
11  * other countries.
12  *
13  * Copyright (c) 2004 Sun Microsystems, Inc. Tous droits reserves.
14  *
15  * Droits du gouvernement americain, utilisateurs gouvernementaux - logiciel
16  * commercial. Les utilisateurs gouvernementaux sont soumis au contrat de
17  * licence standard de Sun Microsystems, Inc., ainsi qu'aux dispositions
18  * en vigueur de la FAR (Federal Acquisition Regulations) et des
19  * supplements a celles-ci. Distribue par des licences qui en
20  * restreignent l'utilisation.
21  *
22  * Cette distribution peut comprendre des composants developpes par des
23  * tierces parties. Sun, Sun Microsystems, le logo Sun, Java et J2EE
24  * sont des marques de fabrique ou des marques deposees de Sun
25  * Microsystems, Inc. aux Etats-Unis et dans d'autres pays.
26  */

27
28
29 package com.sun.ebank.util;
30
31 import java.math.BigDecimal JavaDoc;
32 import java.util.Date JavaDoc;
33 import java.util.ArrayList JavaDoc;
34
35
36 /**
37  * This class holds the details of a bank account entity.
38  * It contains getters and setters for each variable.
39  */

40 public class AccountDetails implements java.io.Serializable JavaDoc {
41     private String JavaDoc accountId;
42     private String JavaDoc type;
43     private String JavaDoc description;
44     private BigDecimal JavaDoc balance;
45     private BigDecimal JavaDoc creditLine;
46     private BigDecimal JavaDoc beginBalance;
47     private Date JavaDoc beginBalanceTimeStamp;
48     private ArrayList JavaDoc customerIds;
49
50     public AccountDetails(String JavaDoc accountId, String JavaDoc type, String JavaDoc description,
51         BigDecimal JavaDoc balance, BigDecimal JavaDoc creditLine, BigDecimal JavaDoc beginBalance,
52         Date JavaDoc beginBalanceTimeStamp, ArrayList JavaDoc customerIds) {
53         this.accountId = accountId;
54         this.type = type;
55         this.description = description;
56         this.balance = balance;
57         this.creditLine = creditLine;
58         this.beginBalance = beginBalance;
59         this.beginBalanceTimeStamp = beginBalanceTimeStamp;
60         this.customerIds = customerIds;
61     }
62
63     // getters
64
public String JavaDoc getAccountId() {
65         return accountId;
66     }
67
68     public String JavaDoc getDescription() {
69         return description;
70     }
71
72     public String JavaDoc getType() {
73         return type;
74     }
75
76     public BigDecimal JavaDoc getBalance() {
77         return balance;
78     }
79
80     public BigDecimal JavaDoc getCreditLine() {
81         return creditLine;
82     }
83
84     public BigDecimal JavaDoc getBeginBalance() {
85         return beginBalance;
86     }
87
88     public Date JavaDoc getBeginBalanceTimeStamp() {
89         return beginBalanceTimeStamp;
90     }
91
92     public ArrayList JavaDoc getCustomerIds() {
93         return customerIds;
94     }
95
96     public BigDecimal JavaDoc getRemainingCredit() {
97         return creditLine.subtract(balance);
98     }
99
100     // setters
101
public void setAccountId(String JavaDoc accountId) {
102         this.accountId = accountId;
103     }
104
105     public void setType(String JavaDoc type) {
106         this.type = type;
107     }
108
109     public void setDescription(String JavaDoc description) {
110         this.description = description;
111     }
112
113     public void setBalance(BigDecimal JavaDoc balance) {
114         this.balance = balance;
115     }
116
117     public void setCreditLine(BigDecimal JavaDoc creditLine) {
118         this.creditLine = creditLine;
119     }
120
121     public void setBeginBalance(BigDecimal JavaDoc beginBalance) {
122         this.beginBalance = beginBalance;
123     }
124
125     public void setBeginBalanceTimeStamp(Date JavaDoc beginBalanceTimeStamp) {
126         this.beginBalanceTimeStamp = beginBalanceTimeStamp;
127     }
128
129     public void setCustomerIds(ArrayList JavaDoc customerIds) {
130         this.customerIds = customerIds;
131     }
132 }
133  // AccountDetails
134
Popular Tags