KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_GL_JournalBatch extends PO
11 {
12 /** Standard Constructor **/
13 public X_GL_JournalBatch (Properties ctx, int GL_JournalBatch_ID)
14 {
15 super (ctx, GL_JournalBatch_ID);
16 /** if (GL_JournalBatch_ID == 0)
17 {
18 setDescription (null);
19 setDocumentNo (null);
20 setGL_JournalBatch_ID (0);
21 setPostingType (null);
22 setProcessed (false);
23 setProcessing (null);
24 setTotalCr (Env.ZERO);
25 setTotalDr (Env.ZERO);
26 }
27  **/

28 }
29 /** Load Constructor **/
30 public X_GL_JournalBatch (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 = 225;
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_GL_JournalBatch[").append(getID()).append("]");
44 return sb.toString();
45 }
46 public void setC_Currency_ID (int C_Currency_ID)
47 {
48 if (C_Currency_ID == 0) setValue ("C_Currency_ID", null);
49  else
50 setValue ("C_Currency_ID", new Integer JavaDoc(C_Currency_ID));
51 }
52 public int getC_Currency_ID()
53 {
54 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Currency_ID");
55 if (ii == null) return 0;
56 return ii.intValue();
57 }
58 public void setC_Period_ID (int C_Period_ID)
59 {
60 if (C_Period_ID == 0) setValue ("C_Period_ID", null);
61  else
62 setValue ("C_Period_ID", new Integer JavaDoc(C_Period_ID));
63 }
64 public int getC_Period_ID()
65 {
66 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Period_ID");
67 if (ii == null) return 0;
68 return ii.intValue();
69 }
70 public void setControlAmt (BigDecimal ControlAmt)
71 {
72 setValue ("ControlAmt", ControlAmt);
73 }
74 public BigDecimal getControlAmt()
75 {
76 BigDecimal bd = (BigDecimal)getValue("ControlAmt");
77 if (bd == null) return Env.ZERO;
78 return bd;
79 }
80 public void setCopyFrom (String JavaDoc CopyFrom)
81 {
82 setValue ("CopyFrom", CopyFrom);
83 }
84 public String JavaDoc getCopyFrom()
85 {
86 return (String JavaDoc)getValue("CopyFrom");
87 }
88 public void setDateAcct (Timestamp DateAcct)
89 {
90 setValue ("DateAcct", DateAcct);
91 }
92 public Timestamp getDateAcct()
93 {
94 return (Timestamp)getValue("DateAcct");
95 }
96 public void setDateDoc (Timestamp DateDoc)
97 {
98 setValue ("DateDoc", DateDoc);
99 }
100 public Timestamp getDateDoc()
101 {
102 return (Timestamp)getValue("DateDoc");
103 }
104 public void setDescription (String JavaDoc Description)
105 {
106 if (Description == null) throw new IllegalArgumentException JavaDoc ("Description is mandatory");
107 setValue ("Description", Description);
108 }
109 public String JavaDoc getDescription()
110 {
111 return (String JavaDoc)getValue("Description");
112 }
113 void setDocumentNo (String JavaDoc DocumentNo)
114 {
115 if (DocumentNo == null) throw new IllegalArgumentException JavaDoc ("DocumentNo is mandatory");
116 setValueNoCheck ("DocumentNo", DocumentNo);
117 }
118 public String JavaDoc getDocumentNo()
119 {
120 return (String JavaDoc)getValue("DocumentNo");
121 }
122 public void setGL_Category_ID (int GL_Category_ID)
123 {
124 if (GL_Category_ID == 0) setValue ("GL_Category_ID", null);
125  else
126 setValue ("GL_Category_ID", new Integer JavaDoc(GL_Category_ID));
127 }
128 public int getGL_Category_ID()
129 {
130 Integer JavaDoc ii = (Integer JavaDoc)getValue("GL_Category_ID");
131 if (ii == null) return 0;
132 return ii.intValue();
133 }
134 void setGL_JournalBatch_ID (int GL_JournalBatch_ID)
135 {
136 setValueNoCheck ("GL_JournalBatch_ID", new Integer JavaDoc(GL_JournalBatch_ID));
137 }
138 public int getGL_JournalBatch_ID()
139 {
140 Integer JavaDoc ii = (Integer JavaDoc)getValue("GL_JournalBatch_ID");
141 if (ii == null) return 0;
142 return ii.intValue();
143 }
144 public static final String JavaDoc POSTINGTYPE_Actual = "A";
145 public static final String JavaDoc POSTINGTYPE_Budget = "B";
146 public static final String JavaDoc POSTINGTYPE_Encumbrance = "E";
147 public static final String JavaDoc POSTINGTYPE_Statistical = "S";
148 public void setPostingType (String JavaDoc PostingType)
149 {
150 if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S"));
151  else throw new IllegalArgumentException JavaDoc ("PostingType Invalid value - Reference_ID=125 - A - B - E - S");
152 if (PostingType == null) throw new IllegalArgumentException JavaDoc ("PostingType is mandatory");
153 setValue ("PostingType", PostingType);
154 }
155 public String JavaDoc getPostingType()
156 {
157 return (String JavaDoc)getValue("PostingType");
158 }
159 public void setProcessed (boolean Processed)
160 {
161 setValue ("Processed", new Boolean JavaDoc(Processed));
162 }
163 public boolean isProcessed()
164 {
165 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("Processed");
166 if (bb != null) return bb.booleanValue();
167 return false;
168 }
169 public void setProcessing (String JavaDoc Processing)
170 {
171 if (Processing == null) throw new IllegalArgumentException JavaDoc ("Processing is mandatory");
172 setValue ("Processing", Processing);
173 }
174 public String JavaDoc getProcessing()
175 {
176 return (String JavaDoc)getValue("Processing");
177 }
178 void setTotalCr (BigDecimal TotalCr)
179 {
180 if (TotalCr == null) throw new IllegalArgumentException JavaDoc ("TotalCr is mandatory");
181 setValueNoCheck ("TotalCr", TotalCr);
182 }
183 public BigDecimal getTotalCr()
184 {
185 BigDecimal bd = (BigDecimal)getValue("TotalCr");
186 if (bd == null) return Env.ZERO;
187 return bd;
188 }
189 void setTotalDr (BigDecimal TotalDr)
190 {
191 if (TotalDr == null) throw new IllegalArgumentException JavaDoc ("TotalDr is mandatory");
192 setValueNoCheck ("TotalDr", TotalDr);
193 }
194 public BigDecimal getTotalDr()
195 {
196 BigDecimal bd = (BigDecimal)getValue("TotalDr");
197 if (bd == null) return Env.ZERO;
198 return bd;
199 }
200 }
201
Popular Tags