KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_GL_Journal extends PO
11 {
12 /** Standard Constructor **/
13 public X_GL_Journal (Properties ctx, int GL_Journal_ID)
14 {
15 super (ctx, GL_Journal_ID);
16 /** if (GL_Journal_ID == 0)
17 {
18 setC_AcctSchema_ID (0);
19 setC_Currency_ID (0);
20 setC_DocType_ID (0);
21 setC_Period_ID (0);
22 setCurrencyRate (Env.ZERO);
23 setCurrencyRateType (null);
24 setDateAcct (new Timestamp(System.currentTimeMillis()));
25 setDateDoc (new Timestamp(System.currentTimeMillis()));
26 setDescription (null);
27 setDocAction (null);
28 setDocStatus (null);
29 setDocumentNo (null);
30 setGL_Category_ID (0);
31 setGL_Journal_ID (0);
32 setIsApproved (false);
33 setIsPrinted (false);
34 setPosted (false);
35 setPostingType (null);
36 setTotalCr (Env.ZERO);
37 setTotalDr (Env.ZERO);
38 }
39  **/

40 }
41 /** Load Constructor **/
42 public X_GL_Journal (Properties ctx, ResultSet rs)
43 {
44 super (ctx, rs);
45 }
46 /** Load Meta Data **/
47 protected POInfo initPO (Properties ctx)
48 {
49 int AD_Table_ID = 224;
50 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
51 return poi;
52 }
53 public String JavaDoc toString()
54 {
55 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_GL_Journal[").append(getID()).append("]");
56 return sb.toString();
57 }
58 void setC_AcctSchema_ID (int C_AcctSchema_ID)
59 {
60 setValueNoCheck ("C_AcctSchema_ID", new Integer JavaDoc(C_AcctSchema_ID));
61 }
62 public int getC_AcctSchema_ID()
63 {
64 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_AcctSchema_ID");
65 if (ii == null) return 0;
66 return ii.intValue();
67 }
68 public void setC_Currency_ID (int C_Currency_ID)
69 {
70 setValue ("C_Currency_ID", new Integer JavaDoc(C_Currency_ID));
71 }
72 public int getC_Currency_ID()
73 {
74 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Currency_ID");
75 if (ii == null) return 0;
76 return ii.intValue();
77 }
78 public void setC_DocType_ID (int C_DocType_ID)
79 {
80 setValue ("C_DocType_ID", new Integer JavaDoc(C_DocType_ID));
81 }
82 public int getC_DocType_ID()
83 {
84 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_DocType_ID");
85 if (ii == null) return 0;
86 return ii.intValue();
87 }
88 public void setC_Period_ID (int C_Period_ID)
89 {
90 setValue ("C_Period_ID", new Integer JavaDoc(C_Period_ID));
91 }
92 public int getC_Period_ID()
93 {
94 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Period_ID");
95 if (ii == null) return 0;
96 return ii.intValue();
97 }
98 public void setControlAmt (BigDecimal ControlAmt)
99 {
100 setValue ("ControlAmt", ControlAmt);
101 }
102 public BigDecimal getControlAmt()
103 {
104 BigDecimal bd = (BigDecimal)getValue("ControlAmt");
105 if (bd == null) return Env.ZERO;
106 return bd;
107 }
108 public void setCurrencyRate (BigDecimal CurrencyRate)
109 {
110 if (CurrencyRate == null) throw new IllegalArgumentException JavaDoc ("CurrencyRate is mandatory");
111 setValue ("CurrencyRate", CurrencyRate);
112 }
113 public BigDecimal getCurrencyRate()
114 {
115 BigDecimal bd = (BigDecimal)getValue("CurrencyRate");
116 if (bd == null) return Env.ZERO;
117 return bd;
118 }
119 public static final String JavaDoc CURRENCYRATETYPE_Spot = "S";
120 public static final String JavaDoc CURRENCYRATETYPE_PeriodEnd = "P";
121 public static final String JavaDoc CURRENCYRATETYPE_None = "N";
122 public static final String JavaDoc CURRENCYRATETYPE_Fixed = "F";
123 public static final String JavaDoc CURRENCYRATETYPE_Average = "A";
124 public static final String JavaDoc CURRENCYRATETYPE_Company = "C";
125 public static final String JavaDoc CURRENCYRATETYPE_UserType = "U";
126 public static final String JavaDoc CURRENCYRATETYPE_ManualRate = "M";
127 public void setCurrencyRateType (String JavaDoc CurrencyRateType)
128 {
129 if (CurrencyRateType.equals("S") || CurrencyRateType.equals("P") || CurrencyRateType.equals("N") || CurrencyRateType.equals("F") || CurrencyRateType.equals("A") || CurrencyRateType.equals("C") || CurrencyRateType.equals("U") || CurrencyRateType.equals("M"));
130  else throw new IllegalArgumentException JavaDoc ("CurrencyRateType Invalid value - Reference_ID=111 - S - P - N - F - A - C - U - M");
131 if (CurrencyRateType == null) throw new IllegalArgumentException JavaDoc ("CurrencyRateType is mandatory");
132 setValue ("CurrencyRateType", CurrencyRateType);
133 }
134 public String JavaDoc getCurrencyRateType()
135 {
136 return (String JavaDoc)getValue("CurrencyRateType");
137 }
138 public void setDateAcct (Timestamp DateAcct)
139 {
140 if (DateAcct == null) throw new IllegalArgumentException JavaDoc ("DateAcct is mandatory");
141 setValue ("DateAcct", DateAcct);
142 }
143 public Timestamp getDateAcct()
144 {
145 return (Timestamp)getValue("DateAcct");
146 }
147 public void setDateDoc (Timestamp DateDoc)
148 {
149 if (DateDoc == null) throw new IllegalArgumentException JavaDoc ("DateDoc is mandatory");
150 setValue ("DateDoc", DateDoc);
151 }
152 public Timestamp getDateDoc()
153 {
154 return (Timestamp)getValue("DateDoc");
155 }
156 public void setDescription (String JavaDoc Description)
157 {
158 if (Description == null) throw new IllegalArgumentException JavaDoc ("Description is mandatory");
159 setValue ("Description", Description);
160 }
161 public String JavaDoc getDescription()
162 {
163 return (String JavaDoc)getValue("Description");
164 }
165 public static final String JavaDoc DOCACTION_Process = "PR";
166 public static final String JavaDoc DOCACTION_Unlock = "XL";
167 public static final String JavaDoc DOCACTION_Complete = "CO";
168 public static final String JavaDoc DOCACTION_Approve = "AP";
169 public static final String JavaDoc DOCACTION_Reject = "RJ";
170 public static final String JavaDoc DOCACTION_Post = "PO";
171 public static final String JavaDoc DOCACTION_Void = "VO";
172 public static final String JavaDoc DOCACTION_Close = "CL";
173 public static final String JavaDoc DOCACTION_ReverseMinusCorrection = "RC";
174 public static final String JavaDoc DOCACTION_ReverseMinusAccrual = "RA";
175 public static final String JavaDoc DOCACTION_Transfer = "TR";
176 public static final String JavaDoc DOCACTION_ReMinusActivate = "RE";
177 public static final String JavaDoc DOCACTION_LeNoneGt = "--";
178 public void setDocAction (String JavaDoc DocAction)
179 {
180 if (DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("CO") || DocAction.equals("AP") || DocAction.equals("RJ") || DocAction.equals("PO") || DocAction.equals("VO") || DocAction.equals("CL") || DocAction.equals("RC") || DocAction.equals("RA") || DocAction.equals("TR") || DocAction.equals("RE") || DocAction.equals("--"));
181  else throw new IllegalArgumentException JavaDoc ("DocAction Invalid value - Reference_ID=135 - PR - XL - CO - AP - RJ - PO - VO - CL - RC - RA - TR - RE - --");
182 if (DocAction == null) throw new IllegalArgumentException JavaDoc ("DocAction is mandatory");
183 setValue ("DocAction", DocAction);
184 }
185 public String JavaDoc getDocAction()
186 {
187 return (String JavaDoc)getValue("DocAction");
188 }
189 public static final String JavaDoc DOCSTATUS_InProgress = "IP";
190 public static final String JavaDoc DOCSTATUS_WaitingPayment = "WP";
191 public static final String JavaDoc DOCSTATUS_Drafted = "DR";
192 public static final String JavaDoc DOCSTATUS_Completed = "CO";
193 public static final String JavaDoc DOCSTATUS_Approved = "AP";
194 public static final String JavaDoc DOCSTATUS_Changed = "CH";
195 public static final String JavaDoc DOCSTATUS_NotApproved = "NA";
196 public static final String JavaDoc DOCSTATUS_TransferError = "TE";
197 public static final String JavaDoc DOCSTATUS_Printed = "PR";
198 public static final String JavaDoc DOCSTATUS_Transferred = "TR";
199 public static final String JavaDoc DOCSTATUS_Voided = "VO";
200 public static final String JavaDoc DOCSTATUS_Inactive = "IN";
201 public static final String JavaDoc DOCSTATUS_PostingError = "PE";
202 public static final String JavaDoc DOCSTATUS_Posted = "PO";
203 public static final String JavaDoc DOCSTATUS_Reversed = "RE";
204 public static final String JavaDoc DOCSTATUS_Closed = "CL";
205 public static final String JavaDoc DOCSTATUS_Unknown = "??";
206 public static final String JavaDoc DOCSTATUS_BeingProcessed = "XX";
207 void setDocStatus (String JavaDoc DocStatus)
208 {
209 if (DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("CH") || DocStatus.equals("NA") || DocStatus.equals("TE") || DocStatus.equals("PR") || DocStatus.equals("TR") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("PE") || DocStatus.equals("PO") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("XX"));
210  else throw new IllegalArgumentException JavaDoc ("DocStatus Invalid value - Reference_ID=131 - IP - WP - DR - CO - AP - CH - NA - TE - PR - TR - VO - IN - PE - PO - RE - CL - ?? - XX");
211 if (DocStatus == null) throw new IllegalArgumentException JavaDoc ("DocStatus is mandatory");
212 setValueNoCheck ("DocStatus", DocStatus);
213 }
214 public String JavaDoc getDocStatus()
215 {
216 return (String JavaDoc)getValue("DocStatus");
217 }
218 void setDocumentNo (String JavaDoc DocumentNo)
219 {
220 if (DocumentNo == null) throw new IllegalArgumentException JavaDoc ("DocumentNo is mandatory");
221 setValueNoCheck ("DocumentNo", DocumentNo);
222 }
223 public String JavaDoc getDocumentNo()
224 {
225 return (String JavaDoc)getValue("DocumentNo");
226 }
227 public void setGL_Budget_ID (int GL_Budget_ID)
228 {
229 if (GL_Budget_ID == 0) setValue ("GL_Budget_ID", null);
230  else
231 setValue ("GL_Budget_ID", new Integer JavaDoc(GL_Budget_ID));
232 }
233 public int getGL_Budget_ID()
234 {
235 Integer JavaDoc ii = (Integer JavaDoc)getValue("GL_Budget_ID");
236 if (ii == null) return 0;
237 return ii.intValue();
238 }
239 public void setGL_Category_ID (int GL_Category_ID)
240 {
241 setValue ("GL_Category_ID", new Integer JavaDoc(GL_Category_ID));
242 }
243 public int getGL_Category_ID()
244 {
245 Integer JavaDoc ii = (Integer JavaDoc)getValue("GL_Category_ID");
246 if (ii == null) return 0;
247 return ii.intValue();
248 }
249 void setGL_JournalBatch_ID (int GL_JournalBatch_ID)
250 {
251 if (GL_JournalBatch_ID == 0) setValueNoCheck ("GL_JournalBatch_ID", null);
252  else
253 setValueNoCheck ("GL_JournalBatch_ID", new Integer JavaDoc(GL_JournalBatch_ID));
254 }
255 public int getGL_JournalBatch_ID()
256 {
257 Integer JavaDoc ii = (Integer JavaDoc)getValue("GL_JournalBatch_ID");
258 if (ii == null) return 0;
259 return ii.intValue();
260 }
261 void setGL_Journal_ID (int GL_Journal_ID)
262 {
263 setValueNoCheck ("GL_Journal_ID", new Integer JavaDoc(GL_Journal_ID));
264 }
265 public int getGL_Journal_ID()
266 {
267 Integer JavaDoc ii = (Integer JavaDoc)getValue("GL_Journal_ID");
268 if (ii == null) return 0;
269 return ii.intValue();
270 }
271 void setIsApproved (boolean IsApproved)
272 {
273 setValueNoCheck ("IsApproved", new Boolean JavaDoc(IsApproved));
274 }
275 public boolean isApproved()
276 {
277 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsApproved");
278 if (bb != null) return bb.booleanValue();
279 return false;
280 }
281 void setIsPrinted (boolean IsPrinted)
282 {
283 setValueNoCheck ("IsPrinted", new Boolean JavaDoc(IsPrinted));
284 }
285 public boolean isPrinted()
286 {
287 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsPrinted");
288 if (bb != null) return bb.booleanValue();
289 return false;
290 }
291 void setPosted (boolean Posted)
292 {
293 setValueNoCheck ("Posted", new Boolean JavaDoc(Posted));
294 }
295 public boolean isPosted()
296 {
297 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("Posted");
298 if (bb != null) return bb.booleanValue();
299 return false;
300 }
301 public static final String JavaDoc POSTINGTYPE_Actual = "A";
302 public static final String JavaDoc POSTINGTYPE_Budget = "B";
303 public static final String JavaDoc POSTINGTYPE_Encumbrance = "E";
304 public static final String JavaDoc POSTINGTYPE_Statistical = "S";
305 public void setPostingType (String JavaDoc PostingType)
306 {
307 if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S"));
308  else throw new IllegalArgumentException JavaDoc ("PostingType Invalid value - Reference_ID=125 - A - B - E - S");
309 if (PostingType == null) throw new IllegalArgumentException JavaDoc ("PostingType is mandatory");
310 setValue ("PostingType", PostingType);
311 }
312 public String JavaDoc getPostingType()
313 {
314 return (String JavaDoc)getValue("PostingType");
315 }
316 public void setProcessed (boolean Processed)
317 {
318 setValue ("Processed", new Boolean JavaDoc(Processed));
319 }
320 public boolean isProcessed()
321 {
322 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("Processed");
323 if (bb != null) return bb.booleanValue();
324 return false;
325 }
326 public void setProcessing (String JavaDoc Processing)
327 {
328 setValue ("Processing", Processing);
329 }
330 public String JavaDoc getProcessing()
331 {
332 return (String JavaDoc)getValue("Processing");
333 }
334 void setTotalCr (BigDecimal TotalCr)
335 {
336 if (TotalCr == null) throw new IllegalArgumentException JavaDoc ("TotalCr is mandatory");
337 setValueNoCheck ("TotalCr", TotalCr);
338 }
339 public BigDecimal getTotalCr()
340 {
341 BigDecimal bd = (BigDecimal)getValue("TotalCr");
342 if (bd == null) return Env.ZERO;
343 return bd;
344 }
345 void setTotalDr (BigDecimal TotalDr)
346 {
347 if (TotalDr == null) throw new IllegalArgumentException JavaDoc ("TotalDr is mandatory");
348 setValueNoCheck ("TotalDr", TotalDr);
349 }
350 public BigDecimal getTotalDr()
351 {
352 BigDecimal bd = (BigDecimal)getValue("TotalDr");
353 if (bd == null) return Env.ZERO;
354 return bd;
355 }
356 }
357
Popular Tags