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_Category extends PO 11 { 12 13 public X_M_Product_Category (Properties ctx, int M_Product_Category_ID) 14 { 15 super (ctx, M_Product_Category_ID); 16 25 } 26 27 public X_M_Product_Category (Properties ctx, ResultSet rs) 28 { 29 super (ctx, rs); 30 } 31 32 protected POInfo initPO (Properties ctx) 33 { 34 int AD_Table_ID = 209; 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_Category[").append(getID()).append("]"); 41 return sb.toString(); 42 } 43 public void setA_Asset_Group_ID (int A_Asset_Group_ID) 44 { 45 if (A_Asset_Group_ID == 0) setValue ("A_Asset_Group_ID", null); 46 else 47 setValue ("A_Asset_Group_ID", new Integer (A_Asset_Group_ID)); 48 } 49 public int getA_Asset_Group_ID() 50 { 51 Integer ii = (Integer )getValue("A_Asset_Group_ID"); 52 if (ii == null) return 0; 53 return ii.intValue(); 54 } 55 public void setDescription (String Description) 56 { 57 setValue ("Description", Description); 58 } 59 public String getDescription() 60 { 61 return (String )getValue("Description"); 62 } 63 public void setIsDefault (boolean IsDefault) 64 { 65 setValue ("IsDefault", new Boolean (IsDefault)); 66 } 67 public boolean isDefault() 68 { 69 Boolean bb = (Boolean )getValue("IsDefault"); 70 if (bb != null) return bb.booleanValue(); 71 return false; 72 } 73 void setM_Product_Category_ID (int M_Product_Category_ID) 74 { 75 setValueNoCheck ("M_Product_Category_ID", new Integer (M_Product_Category_ID)); 76 } 77 public int getM_Product_Category_ID() 78 { 79 Integer ii = (Integer )getValue("M_Product_Category_ID"); 80 if (ii == null) return 0; 81 return ii.intValue(); 82 } 83 public void setName (String Name) 84 { 85 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 86 setValue ("Name", Name); 87 } 88 public String getName() 89 { 90 return (String )getValue("Name"); 91 } 92 public void setPlannedMargin (BigDecimal PlannedMargin) 93 { 94 if (PlannedMargin == null) throw new IllegalArgumentException ("PlannedMargin is mandatory"); 95 setValue ("PlannedMargin", PlannedMargin); 96 } 97 public BigDecimal getPlannedMargin() 98 { 99 BigDecimal bd = (BigDecimal)getValue("PlannedMargin"); 100 if (bd == null) return Env.ZERO; 101 return bd; 102 } 103 public void setValue (String Value) 104 { 105 if (Value == null) throw new IllegalArgumentException ("Value is mandatory"); 106 setValue ("Value", Value); 107 } 108 public String getValue() 109 { 110 return (String )getValue("Value"); 111 } 112 } 113 | Popular Tags |