1 2 package org.compiere.model; 3 import java.util.*; 4 import java.sql.*; 5 import java.math.*; 6 import java.io.Serializable ; 7 import org.compiere.util.*; 8 10 public class X_M_Replenish extends PO 11 { 12 13 public X_M_Replenish (Properties ctx, int M_Replenish_ID) 14 { 15 super (ctx, M_Replenish_ID); 16 25 } 26 27 public X_M_Replenish (Properties ctx, ResultSet rs) 28 { 29 super (ctx, rs); 30 } 31 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 toString() 39 { 40 StringBuffer sb = new StringBuffer ("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 ("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 ("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 (M_Product_ID)); 68 } 69 public int getM_Product_ID() 70 { 71 Integer ii = (Integer )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 (M_Warehouse_ID)); 78 } 79 public int getM_Warehouse_ID() 80 { 81 Integer ii = (Integer )getValue("M_Warehouse_ID"); 82 if (ii == null) return 0; 83 return ii.intValue(); 84 } 85 public static final String REPLENISHTYPE_MaintainMaximumLevel = "2"; 86 public static final String REPLENISHTYPE_Manual = "0"; 87 public static final String REPLENISHTYPE_ReorderBelowMinimumLevel = "1"; 88 public void setReplenishType (String ReplenishType) 89 { 90 if (ReplenishType.equals("2") || ReplenishType.equals("0") || ReplenishType.equals("1")); 91 else throw new IllegalArgumentException ("ReplenishType Invalid value - Reference_ID=164 - 2 - 0 - 1"); 92 if (ReplenishType == null) throw new IllegalArgumentException ("ReplenishType is mandatory"); 93 setValue ("ReplenishType", ReplenishType); 94 } 95 public String getReplenishType() 96 { 97 return (String )getValue("ReplenishType"); 98 } 99 } 100
| Popular Tags
|