KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_M_InventoryLine extends PO
11 {
12 /** Standard Constructor **/
13 public X_M_InventoryLine (Properties ctx, int M_InventoryLine_ID)
14 {
15 super (ctx, M_InventoryLine_ID);
16 /** if (M_InventoryLine_ID == 0)
17 {
18 setInventoryType (null);
19 setM_InventoryLine_ID (0);
20 setM_Inventory_ID (0);
21 setM_Locator_ID (0);
22 setM_Product_ID (0);
23 setQtyBook (Env.ZERO);
24 setQtyCount (Env.ZERO);
25 }
26  **/

27 }
28 /** Load Constructor **/
29 public X_M_InventoryLine (Properties ctx, ResultSet rs)
30 {
31 super (ctx, rs);
32 }
33 /** Load Meta Data **/
34 protected POInfo initPO (Properties ctx)
35 {
36 int AD_Table_ID = 322;
37 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
38 return poi;
39 }
40 public String JavaDoc toString()
41 {
42 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_M_InventoryLine[").append(getID()).append("]");
43 return sb.toString();
44 }
45 public void setC_Charge_ID (int C_Charge_ID)
46 {
47 if (C_Charge_ID == 0) setValue ("C_Charge_ID", null);
48  else
49 setValue ("C_Charge_ID", new Integer JavaDoc(C_Charge_ID));
50 }
51 public int getC_Charge_ID()
52 {
53 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Charge_ID");
54 if (ii == null) return 0;
55 return ii.intValue();
56 }
57 public void setDescription (String JavaDoc Description)
58 {
59 setValue ("Description", Description);
60 }
61 public String JavaDoc getDescription()
62 {
63 return (String JavaDoc)getValue("Description");
64 }
65 public static final String JavaDoc INVENTORYTYPE_InventoryDifference = "D";
66 public static final String JavaDoc INVENTORYTYPE_ChargeAccount = "C";
67 public void setInventoryType (String JavaDoc InventoryType)
68 {
69 if (InventoryType.equals("D") || InventoryType.equals("C"));
70  else throw new IllegalArgumentException JavaDoc ("InventoryType Invalid value - Reference_ID=292 - D - C");
71 if (InventoryType == null) throw new IllegalArgumentException JavaDoc ("InventoryType is mandatory");
72 setValue ("InventoryType", InventoryType);
73 }
74 public String JavaDoc getInventoryType()
75 {
76 return (String JavaDoc)getValue("InventoryType");
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_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
89 {
90 if (M_AttributeSetInstance_ID == 0) setValue ("M_AttributeSetInstance_ID", null);
91  else
92 setValue ("M_AttributeSetInstance_ID", new Integer JavaDoc(M_AttributeSetInstance_ID));
93 }
94 public int getM_AttributeSetInstance_ID()
95 {
96 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_AttributeSetInstance_ID");
97 if (ii == null) return 0;
98 return ii.intValue();
99 }
100 void setM_InventoryLine_ID (int M_InventoryLine_ID)
101 {
102 setValueNoCheck ("M_InventoryLine_ID", new Integer JavaDoc(M_InventoryLine_ID));
103 }
104 public int getM_InventoryLine_ID()
105 {
106 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_InventoryLine_ID");
107 if (ii == null) return 0;
108 return ii.intValue();
109 }
110 void setM_Inventory_ID (int M_Inventory_ID)
111 {
112 setValueNoCheck ("M_Inventory_ID", new Integer JavaDoc(M_Inventory_ID));
113 }
114 public int getM_Inventory_ID()
115 {
116 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Inventory_ID");
117 if (ii == null) return 0;
118 return ii.intValue();
119 }
120 public void setM_Locator_ID (int M_Locator_ID)
121 {
122 setValue ("M_Locator_ID", new Integer JavaDoc(M_Locator_ID));
123 }
124 public int getM_Locator_ID()
125 {
126 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Locator_ID");
127 if (ii == null) return 0;
128 return ii.intValue();
129 }
130 public void setM_Product_ID (int M_Product_ID)
131 {
132 setValue ("M_Product_ID", new Integer JavaDoc(M_Product_ID));
133 }
134 public int getM_Product_ID()
135 {
136 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Product_ID");
137 if (ii == null) return 0;
138 return ii.intValue();
139 }
140 void setQtyBook (BigDecimal QtyBook)
141 {
142 if (QtyBook == null) throw new IllegalArgumentException JavaDoc ("QtyBook is mandatory");
143 setValueNoCheck ("QtyBook", QtyBook);
144 }
145 public BigDecimal getQtyBook()
146 {
147 BigDecimal bd = (BigDecimal)getValue("QtyBook");
148 if (bd == null) return Env.ZERO;
149 return bd;
150 }
151 public void setQtyCount (BigDecimal QtyCount)
152 {
153 if (QtyCount == null) throw new IllegalArgumentException JavaDoc ("QtyCount is mandatory");
154 setValue ("QtyCount", QtyCount);
155 }
156 public BigDecimal getQtyCount()
157 {
158 BigDecimal bd = (BigDecimal)getValue("QtyCount");
159 if (bd == null) return Env.ZERO;
160 return bd;
161 }
162 }
163
Popular Tags