KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > model > X_C_BankAccount


1 /** Generated Model - DO NOT CHANGE - Copyright (C) 1999-2003 Jorg Janke **/
2 package org.compiere.model;
3 import java.util.*;
4 import java.sql.*;
5 import java.math.*;
6 import java.io.Serializable JavaDoc;
7 import org.compiere.util.*;
8 /** Generated Model for C_BankAccount
9  ** @version $Id: X_C_BankAccount.java,v 1.27 2003/10/31 05:30:53 jjanke Exp $ **/

10 public class X_C_BankAccount extends PO
11 {
12 /** Standard Constructor **/
13 public X_C_BankAccount (Properties ctx, int C_BankAccount_ID)
14 {
15 super (ctx, C_BankAccount_ID);
16 /** if (C_BankAccount_ID == 0)
17 {
18 setAccountNo (null);
19 setBankAccountType (null);
20 setC_BankAccount_ID (0);
21 setC_Bank_ID (0);
22 setC_Currency_ID (0);
23 setCreditLimit (Env.ZERO);
24 setCurrentBalance (Env.ZERO);
25 setIsDefault (false);
26 }
27  **/

28 }
29 /** Load Constructor **/
30 public X_C_BankAccount (Properties ctx, ResultSet rs)
31 {
32 super (ctx, rs);
33 }
34 /** Load Meta Data **/
35 protected POInfo initPO (Properties ctx)
36 {
37 int AD_Table_ID = 297;
38 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
39 return poi;
40 }
41 public String JavaDoc toString()
42 {
43 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_C_BankAccount[").append(getID()).append("]");
44 return sb.toString();
45 }
46 public void setAccountNo (String JavaDoc AccountNo)
47 {
48 if (AccountNo == null) throw new IllegalArgumentException JavaDoc ("AccountNo is mandatory");
49 setValue ("AccountNo", AccountNo);
50 }
51 public String JavaDoc getAccountNo()
52 {
53 return (String JavaDoc)getValue("AccountNo");
54 }
55 public static final String JavaDoc BANKACCOUNTTYPE_Checking = "C";
56 public static final String JavaDoc BANKACCOUNTTYPE_Savings = "S";
57 public void setBankAccountType (String JavaDoc BankAccountType)
58 {
59 if (BankAccountType.equals("C") || BankAccountType.equals("S"));
60  else throw new IllegalArgumentException JavaDoc ("BankAccountType Invalid value - Reference_ID=216 - C - S");
61 if (BankAccountType == null) throw new IllegalArgumentException JavaDoc ("BankAccountType is mandatory");
62 setValue ("BankAccountType", BankAccountType);
63 }
64 public String JavaDoc getBankAccountType()
65 {
66 return (String JavaDoc)getValue("BankAccountType");
67 }
68 void setC_BankAccount_ID (int C_BankAccount_ID)
69 {
70 setValueNoCheck ("C_BankAccount_ID", new Integer JavaDoc(C_BankAccount_ID));
71 }
72 public int getC_BankAccount_ID()
73 {
74 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_BankAccount_ID");
75 if (ii == null) return 0;
76 return ii.intValue();
77 }
78 void setC_Bank_ID (int C_Bank_ID)
79 {
80 setValueNoCheck ("C_Bank_ID", new Integer JavaDoc(C_Bank_ID));
81 }
82 public int getC_Bank_ID()
83 {
84 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Bank_ID");
85 if (ii == null) return 0;
86 return ii.intValue();
87 }
88 public void setC_Currency_ID (int C_Currency_ID)
89 {
90 setValue ("C_Currency_ID", new Integer JavaDoc(C_Currency_ID));
91 }
92 public int getC_Currency_ID()
93 {
94 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Currency_ID");
95 if (ii == null) return 0;
96 return ii.intValue();
97 }
98 public void setCreditLimit (BigDecimal CreditLimit)
99 {
100 if (CreditLimit == null) throw new IllegalArgumentException JavaDoc ("CreditLimit is mandatory");
101 setValue ("CreditLimit", CreditLimit);
102 }
103 public BigDecimal getCreditLimit()
104 {
105 BigDecimal bd = (BigDecimal)getValue("CreditLimit");
106 if (bd == null) return Env.ZERO;
107 return bd;
108 }
109 public void setCurrentBalance (BigDecimal CurrentBalance)
110 {
111 if (CurrentBalance == null) throw new IllegalArgumentException JavaDoc ("CurrentBalance is mandatory");
112 setValue ("CurrentBalance", CurrentBalance);
113 }
114 public BigDecimal getCurrentBalance()
115 {
116 BigDecimal bd = (BigDecimal)getValue("CurrentBalance");
117 if (bd == null) return Env.ZERO;
118 return bd;
119 }
120 public void setIsDefault (boolean IsDefault)
121 {
122 setValue ("IsDefault", new Boolean JavaDoc(IsDefault));
123 }
124 public boolean isDefault()
125 {
126 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsDefault");
127 if (bb != null) return bb.booleanValue();
128 return false;
129 }
130 public void setStmtProcessorClass (String JavaDoc StmtProcessorClass)
131 {
132 setValue ("StmtProcessorClass", StmtProcessorClass);
133 }
134 public String JavaDoc getStmtProcessorClass()
135 {
136 return (String JavaDoc)getValue("StmtProcessorClass");
137 }
138 }
139
Free Books   Free Magazines  
Popular Tags