KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_C_AcctSchema_Element extends PO
11 {
12 /** Standard Constructor **/
13 public X_C_AcctSchema_Element (Properties ctx, int C_AcctSchema_Element_ID)
14 {
15 super (ctx, C_AcctSchema_Element_ID);
16 /** if (C_AcctSchema_Element_ID == 0)
17 {
18 setC_AcctSchema_Element_ID (0);
19 setC_AcctSchema_ID (0);
20 setC_Element_ID (0);
21 setElementType (null);
22 setIsBalanced (false);
23 setIsMandatory (false);
24 setName (null);
25 setOrg_ID (0);
26 setSeqNo (0);
27 }
28  **/

29 }
30 /** Load Constructor **/
31 public X_C_AcctSchema_Element (Properties ctx, ResultSet rs)
32 {
33 super (ctx, rs);
34 }
35 /** Load Meta Data **/
36 protected POInfo initPO (Properties ctx)
37 {
38 int AD_Table_ID = 279;
39 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
40 return poi;
41 }
42 public String JavaDoc toString()
43 {
44 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_C_AcctSchema_Element[").append(getID()).append("]");
45 return sb.toString();
46 }
47 void setC_AcctSchema_Element_ID (int C_AcctSchema_Element_ID)
48 {
49 setValueNoCheck ("C_AcctSchema_Element_ID", new Integer JavaDoc(C_AcctSchema_Element_ID));
50 }
51 public int getC_AcctSchema_Element_ID()
52 {
53 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_AcctSchema_Element_ID");
54 if (ii == null) return 0;
55 return ii.intValue();
56 }
57 void setC_AcctSchema_ID (int C_AcctSchema_ID)
58 {
59 setValueNoCheck ("C_AcctSchema_ID", new Integer JavaDoc(C_AcctSchema_ID));
60 }
61 public int getC_AcctSchema_ID()
62 {
63 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_AcctSchema_ID");
64 if (ii == null) return 0;
65 return ii.intValue();
66 }
67 public void setC_Activity_ID (int C_Activity_ID)
68 {
69 if (C_Activity_ID == 0) setValue ("C_Activity_ID", null);
70  else
71 setValue ("C_Activity_ID", new Integer JavaDoc(C_Activity_ID));
72 }
73 public int getC_Activity_ID()
74 {
75 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Activity_ID");
76 if (ii == null) return 0;
77 return ii.intValue();
78 }
79 public void setC_BPartner_ID (int C_BPartner_ID)
80 {
81 if (C_BPartner_ID == 0) setValue ("C_BPartner_ID", null);
82  else
83 setValue ("C_BPartner_ID", new Integer JavaDoc(C_BPartner_ID));
84 }
85 public int getC_BPartner_ID()
86 {
87 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_BPartner_ID");
88 if (ii == null) return 0;
89 return ii.intValue();
90 }
91 public void setC_Campaign_ID (int C_Campaign_ID)
92 {
93 if (C_Campaign_ID == 0) setValue ("C_Campaign_ID", null);
94  else
95 setValue ("C_Campaign_ID", new Integer JavaDoc(C_Campaign_ID));
96 }
97 public int getC_Campaign_ID()
98 {
99 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Campaign_ID");
100 if (ii == null) return 0;
101 return ii.intValue();
102 }
103 public void setC_ElementValue_ID (int C_ElementValue_ID)
104 {
105 if (C_ElementValue_ID == 0) setValue ("C_ElementValue_ID", null);
106  else
107 setValue ("C_ElementValue_ID", new Integer JavaDoc(C_ElementValue_ID));
108 }
109 public int getC_ElementValue_ID()
110 {
111 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_ElementValue_ID");
112 if (ii == null) return 0;
113 return ii.intValue();
114 }
115 public void setC_Element_ID (int C_Element_ID)
116 {
117 setValue ("C_Element_ID", new Integer JavaDoc(C_Element_ID));
118 }
119 public int getC_Element_ID()
120 {
121 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Element_ID");
122 if (ii == null) return 0;
123 return ii.intValue();
124 }
125 public void setC_Location_ID (int C_Location_ID)
126 {
127 if (C_Location_ID == 0) setValue ("C_Location_ID", null);
128  else
129 setValue ("C_Location_ID", new Integer JavaDoc(C_Location_ID));
130 }
131 public int getC_Location_ID()
132 {
133 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Location_ID");
134 if (ii == null) return 0;
135 return ii.intValue();
136 }
137 public void setC_Project_ID (int C_Project_ID)
138 {
139 if (C_Project_ID == 0) setValue ("C_Project_ID", null);
140  else
141 setValue ("C_Project_ID", new Integer JavaDoc(C_Project_ID));
142 }
143 public int getC_Project_ID()
144 {
145 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Project_ID");
146 if (ii == null) return 0;
147 return ii.intValue();
148 }
149 public void setC_SalesRegion_ID (int C_SalesRegion_ID)
150 {
151 if (C_SalesRegion_ID == 0) setValue ("C_SalesRegion_ID", null);
152  else
153 setValue ("C_SalesRegion_ID", new Integer JavaDoc(C_SalesRegion_ID));
154 }
155 public int getC_SalesRegion_ID()
156 {
157 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_SalesRegion_ID");
158 if (ii == null) return 0;
159 return ii.intValue();
160 }
161 public static final String JavaDoc ELEMENTTYPE_LocationFrom = "LF";
162 public static final String JavaDoc ELEMENTTYPE_LocationTo = "LT";
163 public static final String JavaDoc ELEMENTTYPE_SalesRegion = "SR";
164 public static final String JavaDoc ELEMENTTYPE_Project = "PJ";
165 public static final String JavaDoc ELEMENTTYPE_Campaign = "MC";
166 public static final String JavaDoc ELEMENTTYPE_User1 = "U1";
167 public static final String JavaDoc ELEMENTTYPE_User2 = "U2";
168 public static final String JavaDoc ELEMENTTYPE_Activity = "AY";
169 public static final String JavaDoc ELEMENTTYPE_Organization = "OO";
170 public static final String JavaDoc ELEMENTTYPE_Account = "AC";
171 public static final String JavaDoc ELEMENTTYPE_Product = "PR";
172 public static final String JavaDoc ELEMENTTYPE_BusPartner = "BP";
173 public static final String JavaDoc ELEMENTTYPE_TrxOrg = "OT";
174 public void setElementType (String JavaDoc ElementType)
175 {
176 if (ElementType.equals("LF") || ElementType.equals("LT") || ElementType.equals("SR") || ElementType.equals("PJ") || ElementType.equals("MC") || ElementType.equals("U1") || ElementType.equals("U2") || ElementType.equals("AY") || ElementType.equals("OO") || ElementType.equals("AC") || ElementType.equals("PR") || ElementType.equals("BP") || ElementType.equals("OT"));
177  else throw new IllegalArgumentException JavaDoc ("ElementType Invalid value - Reference_ID=181 - LF - LT - SR - PJ - MC - U1 - U2 - AY - OO - AC - PR - BP - OT");
178 if (ElementType == null) throw new IllegalArgumentException JavaDoc ("ElementType is mandatory");
179 setValue ("ElementType", ElementType);
180 }
181 public String JavaDoc getElementType()
182 {
183 return (String JavaDoc)getValue("ElementType");
184 }
185 public void setIsBalanced (boolean IsBalanced)
186 {
187 setValue ("IsBalanced", new Boolean JavaDoc(IsBalanced));
188 }
189 public boolean isBalanced()
190 {
191 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsBalanced");
192 if (bb != null) return bb.booleanValue();
193 return false;
194 }
195 public void setIsMandatory (boolean IsMandatory)
196 {
197 setValue ("IsMandatory", new Boolean JavaDoc(IsMandatory));
198 }
199 public boolean isMandatory()
200 {
201 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsMandatory");
202 if (bb != null) return bb.booleanValue();
203 return false;
204 }
205 public void setM_Product_ID (int M_Product_ID)
206 {
207 if (M_Product_ID == 0) setValue ("M_Product_ID", null);
208  else
209 setValue ("M_Product_ID", new Integer JavaDoc(M_Product_ID));
210 }
211 public int getM_Product_ID()
212 {
213 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Product_ID");
214 if (ii == null) return 0;
215 return ii.intValue();
216 }
217 public void setName (String JavaDoc Name)
218 {
219 if (Name == null) throw new IllegalArgumentException JavaDoc ("Name is mandatory");
220 setValue ("Name", Name);
221 }
222 public String JavaDoc getName()
223 {
224 return (String JavaDoc)getValue("Name");
225 }
226 public void setOrg_ID (int Org_ID)
227 {
228 setValue ("Org_ID", new Integer JavaDoc(Org_ID));
229 }
230 public int getOrg_ID()
231 {
232 Integer JavaDoc ii = (Integer JavaDoc)getValue("Org_ID");
233 if (ii == null) return 0;
234 return ii.intValue();
235 }
236 public void setSeqNo (int SeqNo)
237 {
238 setValue ("SeqNo", new Integer JavaDoc(SeqNo));
239 }
240 public int getSeqNo()
241 {
242 Integer JavaDoc ii = (Integer JavaDoc)getValue("SeqNo");
243 if (ii == null) return 0;
244 return ii.intValue();
245 }
246 }
247
Popular Tags