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_Product_BOM extends PO 11 { 12 13 public X_M_Product_BOM (Properties ctx, int M_Product_BOM_ID) 14 { 15 super (ctx, M_Product_BOM_ID); 16 25 } 26 27 public X_M_Product_BOM (Properties ctx, ResultSet rs) 28 { 29 super (ctx, rs); 30 } 31 32 protected POInfo initPO (Properties ctx) 33 { 34 int AD_Table_ID = 383; 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_Product_BOM[").append(getID()).append("]"); 41 return sb.toString(); 42 } 43 public void setBOMQty (BigDecimal BOMQty) 44 { 45 if (BOMQty == null) throw new IllegalArgumentException ("BOMQty is mandatory"); 46 setValue ("BOMQty", BOMQty); 47 } 48 public BigDecimal getBOMQty() 49 { 50 BigDecimal bd = (BigDecimal)getValue("BOMQty"); 51 if (bd == null) return Env.ZERO; 52 return bd; 53 } 54 public static final String BOMTYPE_PartBOM = "P"; 55 public static final String BOMTYPE_Option = "O"; 56 public static final String BOMTYPE_AlternativeGroup1 = "1"; 57 public static final String BOMTYPE_AlternativeGroup2 = "2"; 58 public static final String BOMTYPE_AlternaltveGroup3 = "3"; 59 public static final String BOMTYPE_AlternativeGroup4 = "4"; 60 public void setBOMType (String BOMType) 61 { 62 if (BOMType.equals("P") || BOMType.equals("O") || BOMType.equals("1") || BOMType.equals("2") || BOMType.equals("3") || BOMType.equals("4")); 63 else throw new IllegalArgumentException ("BOMType Invalid value - Reference_ID=279 - P - O - 1 - 2 - 3 - 4"); 64 setValue ("BOMType", BOMType); 65 } 66 public String getBOMType() 67 { 68 return (String )getValue("BOMType"); 69 } 70 public void setDescription (String Description) 71 { 72 setValue ("Description", Description); 73 } 74 public String getDescription() 75 { 76 return (String )getValue("Description"); 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_ProductBOM_ID (int M_ProductBOM_ID) 89 { 90 setValue ("M_ProductBOM_ID", new Integer (M_ProductBOM_ID)); 91 } 92 public int getM_ProductBOM_ID() 93 { 94 Integer ii = (Integer )getValue("M_ProductBOM_ID"); 95 if (ii == null) return 0; 96 return ii.intValue(); 97 } 98 void setM_Product_BOM_ID (int M_Product_BOM_ID) 99 { 100 setValueNoCheck ("M_Product_BOM_ID", new Integer (M_Product_BOM_ID)); 101 } 102 public int getM_Product_BOM_ID() 103 { 104 Integer ii = (Integer )getValue("M_Product_BOM_ID"); 105 if (ii == null) return 0; 106 return ii.intValue(); 107 } 108 void setM_Product_ID (int M_Product_ID) 109 { 110 setValueNoCheck ("M_Product_ID", new Integer (M_Product_ID)); 111 } 112 public int getM_Product_ID() 113 { 114 Integer ii = (Integer )getValue("M_Product_ID"); 115 if (ii == null) return 0; 116 return ii.intValue(); 117 } 118 } 119
| Popular Tags
|