KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_M_Replenish extends PO
11 {
12 /** Standard Constructor **/
13 public X_M_Replenish (Properties ctx, int M_Replenish_ID)
14 {
15 super (ctx, M_Replenish_ID);
16 /** if (M_Replenish_ID == 0)
17 {
18 setLevel_Max (Env.ZERO);
19 setLevel_Min (Env.ZERO);
20 setM_Product_ID (0);
21 setM_Warehouse_ID (0);
22 setReplenishType (null);
23 }
24  **/

25 }
26 /** Load Constructor **/
27 public X_M_Replenish (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 = 249;
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_Replenish[").append(getID()).append("]");
41 return sb.toString();
42 }
43 public void setLevel_Max (BigDecimal Level_Max)
44 {
45 if (Level_Max == null) throw new IllegalArgumentException JavaDoc ("Level_Max is mandatory");
46 setValue ("Level_Max", Level_Max);
47 }
48 public BigDecimal getLevel_Max()
49 {
50 BigDecimal bd = (BigDecimal)getValue("Level_Max");
51 if (bd == null) return Env.ZERO;
52 return bd;
53 }
54 public void setLevel_Min (BigDecimal Level_Min)
55 {
56 if (Level_Min == null) throw new IllegalArgumentException JavaDoc ("Level_Min is mandatory");
57 setValue ("Level_Min", Level_Min);
58 }
59 public BigDecimal getLevel_Min()
60 {
61 BigDecimal bd = (BigDecimal)getValue("Level_Min");
62 if (bd == null) return Env.ZERO;
63 return bd;
64 }
65 void setM_Product_ID (int M_Product_ID)
66 {
67 setValueNoCheck ("M_Product_ID", new Integer JavaDoc(M_Product_ID));
68 }
69 public int getM_Product_ID()
70 {
71 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Product_ID");
72 if (ii == null) return 0;
73 return ii.intValue();
74 }
75 void setM_Warehouse_ID (int M_Warehouse_ID)
76 {
77 setValueNoCheck ("M_Warehouse_ID", new Integer JavaDoc(M_Warehouse_ID));
78 }
79 public int getM_Warehouse_ID()
80 {
81 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Warehouse_ID");
82 if (ii == null) return 0;
83 return ii.intValue();
84 }
85 public static final String JavaDoc REPLENISHTYPE_MaintainMaximumLevel = "2";
86 public static final String JavaDoc REPLENISHTYPE_Manual = "0";
87 public static final String JavaDoc REPLENISHTYPE_ReorderBelowMinimumLevel = "1";
88 public void setReplenishType (String JavaDoc ReplenishType)
89 {
90 if (ReplenishType.equals("2") || ReplenishType.equals("0") || ReplenishType.equals("1"));
91  else throw new IllegalArgumentException JavaDoc ("ReplenishType Invalid value - Reference_ID=164 - 2 - 0 - 1");
92 if (ReplenishType == null) throw new IllegalArgumentException JavaDoc ("ReplenishType is mandatory");
93 setValue ("ReplenishType", ReplenishType);
94 }
95 public String JavaDoc getReplenishType()
96 {
97 return (String JavaDoc)getValue("ReplenishType");
98 }
99 }
100
Popular Tags