KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_M_Product_BOM extends PO
11 {
12 /** Standard Constructor **/
13 public X_M_Product_BOM (Properties ctx, int M_Product_BOM_ID)
14 {
15 super (ctx, M_Product_BOM_ID);
16 /** if (M_Product_BOM_ID == 0)
17 {
18 setBOMQty (Env.ZERO);
19 setLine (0);
20 setM_ProductBOM_ID (0);
21 setM_Product_BOM_ID (0);
22 setM_Product_ID (0);
23 }
24  **/

25 }
26 /** Load Constructor **/
27 public X_M_Product_BOM (Properties ctx, ResultSet rs)
28 {
29 super (ctx, rs);
30 }
31 /** Load Meta Data **/
32 protected POInfo initPO (Properties ctx)
33 {
34 int AD_Table_ID = 383;
35 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
36 return poi;
37 }
38 public String JavaDoc toString()
39 {
40 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_M_Product_BOM[").append(getID()).append("]");
41 return sb.toString();
42 }
43 public void setBOMQty (BigDecimal BOMQty)
44 {
45 if (BOMQty == null) throw new IllegalArgumentException JavaDoc ("BOMQty is mandatory");
46 setValue ("BOMQty", BOMQty);
47 }
48 public BigDecimal getBOMQty()
49 {
50 BigDecimal bd = (BigDecimal)getValue("BOMQty");
51 if (bd == null) return Env.ZERO;
52 return bd;
53 }
54 public static final String JavaDoc BOMTYPE_PartBOM = "P";
55 public static final String JavaDoc BOMTYPE_Option = "O";
56 public static final String JavaDoc BOMTYPE_AlternativeGroup1 = "1";
57 public static final String JavaDoc BOMTYPE_AlternativeGroup2 = "2";
58 public static final String JavaDoc BOMTYPE_AlternaltveGroup3 = "3";
59 public static final String JavaDoc BOMTYPE_AlternativeGroup4 = "4";
60 public void setBOMType (String JavaDoc BOMType)
61 {
62 if (BOMType.equals("P") || BOMType.equals("O") || BOMType.equals("1") || BOMType.equals("2") || BOMType.equals("3") || BOMType.equals("4"));
63  else throw new IllegalArgumentException JavaDoc ("BOMType Invalid value - Reference_ID=279 - P - O - 1 - 2 - 3 - 4");
64 setValue ("BOMType", BOMType);
65 }
66 public String JavaDoc getBOMType()
67 {
68 return (String JavaDoc)getValue("BOMType");
69 }
70 public void setDescription (String JavaDoc Description)
71 {
72 setValue ("Description", Description);
73 }
74 public String JavaDoc getDescription()
75 {
76 return (String JavaDoc)getValue("Description");
77 }
78 public void setLine (int Line)
79 {
80 setValue ("Line", new Integer JavaDoc(Line));
81 }
82 public int getLine()
83 {
84 Integer JavaDoc ii = (Integer JavaDoc)getValue("Line");
85 if (ii == null) return 0;
86 return ii.intValue();
87 }
88 public void setM_ProductBOM_ID (int M_ProductBOM_ID)
89 {
90 setValue ("M_ProductBOM_ID", new Integer JavaDoc(M_ProductBOM_ID));
91 }
92 public int getM_ProductBOM_ID()
93 {
94 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_ProductBOM_ID");
95 if (ii == null) return 0;
96 return ii.intValue();
97 }
98 void setM_Product_BOM_ID (int M_Product_BOM_ID)
99 {
100 setValueNoCheck ("M_Product_BOM_ID", new Integer JavaDoc(M_Product_BOM_ID));
101 }
102 public int getM_Product_BOM_ID()
103 {
104 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Product_BOM_ID");
105 if (ii == null) return 0;
106 return ii.intValue();
107 }
108 void setM_Product_ID (int M_Product_ID)
109 {
110 setValueNoCheck ("M_Product_ID", new Integer JavaDoc(M_Product_ID));
111 }
112 public int getM_Product_ID()
113 {
114 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Product_ID");
115 if (ii == null) return 0;
116 return ii.intValue();
117 }
118 }
119
Popular Tags