KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_M_Transaction extends PO
11 {
12 /** Standard Constructor **/
13 public X_M_Transaction (Properties ctx, int M_Transaction_ID)
14 {
15 super (ctx, M_Transaction_ID);
16 /** if (M_Transaction_ID == 0)
17 {
18 setM_AttributeSetInstance_ID (0);
19 setM_Locator_ID (0);
20 setM_Product_ID (0);
21 setM_Transaction_ID (0);
22 setMovementDate (new Timestamp(System.currentTimeMillis()));
23 setMovementQty (Env.ZERO);
24 setMovementType (null);
25 }
26  **/

27 }
28 /** Load Constructor **/
29 public X_M_Transaction (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 = 329;
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_Transaction[").append(getID()).append("]");
43 return sb.toString();
44 }
45 void setC_ProjectIssue_ID (int C_ProjectIssue_ID)
46 {
47 if (C_ProjectIssue_ID == 0) setValueNoCheck ("C_ProjectIssue_ID", null);
48  else
49 setValueNoCheck ("C_ProjectIssue_ID", new Integer JavaDoc(C_ProjectIssue_ID));
50 }
51 public int getC_ProjectIssue_ID()
52 {
53 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_ProjectIssue_ID");
54 if (ii == null) return 0;
55 return ii.intValue();
56 }
57 void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
58 {
59 setValueNoCheck ("M_AttributeSetInstance_ID", new Integer JavaDoc(M_AttributeSetInstance_ID));
60 }
61 public int getM_AttributeSetInstance_ID()
62 {
63 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_AttributeSetInstance_ID");
64 if (ii == null) return 0;
65 return ii.intValue();
66 }
67 void setM_InOutLine_ID (int M_InOutLine_ID)
68 {
69 if (M_InOutLine_ID == 0) setValueNoCheck ("M_InOutLine_ID", null);
70  else
71 setValueNoCheck ("M_InOutLine_ID", new Integer JavaDoc(M_InOutLine_ID));
72 }
73 public int getM_InOutLine_ID()
74 {
75 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_InOutLine_ID");
76 if (ii == null) return 0;
77 return ii.intValue();
78 }
79 void setM_InventoryLine_ID (int M_InventoryLine_ID)
80 {
81 if (M_InventoryLine_ID == 0) setValueNoCheck ("M_InventoryLine_ID", null);
82  else
83 setValueNoCheck ("M_InventoryLine_ID", new Integer JavaDoc(M_InventoryLine_ID));
84 }
85 public int getM_InventoryLine_ID()
86 {
87 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_InventoryLine_ID");
88 if (ii == null) return 0;
89 return ii.intValue();
90 }
91 void setM_Locator_ID (int M_Locator_ID)
92 {
93 setValueNoCheck ("M_Locator_ID", new Integer JavaDoc(M_Locator_ID));
94 }
95 public int getM_Locator_ID()
96 {
97 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Locator_ID");
98 if (ii == null) return 0;
99 return ii.intValue();
100 }
101 void setM_MovementLine_ID (int M_MovementLine_ID)
102 {
103 if (M_MovementLine_ID == 0) setValueNoCheck ("M_MovementLine_ID", null);
104  else
105 setValueNoCheck ("M_MovementLine_ID", new Integer JavaDoc(M_MovementLine_ID));
106 }
107 public int getM_MovementLine_ID()
108 {
109 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_MovementLine_ID");
110 if (ii == null) return 0;
111 return ii.intValue();
112 }
113 void setM_Product_ID (int M_Product_ID)
114 {
115 setValueNoCheck ("M_Product_ID", new Integer JavaDoc(M_Product_ID));
116 }
117 public int getM_Product_ID()
118 {
119 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Product_ID");
120 if (ii == null) return 0;
121 return ii.intValue();
122 }
123 void setM_ProductionLine_ID (int M_ProductionLine_ID)
124 {
125 if (M_ProductionLine_ID == 0) setValueNoCheck ("M_ProductionLine_ID", null);
126  else
127 setValueNoCheck ("M_ProductionLine_ID", new Integer JavaDoc(M_ProductionLine_ID));
128 }
129 public int getM_ProductionLine_ID()
130 {
131 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_ProductionLine_ID");
132 if (ii == null) return 0;
133 return ii.intValue();
134 }
135 void setM_Transaction_ID (int M_Transaction_ID)
136 {
137 setValueNoCheck ("M_Transaction_ID", new Integer JavaDoc(M_Transaction_ID));
138 }
139 public int getM_Transaction_ID()
140 {
141 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Transaction_ID");
142 if (ii == null) return 0;
143 return ii.intValue();
144 }
145 void setMovementDate (Timestamp MovementDate)
146 {
147 if (MovementDate == null) throw new IllegalArgumentException JavaDoc ("MovementDate is mandatory");
148 setValueNoCheck ("MovementDate", MovementDate);
149 }
150 public Timestamp getMovementDate()
151 {
152 return (Timestamp)getValue("MovementDate");
153 }
154 void setMovementQty (BigDecimal MovementQty)
155 {
156 if (MovementQty == null) throw new IllegalArgumentException JavaDoc ("MovementQty is mandatory");
157 setValueNoCheck ("MovementQty", MovementQty);
158 }
159 public BigDecimal getMovementQty()
160 {
161 BigDecimal bd = (BigDecimal)getValue("MovementQty");
162 if (bd == null) return Env.ZERO;
163 return bd;
164 }
165 public static final String JavaDoc MOVEMENTTYPE_ProductionPlus = "P+";
166 public static final String JavaDoc MOVEMENTTYPE_ProductionMinus = "P-";
167 public static final String JavaDoc MOVEMENTTYPE_CustomerShipment = "C-";
168 public static final String JavaDoc MOVEMENTTYPE_CustomerReturns = "C+";
169 public static final String JavaDoc MOVEMENTTYPE_VendorReceipts = "V+";
170 public static final String JavaDoc MOVEMENTTYPE_VendorReturns = "V-";
171 public static final String JavaDoc MOVEMENTTYPE_InventoryOut = "I-";
172 public static final String JavaDoc MOVEMENTTYPE_InventoryIn = "I+";
173 public static final String JavaDoc MOVEMENTTYPE_MovementFrom = "M-";
174 public static final String JavaDoc MOVEMENTTYPE_MovementTo = "M+";
175 public static final String JavaDoc MOVEMENTTYPE_WorkOrderPlus = "W+";
176 public static final String JavaDoc MOVEMENTTYPE_WorkOrderMinus = "W-";
177 void setMovementType (String JavaDoc MovementType)
178 {
179 if (MovementType.equals("P+") || MovementType.equals("P-") || MovementType.equals("C-") || MovementType.equals("C+") || MovementType.equals("V+") || MovementType.equals("V-") || MovementType.equals("I-") || MovementType.equals("I+") || MovementType.equals("M-") || MovementType.equals("M+") || MovementType.equals("W+") || MovementType.equals("W-"));
180  else throw new IllegalArgumentException JavaDoc ("MovementType Invalid value - Reference_ID=189 - P+ - P- - C- - C+ - V+ - V- - I- - I+ - M- - M+ - W+ - W-");
181 if (MovementType == null) throw new IllegalArgumentException JavaDoc ("MovementType is mandatory");
182 setValueNoCheck ("MovementType", MovementType);
183 }
184 public String JavaDoc getMovementType()
185 {
186 return (String JavaDoc)getValue("MovementType");
187 }
188 }
189
Popular Tags