KickJava   Java API By Example, From Geeks To Geeks.

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


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_Tax
9  ** @version $Id: X_C_Tax.java,v 1.26 2003/10/31 05:30:54 jjanke Exp $ **/

10 public class X_C_Tax extends PO
11 {
12 /** Standard Constructor **/
13 public X_C_Tax (Properties ctx, int C_Tax_ID)
14 {
15 super (ctx, C_Tax_ID);
16 /** if (C_Tax_ID == 0)
17 {
18 setC_TaxCategory_ID (0);
19 setC_Tax_ID (0);
20 setIsDefault (false);
21 setIsDocumentLevel (false);
22 setIsSummary (false);
23 setIsTaxExempt (false);
24 setName (null);
25 setRate (Env.ZERO);
26 setRequiresTaxCertificate (false);
27 setSOPOType (null);
28 setValidFrom (new Timestamp(System.currentTimeMillis()));
29 }
30  **/

31 }
32 /** Load Constructor **/
33 public X_C_Tax (Properties ctx, ResultSet rs)
34 {
35 super (ctx, rs);
36 }
37 /** Load Meta Data **/
38 protected POInfo initPO (Properties ctx)
39 {
40 int AD_Table_ID = 261;
41 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
42 return poi;
43 }
44 public String JavaDoc toString()
45 {
46 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_C_Tax[").append(getID()).append("]");
47 return sb.toString();
48 }
49 public void setC_Country_ID (int C_Country_ID)
50 {
51 if (C_Country_ID == 0) setValue ("C_Country_ID", null);
52  else
53 setValue ("C_Country_ID", new Integer JavaDoc(C_Country_ID));
54 }
55 public int getC_Country_ID()
56 {
57 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Country_ID");
58 if (ii == null) return 0;
59 return ii.intValue();
60 }
61 public void setC_Region_ID (int C_Region_ID)
62 {
63 if (C_Region_ID == 0) setValue ("C_Region_ID", null);
64  else
65 setValue ("C_Region_ID", new Integer JavaDoc(C_Region_ID));
66 }
67 public int getC_Region_ID()
68 {
69 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Region_ID");
70 if (ii == null) return 0;
71 return ii.intValue();
72 }
73 public void setC_TaxCategory_ID (int C_TaxCategory_ID)
74 {
75 setValue ("C_TaxCategory_ID", new Integer JavaDoc(C_TaxCategory_ID));
76 }
77 public int getC_TaxCategory_ID()
78 {
79 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_TaxCategory_ID");
80 if (ii == null) return 0;
81 return ii.intValue();
82 }
83 void setC_Tax_ID (int C_Tax_ID)
84 {
85 setValueNoCheck ("C_Tax_ID", new Integer JavaDoc(C_Tax_ID));
86 }
87 public int getC_Tax_ID()
88 {
89 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Tax_ID");
90 if (ii == null) return 0;
91 return ii.intValue();
92 }
93 public void setDescription (String JavaDoc Description)
94 {
95 setValue ("Description", Description);
96 }
97 public String JavaDoc getDescription()
98 {
99 return (String JavaDoc)getValue("Description");
100 }
101 public void setIsDefault (boolean IsDefault)
102 {
103 setValue ("IsDefault", new Boolean JavaDoc(IsDefault));
104 }
105 public boolean isDefault()
106 {
107 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsDefault");
108 if (bb != null) return bb.booleanValue();
109 return false;
110 }
111 public void setIsDocumentLevel (boolean IsDocumentLevel)
112 {
113 setValue ("IsDocumentLevel", new Boolean JavaDoc(IsDocumentLevel));
114 }
115 public boolean isDocumentLevel()
116 {
117 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsDocumentLevel");
118 if (bb != null) return bb.booleanValue();
119 return false;
120 }
121 public void setIsSummary (boolean IsSummary)
122 {
123 setValue ("IsSummary", new Boolean JavaDoc(IsSummary));
124 }
125 public boolean isSummary()
126 {
127 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsSummary");
128 if (bb != null) return bb.booleanValue();
129 return false;
130 }
131 public void setIsTaxExempt (boolean IsTaxExempt)
132 {
133 setValue ("IsTaxExempt", new Boolean JavaDoc(IsTaxExempt));
134 }
135 public boolean isTaxExempt()
136 {
137 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsTaxExempt");
138 if (bb != null) return bb.booleanValue();
139 return false;
140 }
141 public void setName (String JavaDoc Name)
142 {
143 if (Name == null) throw new IllegalArgumentException JavaDoc ("Name is mandatory");
144 setValue ("Name", Name);
145 }
146 public String JavaDoc getName()
147 {
148 return (String JavaDoc)getValue("Name");
149 }
150 public void setParent_Tax_ID (int Parent_Tax_ID)
151 {
152 if (Parent_Tax_ID == 0) setValue ("Parent_Tax_ID", null);
153  else
154 setValue ("Parent_Tax_ID", new Integer JavaDoc(Parent_Tax_ID));
155 }
156 public int getParent_Tax_ID()
157 {
158 Integer JavaDoc ii = (Integer JavaDoc)getValue("Parent_Tax_ID");
159 if (ii == null) return 0;
160 return ii.intValue();
161 }
162 public void setRate (BigDecimal Rate)
163 {
164 if (Rate == null) throw new IllegalArgumentException JavaDoc ("Rate is mandatory");
165 setValue ("Rate", Rate);
166 }
167 public BigDecimal getRate()
168 {
169 BigDecimal bd = (BigDecimal)getValue("Rate");
170 if (bd == null) return Env.ZERO;
171 return bd;
172 }
173 public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)
174 {
175 setValue ("RequiresTaxCertificate", new Boolean JavaDoc(RequiresTaxCertificate));
176 }
177 public boolean isRequiresTaxCertificate()
178 {
179 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("RequiresTaxCertificate");
180 if (bb != null) return bb.booleanValue();
181 return false;
182 }
183 public static final String JavaDoc SOPOTYPE_Both = "B";
184 public static final String JavaDoc SOPOTYPE_SalesTax = "S";
185 public static final String JavaDoc SOPOTYPE_PurchaseTax = "P";
186 public void setSOPOType (String JavaDoc SOPOType)
187 {
188 if (SOPOType.equals("B") || SOPOType.equals("S") || SOPOType.equals("P"));
189  else throw new IllegalArgumentException JavaDoc ("SOPOType Invalid value - Reference_ID=287 - B - S - P");
190 if (SOPOType == null) throw new IllegalArgumentException JavaDoc ("SOPOType is mandatory");
191 setValue ("SOPOType", SOPOType);
192 }
193 public String JavaDoc getSOPOType()
194 {
195 return (String JavaDoc)getValue("SOPOType");
196 }
197 public void setTaxIndicator (String JavaDoc TaxIndicator)
198 {
199 setValue ("TaxIndicator", TaxIndicator);
200 }
201 public String JavaDoc getTaxIndicator()
202 {
203 return (String JavaDoc)getValue("TaxIndicator");
204 }
205 public void setTo_Country_ID (int To_Country_ID)
206 {
207 if (To_Country_ID == 0) setValue ("To_Country_ID", null);
208  else
209 setValue ("To_Country_ID", new Integer JavaDoc(To_Country_ID));
210 }
211 public int getTo_Country_ID()
212 {
213 Integer JavaDoc ii = (Integer JavaDoc)getValue("To_Country_ID");
214 if (ii == null) return 0;
215 return ii.intValue();
216 }
217 public void setTo_Region_ID (int To_Region_ID)
218 {
219 if (To_Region_ID == 0) setValue ("To_Region_ID", null);
220  else
221 setValue ("To_Region_ID", new Integer JavaDoc(To_Region_ID));
222 }
223 public int getTo_Region_ID()
224 {
225 Integer JavaDoc ii = (Integer JavaDoc)getValue("To_Region_ID");
226 if (ii == null) return 0;
227 return ii.intValue();
228 }
229 public void setValidFrom (Timestamp ValidFrom)
230 {
231 if (ValidFrom == null) throw new IllegalArgumentException JavaDoc ("ValidFrom is mandatory");
232 setValue ("ValidFrom", ValidFrom);
233 }
234 public Timestamp getValidFrom()
235 {
236 return (Timestamp)getValue("ValidFrom");
237 }
238 }
239
Popular Tags