KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_M_Product extends PO
11 {
12 /** Standard Constructor **/
13 public X_M_Product (Properties ctx, int M_Product_ID)
14 {
15 super (ctx, M_Product_ID);
16 /** if (M_Product_ID == 0)
17 {
18 setC_TaxCategory_ID (0);
19 setC_UOM_ID (0);
20 setIsBOM (false);
21 setIsInvoicePrintDetails (false);
22 setIsPickListPrintDetails (false);
23 setIsPurchased (false);
24 setIsSold (false);
25 setIsStocked (false);
26 setIsSummary (false);
27 setIsVerified (false);
28 setM_Product_Category_ID (0);
29 setM_Product_ID (0);
30 setName (null);
31 setProcessing (null);
32 setProductType (null);
33 setValue (null);
34 }
35  **/

36 }
37 /** Load Constructor **/
38 public X_M_Product (Properties ctx, ResultSet rs)
39 {
40 super (ctx, rs);
41 }
42 /** Load Meta Data **/
43 protected POInfo initPO (Properties ctx)
44 {
45 int AD_Table_ID = 208;
46 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
47 return poi;
48 }
49 public String JavaDoc toString()
50 {
51 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_M_Product[").append(getID()).append("]");
52 return sb.toString();
53 }
54 public void setC_RevenueRecognition_ID (int C_RevenueRecognition_ID)
55 {
56 if (C_RevenueRecognition_ID == 0) setValue ("C_RevenueRecognition_ID", null);
57  else
58 setValue ("C_RevenueRecognition_ID", new Integer JavaDoc(C_RevenueRecognition_ID));
59 }
60 public int getC_RevenueRecognition_ID()
61 {
62 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_RevenueRecognition_ID");
63 if (ii == null) return 0;
64 return ii.intValue();
65 }
66 public void setC_TaxCategory_ID (int C_TaxCategory_ID)
67 {
68 setValue ("C_TaxCategory_ID", new Integer JavaDoc(C_TaxCategory_ID));
69 }
70 public int getC_TaxCategory_ID()
71 {
72 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_TaxCategory_ID");
73 if (ii == null) return 0;
74 return ii.intValue();
75 }
76 public void setC_UOM_ID (int C_UOM_ID)
77 {
78 setValue ("C_UOM_ID", new Integer JavaDoc(C_UOM_ID));
79 }
80 public int getC_UOM_ID()
81 {
82 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_UOM_ID");
83 if (ii == null) return 0;
84 return ii.intValue();
85 }
86 public void setClassification (String JavaDoc Classification)
87 {
88 setValue ("Classification", Classification);
89 }
90 public String JavaDoc getClassification()
91 {
92 return (String JavaDoc)getValue("Classification");
93 }
94 public void setDescription (String JavaDoc Description)
95 {
96 setValue ("Description", Description);
97 }
98 public String JavaDoc getDescription()
99 {
100 return (String JavaDoc)getValue("Description");
101 }
102 public void setDescriptionURL (String JavaDoc DescriptionURL)
103 {
104 setValue ("DescriptionURL", DescriptionURL);
105 }
106 public String JavaDoc getDescriptionURL()
107 {
108 return (String JavaDoc)getValue("DescriptionURL");
109 }
110 public void setDiscontinued (boolean Discontinued)
111 {
112 setValue ("Discontinued", new Boolean JavaDoc(Discontinued));
113 }
114 public boolean isDiscontinued()
115 {
116 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("Discontinued");
117 if (bb != null) return bb.booleanValue();
118 return false;
119 }
120 public void setDiscontinuedBy (Timestamp DiscontinuedBy)
121 {
122 setValue ("DiscontinuedBy", DiscontinuedBy);
123 }
124 public Timestamp getDiscontinuedBy()
125 {
126 return (Timestamp)getValue("DiscontinuedBy");
127 }
128 public void setDocumentNote (String JavaDoc DocumentNote)
129 {
130 setValue ("DocumentNote", DocumentNote);
131 }
132 public String JavaDoc getDocumentNote()
133 {
134 return (String JavaDoc)getValue("DocumentNote");
135 }
136 public void setDownloadURL (String JavaDoc DownloadURL)
137 {
138 setValue ("DownloadURL", DownloadURL);
139 }
140 public String JavaDoc getDownloadURL()
141 {
142 return (String JavaDoc)getValue("DownloadURL");
143 }
144 public void setGuaranteeDays (int GuaranteeDays)
145 {
146 setValue ("GuaranteeDays", new Integer JavaDoc(GuaranteeDays));
147 }
148 public int getGuaranteeDays()
149 {
150 Integer JavaDoc ii = (Integer JavaDoc)getValue("GuaranteeDays");
151 if (ii == null) return 0;
152 return ii.intValue();
153 }
154 public void setGuaranteeDaysMin (int GuaranteeDaysMin)
155 {
156 setValue ("GuaranteeDaysMin", new Integer JavaDoc(GuaranteeDaysMin));
157 }
158 public int getGuaranteeDaysMin()
159 {
160 Integer JavaDoc ii = (Integer JavaDoc)getValue("GuaranteeDaysMin");
161 if (ii == null) return 0;
162 return ii.intValue();
163 }
164 public void setHelp (String JavaDoc Help)
165 {
166 setValue ("Help", Help);
167 }
168 public String JavaDoc getHelp()
169 {
170 return (String JavaDoc)getValue("Help");
171 }
172 public void setImageURL (String JavaDoc ImageURL)
173 {
174 setValue ("ImageURL", ImageURL);
175 }
176 public String JavaDoc getImageURL()
177 {
178 return (String JavaDoc)getValue("ImageURL");
179 }
180 public void setIsBOM (boolean IsBOM)
181 {
182 setValue ("IsBOM", new Boolean JavaDoc(IsBOM));
183 }
184 public boolean isBOM()
185 {
186 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsBOM");
187 if (bb != null) return bb.booleanValue();
188 return false;
189 }
190 public void setIsInvoicePrintDetails (boolean IsInvoicePrintDetails)
191 {
192 setValue ("IsInvoicePrintDetails", new Boolean JavaDoc(IsInvoicePrintDetails));
193 }
194 public boolean isInvoicePrintDetails()
195 {
196 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsInvoicePrintDetails");
197 if (bb != null) return bb.booleanValue();
198 return false;
199 }
200 public void setIsPickListPrintDetails (boolean IsPickListPrintDetails)
201 {
202 setValue ("IsPickListPrintDetails", new Boolean JavaDoc(IsPickListPrintDetails));
203 }
204 public boolean isPickListPrintDetails()
205 {
206 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsPickListPrintDetails");
207 if (bb != null) return bb.booleanValue();
208 return false;
209 }
210 public void setIsPurchased (boolean IsPurchased)
211 {
212 setValue ("IsPurchased", new Boolean JavaDoc(IsPurchased));
213 }
214 public boolean isPurchased()
215 {
216 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsPurchased");
217 if (bb != null) return bb.booleanValue();
218 return false;
219 }
220 public void setIsSold (boolean IsSold)
221 {
222 setValue ("IsSold", new Boolean JavaDoc(IsSold));
223 }
224 public boolean isSold()
225 {
226 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsSold");
227 if (bb != null) return bb.booleanValue();
228 return false;
229 }
230 public void setIsStocked (boolean IsStocked)
231 {
232 setValue ("IsStocked", new Boolean JavaDoc(IsStocked));
233 }
234 public boolean isStocked()
235 {
236 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsStocked");
237 if (bb != null) return bb.booleanValue();
238 return false;
239 }
240 public void setIsSummary (boolean IsSummary)
241 {
242 setValue ("IsSummary", new Boolean JavaDoc(IsSummary));
243 }
244 public boolean isSummary()
245 {
246 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsSummary");
247 if (bb != null) return bb.booleanValue();
248 return false;
249 }
250 void setIsVerified (boolean IsVerified)
251 {
252 setValueNoCheck ("IsVerified", new Boolean JavaDoc(IsVerified));
253 }
254 public boolean isVerified()
255 {
256 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsVerified");
257 if (bb != null) return bb.booleanValue();
258 return false;
259 }
260 public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
261 {
262 if (M_AttributeSetInstance_ID == 0) setValue ("M_AttributeSetInstance_ID", null);
263  else
264 setValue ("M_AttributeSetInstance_ID", new Integer JavaDoc(M_AttributeSetInstance_ID));
265 }
266 public int getM_AttributeSetInstance_ID()
267 {
268 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_AttributeSetInstance_ID");
269 if (ii == null) return 0;
270 return ii.intValue();
271 }
272 public void setM_AttributeSet_ID (int M_AttributeSet_ID)
273 {
274 if (M_AttributeSet_ID == 0) setValue ("M_AttributeSet_ID", null);
275  else
276 setValue ("M_AttributeSet_ID", new Integer JavaDoc(M_AttributeSet_ID));
277 }
278 public int getM_AttributeSet_ID()
279 {
280 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_AttributeSet_ID");
281 if (ii == null) return 0;
282 return ii.intValue();
283 }
284 public void setM_FreightCategory_ID (int M_FreightCategory_ID)
285 {
286 if (M_FreightCategory_ID == 0) setValue ("M_FreightCategory_ID", null);
287  else
288 setValue ("M_FreightCategory_ID", new Integer JavaDoc(M_FreightCategory_ID));
289 }
290 public int getM_FreightCategory_ID()
291 {
292 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_FreightCategory_ID");
293 if (ii == null) return 0;
294 return ii.intValue();
295 }
296 public void setM_Locator_ID (int M_Locator_ID)
297 {
298 if (M_Locator_ID == 0) setValue ("M_Locator_ID", null);
299  else
300 setValue ("M_Locator_ID", new Integer JavaDoc(M_Locator_ID));
301 }
302 public int getM_Locator_ID()
303 {
304 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Locator_ID");
305 if (ii == null) return 0;
306 return ii.intValue();
307 }
308 public void setM_Product_Category_ID (int M_Product_Category_ID)
309 {
310 setValue ("M_Product_Category_ID", new Integer JavaDoc(M_Product_Category_ID));
311 }
312 public int getM_Product_Category_ID()
313 {
314 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Product_Category_ID");
315 if (ii == null) return 0;
316 return ii.intValue();
317 }
318 void setM_Product_ID (int M_Product_ID)
319 {
320 setValueNoCheck ("M_Product_ID", new Integer JavaDoc(M_Product_ID));
321 }
322 public int getM_Product_ID()
323 {
324 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Product_ID");
325 if (ii == null) return 0;
326 return ii.intValue();
327 }
328 public void setName (String JavaDoc Name)
329 {
330 if (Name == null) throw new IllegalArgumentException JavaDoc ("Name is mandatory");
331 setValue ("Name", Name);
332 }
333 public String JavaDoc getName()
334 {
335 return (String JavaDoc)getValue("Name");
336 }
337 public void setProcessing (String JavaDoc Processing)
338 {
339 if (Processing == null) throw new IllegalArgumentException JavaDoc ("Processing is mandatory");
340 setValue ("Processing", Processing);
341 }
342 public String JavaDoc getProcessing()
343 {
344 return (String JavaDoc)getValue("Processing");
345 }
346 public static final String JavaDoc PRODUCTTYPE_Item = "I";
347 public static final String JavaDoc PRODUCTTYPE_Service = "S";
348 public static final String JavaDoc PRODUCTTYPE_Resource = "R";
349 public static final String JavaDoc PRODUCTTYPE_ExpenseType = "E";
350 public static final String JavaDoc PRODUCTTYPE_Online = "O";
351 public void setProductType (String JavaDoc ProductType)
352 {
353 if (ProductType.equals("I") || ProductType.equals("S") || ProductType.equals("R") || ProductType.equals("E") || ProductType.equals("O"));
354  else throw new IllegalArgumentException JavaDoc ("ProductType Invalid value - Reference_ID=270 - I - S - R - E - O");
355 if (ProductType == null) throw new IllegalArgumentException JavaDoc ("ProductType is mandatory");
356 setValue ("ProductType", ProductType);
357 }
358 public String JavaDoc getProductType()
359 {
360 return (String JavaDoc)getValue("ProductType");
361 }
362 public void setR_MailText_ID (int R_MailText_ID)
363 {
364 if (R_MailText_ID == 0) setValue ("R_MailText_ID", null);
365  else
366 setValue ("R_MailText_ID", new Integer JavaDoc(R_MailText_ID));
367 }
368 public int getR_MailText_ID()
369 {
370 Integer JavaDoc ii = (Integer JavaDoc)getValue("R_MailText_ID");
371 if (ii == null) return 0;
372 return ii.intValue();
373 }
374 public void setSKU (String JavaDoc SKU)
375 {
376 setValue ("SKU", SKU);
377 }
378 public String JavaDoc getSKU()
379 {
380 return (String JavaDoc)getValue("SKU");
381 }
382 void setS_ExpenseType_ID (int S_ExpenseType_ID)
383 {
384 if (S_ExpenseType_ID == 0) setValueNoCheck ("S_ExpenseType_ID", null);
385  else
386 setValueNoCheck ("S_ExpenseType_ID", new Integer JavaDoc(S_ExpenseType_ID));
387 }
388 public int getS_ExpenseType_ID()
389 {
390 Integer JavaDoc ii = (Integer JavaDoc)getValue("S_ExpenseType_ID");
391 if (ii == null) return 0;
392 return ii.intValue();
393 }
394 void setS_Resource_ID (int S_Resource_ID)
395 {
396 if (S_Resource_ID == 0) setValueNoCheck ("S_Resource_ID", null);
397  else
398 setValueNoCheck ("S_Resource_ID", new Integer JavaDoc(S_Resource_ID));
399 }
400 public int getS_Resource_ID()
401 {
402 Integer JavaDoc ii = (Integer JavaDoc)getValue("S_Resource_ID");
403 if (ii == null) return 0;
404 return ii.intValue();
405 }
406 public void setSalesRep_ID (int SalesRep_ID)
407 {
408 if (SalesRep_ID == 0) setValue ("SalesRep_ID", null);
409  else
410 setValue ("SalesRep_ID", new Integer JavaDoc(SalesRep_ID));
411 }
412 public int getSalesRep_ID()
413 {
414 Integer JavaDoc ii = (Integer JavaDoc)getValue("SalesRep_ID");
415 if (ii == null) return 0;
416 return ii.intValue();
417 }
418 public void setShelfDepth (int ShelfDepth)
419 {
420 setValue ("ShelfDepth", new Integer JavaDoc(ShelfDepth));
421 }
422 public int getShelfDepth()
423 {
424 Integer JavaDoc ii = (Integer JavaDoc)getValue("ShelfDepth");
425 if (ii == null) return 0;
426 return ii.intValue();
427 }
428 public void setShelfHeight (int ShelfHeight)
429 {
430 setValue ("ShelfHeight", new Integer JavaDoc(ShelfHeight));
431 }
432 public int getShelfHeight()
433 {
434 Integer JavaDoc ii = (Integer JavaDoc)getValue("ShelfHeight");
435 if (ii == null) return 0;
436 return ii.intValue();
437 }
438 public void setShelfWidth (int ShelfWidth)
439 {
440 setValue ("ShelfWidth", new Integer JavaDoc(ShelfWidth));
441 }
442 public int getShelfWidth()
443 {
444 Integer JavaDoc ii = (Integer JavaDoc)getValue("ShelfWidth");
445 if (ii == null) return 0;
446 return ii.intValue();
447 }
448 public void setUPC (String JavaDoc UPC)
449 {
450 setValue ("UPC", UPC);
451 }
452 public String JavaDoc getUPC()
453 {
454 return (String JavaDoc)getValue("UPC");
455 }
456 public void setUnitsPerPallet (int UnitsPerPallet)
457 {
458 setValue ("UnitsPerPallet", new Integer JavaDoc(UnitsPerPallet));
459 }
460 public int getUnitsPerPallet()
461 {
462 Integer JavaDoc ii = (Integer JavaDoc)getValue("UnitsPerPallet");
463 if (ii == null) return 0;
464 return ii.intValue();
465 }
466 public void setValue (String JavaDoc Value)
467 {
468 if (Value == null) throw new IllegalArgumentException JavaDoc ("Value is mandatory");
469 setValue ("Value", Value);
470 }
471 public String JavaDoc getValue()
472 {
473 return (String JavaDoc)getValue("Value");
474 }
475 public void setVersionNo (String JavaDoc VersionNo)
476 {
477 setValue ("VersionNo", VersionNo);
478 }
479 public String JavaDoc getVersionNo()
480 {
481 return (String JavaDoc)getValue("VersionNo");
482 }
483 public void setVolume (BigDecimal Volume)
484 {
485 setValue ("Volume", Volume);
486 }
487 public BigDecimal getVolume()
488 {
489 BigDecimal bd = (BigDecimal)getValue("Volume");
490 if (bd == null) return Env.ZERO;
491 return bd;
492 }
493 public void setWeight (BigDecimal Weight)
494 {
495 setValue ("Weight", Weight);
496 }
497 public BigDecimal getWeight()
498 {
499 BigDecimal bd = (BigDecimal)getValue("Weight");
500 if (bd == null) return Env.ZERO;
501 return bd;
502 }
503 }
504
Popular Tags