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_InventoryLine extends PO 11 { 12 13 public X_M_InventoryLine (Properties ctx, int M_InventoryLine_ID) 14 { 15 super (ctx, M_InventoryLine_ID); 16 27 } 28 29 public X_M_InventoryLine (Properties ctx, ResultSet rs) 30 { 31 super (ctx, rs); 32 } 33 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 toString() 41 { 42 StringBuffer sb = new StringBuffer ("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 (C_Charge_ID)); 50 } 51 public int getC_Charge_ID() 52 { 53 Integer ii = (Integer )getValue("C_Charge_ID"); 54 if (ii == null) return 0; 55 return ii.intValue(); 56 } 57 public void setDescription (String Description) 58 { 59 setValue ("Description", Description); 60 } 61 public String getDescription() 62 { 63 return (String )getValue("Description"); 64 } 65 public static final String INVENTORYTYPE_InventoryDifference = "D"; 66 public static final String INVENTORYTYPE_ChargeAccount = "C"; 67 public void setInventoryType (String InventoryType) 68 { 69 if (InventoryType.equals("D") || InventoryType.equals("C")); 70 else throw new IllegalArgumentException ("InventoryType Invalid value - Reference_ID=292 - D - C"); 71 if (InventoryType == null) throw new IllegalArgumentException ("InventoryType is mandatory"); 72 setValue ("InventoryType", InventoryType); 73 } 74 public String getInventoryType() 75 { 76 return (String )getValue("InventoryType"); 77 } 78 public void setLine (int Line) 79 { 80 setValue ("Line", new Integer (Line)); 81 } 82 public int getLine() 83 { 84 Integer ii = (Integer )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 (M_AttributeSetInstance_ID)); 93 } 94 public int getM_AttributeSetInstance_ID() 95 { 96 Integer ii = (Integer )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 (M_InventoryLine_ID)); 103 } 104 public int getM_InventoryLine_ID() 105 { 106 Integer ii = (Integer )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 (M_Inventory_ID)); 113 } 114 public int getM_Inventory_ID() 115 { 116 Integer ii = (Integer )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 (M_Locator_ID)); 123 } 124 public int getM_Locator_ID() 125 { 126 Integer ii = (Integer )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 (M_Product_ID)); 133 } 134 public int getM_Product_ID() 135 { 136 Integer ii = (Integer )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 ("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 ("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 |