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_C_AcctSchema_Element extends PO 11 { 12 13 public X_C_AcctSchema_Element (Properties ctx, int C_AcctSchema_Element_ID) 14 { 15 super (ctx, C_AcctSchema_Element_ID); 16 29 } 30 31 public X_C_AcctSchema_Element (Properties ctx, ResultSet rs) 32 { 33 super (ctx, rs); 34 } 35 36 protected POInfo initPO (Properties ctx) 37 { 38 int AD_Table_ID = 279; 39 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 40 return poi; 41 } 42 public String toString() 43 { 44 StringBuffer sb = new StringBuffer ("X_C_AcctSchema_Element[").append(getID()).append("]"); 45 return sb.toString(); 46 } 47 void setC_AcctSchema_Element_ID (int C_AcctSchema_Element_ID) 48 { 49 setValueNoCheck ("C_AcctSchema_Element_ID", new Integer (C_AcctSchema_Element_ID)); 50 } 51 public int getC_AcctSchema_Element_ID() 52 { 53 Integer ii = (Integer )getValue("C_AcctSchema_Element_ID"); 54 if (ii == null) return 0; 55 return ii.intValue(); 56 } 57 void setC_AcctSchema_ID (int C_AcctSchema_ID) 58 { 59 setValueNoCheck ("C_AcctSchema_ID", new Integer (C_AcctSchema_ID)); 60 } 61 public int getC_AcctSchema_ID() 62 { 63 Integer ii = (Integer )getValue("C_AcctSchema_ID"); 64 if (ii == null) return 0; 65 return ii.intValue(); 66 } 67 public void setC_Activity_ID (int C_Activity_ID) 68 { 69 if (C_Activity_ID == 0) setValue ("C_Activity_ID", null); 70 else 71 setValue ("C_Activity_ID", new Integer (C_Activity_ID)); 72 } 73 public int getC_Activity_ID() 74 { 75 Integer ii = (Integer )getValue("C_Activity_ID"); 76 if (ii == null) return 0; 77 return ii.intValue(); 78 } 79 public void setC_BPartner_ID (int C_BPartner_ID) 80 { 81 if (C_BPartner_ID == 0) setValue ("C_BPartner_ID", null); 82 else 83 setValue ("C_BPartner_ID", new Integer (C_BPartner_ID)); 84 } 85 public int getC_BPartner_ID() 86 { 87 Integer ii = (Integer )getValue("C_BPartner_ID"); 88 if (ii == null) return 0; 89 return ii.intValue(); 90 } 91 public void setC_Campaign_ID (int C_Campaign_ID) 92 { 93 if (C_Campaign_ID == 0) setValue ("C_Campaign_ID", null); 94 else 95 setValue ("C_Campaign_ID", new Integer (C_Campaign_ID)); 96 } 97 public int getC_Campaign_ID() 98 { 99 Integer ii = (Integer )getValue("C_Campaign_ID"); 100 if (ii == null) return 0; 101 return ii.intValue(); 102 } 103 public void setC_ElementValue_ID (int C_ElementValue_ID) 104 { 105 if (C_ElementValue_ID == 0) setValue ("C_ElementValue_ID", null); 106 else 107 setValue ("C_ElementValue_ID", new Integer (C_ElementValue_ID)); 108 } 109 public int getC_ElementValue_ID() 110 { 111 Integer ii = (Integer )getValue("C_ElementValue_ID"); 112 if (ii == null) return 0; 113 return ii.intValue(); 114 } 115 public void setC_Element_ID (int C_Element_ID) 116 { 117 setValue ("C_Element_ID", new Integer (C_Element_ID)); 118 } 119 public int getC_Element_ID() 120 { 121 Integer ii = (Integer )getValue("C_Element_ID"); 122 if (ii == null) return 0; 123 return ii.intValue(); 124 } 125 public void setC_Location_ID (int C_Location_ID) 126 { 127 if (C_Location_ID == 0) setValue ("C_Location_ID", null); 128 else 129 setValue ("C_Location_ID", new Integer (C_Location_ID)); 130 } 131 public int getC_Location_ID() 132 { 133 Integer ii = (Integer )getValue("C_Location_ID"); 134 if (ii == null) return 0; 135 return ii.intValue(); 136 } 137 public void setC_Project_ID (int C_Project_ID) 138 { 139 if (C_Project_ID == 0) setValue ("C_Project_ID", null); 140 else 141 setValue ("C_Project_ID", new Integer (C_Project_ID)); 142 } 143 public int getC_Project_ID() 144 { 145 Integer ii = (Integer )getValue("C_Project_ID"); 146 if (ii == null) return 0; 147 return ii.intValue(); 148 } 149 public void setC_SalesRegion_ID (int C_SalesRegion_ID) 150 { 151 if (C_SalesRegion_ID == 0) setValue ("C_SalesRegion_ID", null); 152 else 153 setValue ("C_SalesRegion_ID", new Integer (C_SalesRegion_ID)); 154 } 155 public int getC_SalesRegion_ID() 156 { 157 Integer ii = (Integer )getValue("C_SalesRegion_ID"); 158 if (ii == null) return 0; 159 return ii.intValue(); 160 } 161 public static final String ELEMENTTYPE_LocationFrom = "LF"; 162 public static final String ELEMENTTYPE_LocationTo = "LT"; 163 public static final String ELEMENTTYPE_SalesRegion = "SR"; 164 public static final String ELEMENTTYPE_Project = "PJ"; 165 public static final String ELEMENTTYPE_Campaign = "MC"; 166 public static final String ELEMENTTYPE_User1 = "U1"; 167 public static final String ELEMENTTYPE_User2 = "U2"; 168 public static final String ELEMENTTYPE_Activity = "AY"; 169 public static final String ELEMENTTYPE_Organization = "OO"; 170 public static final String ELEMENTTYPE_Account = "AC"; 171 public static final String ELEMENTTYPE_Product = "PR"; 172 public static final String ELEMENTTYPE_BusPartner = "BP"; 173 public static final String ELEMENTTYPE_TrxOrg = "OT"; 174 public void setElementType (String ElementType) 175 { 176 if (ElementType.equals("LF") || ElementType.equals("LT") || ElementType.equals("SR") || ElementType.equals("PJ") || ElementType.equals("MC") || ElementType.equals("U1") || ElementType.equals("U2") || ElementType.equals("AY") || ElementType.equals("OO") || ElementType.equals("AC") || ElementType.equals("PR") || ElementType.equals("BP") || ElementType.equals("OT")); 177 else throw new IllegalArgumentException ("ElementType Invalid value - Reference_ID=181 - LF - LT - SR - PJ - MC - U1 - U2 - AY - OO - AC - PR - BP - OT"); 178 if (ElementType == null) throw new IllegalArgumentException ("ElementType is mandatory"); 179 setValue ("ElementType", ElementType); 180 } 181 public String getElementType() 182 { 183 return (String )getValue("ElementType"); 184 } 185 public void setIsBalanced (boolean IsBalanced) 186 { 187 setValue ("IsBalanced", new Boolean (IsBalanced)); 188 } 189 public boolean isBalanced() 190 { 191 Boolean bb = (Boolean )getValue("IsBalanced"); 192 if (bb != null) return bb.booleanValue(); 193 return false; 194 } 195 public void setIsMandatory (boolean IsMandatory) 196 { 197 setValue ("IsMandatory", new Boolean (IsMandatory)); 198 } 199 public boolean isMandatory() 200 { 201 Boolean bb = (Boolean )getValue("IsMandatory"); 202 if (bb != null) return bb.booleanValue(); 203 return false; 204 } 205 public void setM_Product_ID (int M_Product_ID) 206 { 207 if (M_Product_ID == 0) setValue ("M_Product_ID", null); 208 else 209 setValue ("M_Product_ID", new Integer (M_Product_ID)); 210 } 211 public int getM_Product_ID() 212 { 213 Integer ii = (Integer )getValue("M_Product_ID"); 214 if (ii == null) return 0; 215 return ii.intValue(); 216 } 217 public void setName (String Name) 218 { 219 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 220 setValue ("Name", Name); 221 } 222 public String getName() 223 { 224 return (String )getValue("Name"); 225 } 226 public void setOrg_ID (int Org_ID) 227 { 228 setValue ("Org_ID", new Integer (Org_ID)); 229 } 230 public int getOrg_ID() 231 { 232 Integer ii = (Integer )getValue("Org_ID"); 233 if (ii == null) return 0; 234 return ii.intValue(); 235 } 236 public void setSeqNo (int SeqNo) 237 { 238 setValue ("SeqNo", new Integer (SeqNo)); 239 } 240 public int getSeqNo() 241 { 242 Integer ii = (Integer )getValue("SeqNo"); 243 if (ii == null) return 0; 244 return ii.intValue(); 245 } 246 } 247 | Popular Tags |