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_S_Resource extends PO 11 { 12 13 public X_S_Resource (Properties ctx, int S_Resource_ID) 14 { 15 super (ctx, S_Resource_ID); 16 26 } 27 28 public X_S_Resource (Properties ctx, ResultSet rs) 29 { 30 super (ctx, rs); 31 } 32 33 protected POInfo initPO (Properties ctx) 34 { 35 int AD_Table_ID = 487; 36 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 37 return poi; 38 } 39 public String toString() 40 { 41 StringBuffer sb = new StringBuffer ("X_S_Resource[").append(getID()).append("]"); 42 return sb.toString(); 43 } 44 public void setAD_User_ID (int AD_User_ID) 45 { 46 if (AD_User_ID == 0) setValue ("AD_User_ID", null); 47 else 48 setValue ("AD_User_ID", new Integer (AD_User_ID)); 49 } 50 public int getAD_User_ID() 51 { 52 Integer ii = (Integer )getValue("AD_User_ID"); 53 if (ii == null) return 0; 54 return ii.intValue(); 55 } 56 public void setChargeableQty (BigDecimal ChargeableQty) 57 { 58 setValue ("ChargeableQty", ChargeableQty); 59 } 60 public BigDecimal getChargeableQty() 61 { 62 BigDecimal bd = (BigDecimal)getValue("ChargeableQty"); 63 if (bd == null) return Env.ZERO; 64 return bd; 65 } 66 public void setDescription (String Description) 67 { 68 setValue ("Description", Description); 69 } 70 public String getDescription() 71 { 72 return (String )getValue("Description"); 73 } 74 public void setIsAvailable (boolean IsAvailable) 75 { 76 setValue ("IsAvailable", new Boolean (IsAvailable)); 77 } 78 public boolean isAvailable() 79 { 80 Boolean bb = (Boolean )getValue("IsAvailable"); 81 if (bb != null) return bb.booleanValue(); 82 return false; 83 } 84 public void setM_Warehouse_ID (int M_Warehouse_ID) 85 { 86 setValue ("M_Warehouse_ID", new Integer (M_Warehouse_ID)); 87 } 88 public int getM_Warehouse_ID() 89 { 90 Integer ii = (Integer )getValue("M_Warehouse_ID"); 91 if (ii == null) return 0; 92 return ii.intValue(); 93 } 94 public void setName (String Name) 95 { 96 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 97 setValue ("Name", Name); 98 } 99 public String getName() 100 { 101 return (String )getValue("Name"); 102 } 103 public void setS_ResourceType_ID (int S_ResourceType_ID) 104 { 105 setValue ("S_ResourceType_ID", new Integer (S_ResourceType_ID)); 106 } 107 public int getS_ResourceType_ID() 108 { 109 Integer ii = (Integer )getValue("S_ResourceType_ID"); 110 if (ii == null) return 0; 111 return ii.intValue(); 112 } 113 void setS_Resource_ID (int S_Resource_ID) 114 { 115 setValueNoCheck ("S_Resource_ID", new Integer (S_Resource_ID)); 116 } 117 public int getS_Resource_ID() 118 { 119 Integer ii = (Integer )getValue("S_Resource_ID"); 120 if (ii == null) return 0; 121 return ii.intValue(); 122 } 123 public void setValue (String Value) 124 { 125 if (Value == null) throw new IllegalArgumentException ("Value is mandatory"); 126 setValue ("Value", Value); 127 } 128 public String getValue() 129 { 130 return (String )getValue("Value"); 131 } 132 } 133 | Popular Tags |