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_Fact_Acct extends PO 11 { 12 13 public X_Fact_Acct (Properties ctx, int Fact_Acct_ID) 14 { 15 super (ctx, Fact_Acct_ID); 16 35 } 36 37 public X_Fact_Acct (Properties ctx, ResultSet rs) 38 { 39 super (ctx, rs); 40 } 41 42 protected POInfo initPO (Properties ctx) 43 { 44 int AD_Table_ID = 270; 45 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 46 return poi; 47 } 48 public String toString() 49 { 50 StringBuffer sb = new StringBuffer ("X_Fact_Acct[").append(getID()).append("]"); 51 return sb.toString(); 52 } 53 void setAD_OrgTrx_ID (int AD_OrgTrx_ID) 54 { 55 if (AD_OrgTrx_ID == 0) setValueNoCheck ("AD_OrgTrx_ID", null); 56 else 57 setValueNoCheck ("AD_OrgTrx_ID", new Integer (AD_OrgTrx_ID)); 58 } 59 public int getAD_OrgTrx_ID() 60 { 61 Integer ii = (Integer )getValue("AD_OrgTrx_ID"); 62 if (ii == null) return 0; 63 return ii.intValue(); 64 } 65 void setAD_Table_ID (int AD_Table_ID) 66 { 67 setValueNoCheck ("AD_Table_ID", new Integer (AD_Table_ID)); 68 } 69 public int getAD_Table_ID() 70 { 71 Integer ii = (Integer )getValue("AD_Table_ID"); 72 if (ii == null) return 0; 73 return ii.intValue(); 74 } 75 public void setA_Asset_ID (int A_Asset_ID) 76 { 77 if (A_Asset_ID == 0) setValue ("A_Asset_ID", null); 78 else 79 setValue ("A_Asset_ID", new Integer (A_Asset_ID)); 80 } 81 public int getA_Asset_ID() 82 { 83 Integer ii = (Integer )getValue("A_Asset_ID"); 84 if (ii == null) return 0; 85 return ii.intValue(); 86 } 87 void setAccount_ID (int Account_ID) 88 { 89 setValueNoCheck ("Account_ID", new Integer (Account_ID)); 90 } 91 public int getAccount_ID() 92 { 93 Integer ii = (Integer )getValue("Account_ID"); 94 if (ii == null) return 0; 95 return ii.intValue(); 96 } 97 void setAmtAcctCr (BigDecimal AmtAcctCr) 98 { 99 if (AmtAcctCr == null) throw new IllegalArgumentException ("AmtAcctCr is mandatory"); 100 setValueNoCheck ("AmtAcctCr", AmtAcctCr); 101 } 102 public BigDecimal getAmtAcctCr() 103 { 104 BigDecimal bd = (BigDecimal)getValue("AmtAcctCr"); 105 if (bd == null) return Env.ZERO; 106 return bd; 107 } 108 void setAmtAcctDr (BigDecimal AmtAcctDr) 109 { 110 if (AmtAcctDr == null) throw new IllegalArgumentException ("AmtAcctDr is mandatory"); 111 setValueNoCheck ("AmtAcctDr", AmtAcctDr); 112 } 113 public BigDecimal getAmtAcctDr() 114 { 115 BigDecimal bd = (BigDecimal)getValue("AmtAcctDr"); 116 if (bd == null) return Env.ZERO; 117 return bd; 118 } 119 void setAmtSourceCr (BigDecimal AmtSourceCr) 120 { 121 if (AmtSourceCr == null) throw new IllegalArgumentException ("AmtSourceCr is mandatory"); 122 setValueNoCheck ("AmtSourceCr", AmtSourceCr); 123 } 124 public BigDecimal getAmtSourceCr() 125 { 126 BigDecimal bd = (BigDecimal)getValue("AmtSourceCr"); 127 if (bd == null) return Env.ZERO; 128 return bd; 129 } 130 void setAmtSourceDr (BigDecimal AmtSourceDr) 131 { 132 if (AmtSourceDr == null) throw new IllegalArgumentException ("AmtSourceDr is mandatory"); 133 setValueNoCheck ("AmtSourceDr", AmtSourceDr); 134 } 135 public BigDecimal getAmtSourceDr() 136 { 137 BigDecimal bd = (BigDecimal)getValue("AmtSourceDr"); 138 if (bd == null) return Env.ZERO; 139 return bd; 140 } 141 void setC_AcctSchema_ID (int C_AcctSchema_ID) 142 { 143 setValueNoCheck ("C_AcctSchema_ID", new Integer (C_AcctSchema_ID)); 144 } 145 public int getC_AcctSchema_ID() 146 { 147 Integer ii = (Integer )getValue("C_AcctSchema_ID"); 148 if (ii == null) return 0; 149 return ii.intValue(); 150 } 151 void setC_Activity_ID (int C_Activity_ID) 152 { 153 if (C_Activity_ID == 0) setValueNoCheck ("C_Activity_ID", null); 154 else 155 setValueNoCheck ("C_Activity_ID", new Integer (C_Activity_ID)); 156 } 157 public int getC_Activity_ID() 158 { 159 Integer ii = (Integer )getValue("C_Activity_ID"); 160 if (ii == null) return 0; 161 return ii.intValue(); 162 } 163 void setC_BPartner_ID (int C_BPartner_ID) 164 { 165 if (C_BPartner_ID == 0) setValueNoCheck ("C_BPartner_ID", null); 166 else 167 setValueNoCheck ("C_BPartner_ID", new Integer (C_BPartner_ID)); 168 } 169 public int getC_BPartner_ID() 170 { 171 Integer ii = (Integer )getValue("C_BPartner_ID"); 172 if (ii == null) return 0; 173 return ii.intValue(); 174 } 175 void setC_Campaign_ID (int C_Campaign_ID) 176 { 177 if (C_Campaign_ID == 0) setValueNoCheck ("C_Campaign_ID", null); 178 else 179 setValueNoCheck ("C_Campaign_ID", new Integer (C_Campaign_ID)); 180 } 181 public int getC_Campaign_ID() 182 { 183 Integer ii = (Integer )getValue("C_Campaign_ID"); 184 if (ii == null) return 0; 185 return ii.intValue(); 186 } 187 void setC_Currency_ID (int C_Currency_ID) 188 { 189 setValueNoCheck ("C_Currency_ID", new Integer (C_Currency_ID)); 190 } 191 public int getC_Currency_ID() 192 { 193 Integer ii = (Integer )getValue("C_Currency_ID"); 194 if (ii == null) return 0; 195 return ii.intValue(); 196 } 197 void setC_LocFrom_ID (int C_LocFrom_ID) 198 { 199 if (C_LocFrom_ID == 0) setValueNoCheck ("C_LocFrom_ID", null); 200 else 201 setValueNoCheck ("C_LocFrom_ID", new Integer (C_LocFrom_ID)); 202 } 203 public int getC_LocFrom_ID() 204 { 205 Integer ii = (Integer )getValue("C_LocFrom_ID"); 206 if (ii == null) return 0; 207 return ii.intValue(); 208 } 209 void setC_LocTo_ID (int C_LocTo_ID) 210 { 211 if (C_LocTo_ID == 0) setValueNoCheck ("C_LocTo_ID", null); 212 else 213 setValueNoCheck ("C_LocTo_ID", new Integer (C_LocTo_ID)); 214 } 215 public int getC_LocTo_ID() 216 { 217 Integer ii = (Integer )getValue("C_LocTo_ID"); 218 if (ii == null) return 0; 219 return ii.intValue(); 220 } 221 void setC_Period_ID (int C_Period_ID) 222 { 223 setValueNoCheck ("C_Period_ID", new Integer (C_Period_ID)); 224 } 225 public int getC_Period_ID() 226 { 227 Integer ii = (Integer )getValue("C_Period_ID"); 228 if (ii == null) return 0; 229 return ii.intValue(); 230 } 231 void setC_Project_ID (int C_Project_ID) 232 { 233 if (C_Project_ID == 0) setValueNoCheck ("C_Project_ID", null); 234 else 235 setValueNoCheck ("C_Project_ID", new Integer (C_Project_ID)); 236 } 237 public int getC_Project_ID() 238 { 239 Integer ii = (Integer )getValue("C_Project_ID"); 240 if (ii == null) return 0; 241 return ii.intValue(); 242 } 243 void setC_SalesRegion_ID (int C_SalesRegion_ID) 244 { 245 if (C_SalesRegion_ID == 0) setValueNoCheck ("C_SalesRegion_ID", null); 246 else 247 setValueNoCheck ("C_SalesRegion_ID", new Integer (C_SalesRegion_ID)); 248 } 249 public int getC_SalesRegion_ID() 250 { 251 Integer ii = (Integer )getValue("C_SalesRegion_ID"); 252 if (ii == null) return 0; 253 return ii.intValue(); 254 } 255 void setC_Tax_ID (int C_Tax_ID) 256 { 257 if (C_Tax_ID == 0) setValueNoCheck ("C_Tax_ID", null); 258 else 259 setValueNoCheck ("C_Tax_ID", new Integer (C_Tax_ID)); 260 } 261 public int getC_Tax_ID() 262 { 263 Integer ii = (Integer )getValue("C_Tax_ID"); 264 if (ii == null) return 0; 265 return ii.intValue(); 266 } 267 void setC_UOM_ID (int C_UOM_ID) 268 { 269 if (C_UOM_ID == 0) setValueNoCheck ("C_UOM_ID", null); 270 else 271 setValueNoCheck ("C_UOM_ID", new Integer (C_UOM_ID)); 272 } 273 public int getC_UOM_ID() 274 { 275 Integer ii = (Integer )getValue("C_UOM_ID"); 276 if (ii == null) return 0; 277 return ii.intValue(); 278 } 279 void setDateAcct (Timestamp DateAcct) 280 { 281 if (DateAcct == null) throw new IllegalArgumentException ("DateAcct is mandatory"); 282 setValueNoCheck ("DateAcct", DateAcct); 283 } 284 public Timestamp getDateAcct() 285 { 286 return (Timestamp)getValue("DateAcct"); 287 } 288 void setDateTrx (Timestamp DateTrx) 289 { 290 if (DateTrx == null) throw new IllegalArgumentException ("DateTrx is mandatory"); 291 setValueNoCheck ("DateTrx", DateTrx); 292 } 293 public Timestamp getDateTrx() 294 { 295 return (Timestamp)getValue("DateTrx"); 296 } 297 public void setDescription (String Description) 298 { 299 setValue ("Description", Description); 300 } 301 public String getDescription() 302 { 303 return (String )getValue("Description"); 304 } 305 void setFact_Acct_ID (int Fact_Acct_ID) 306 { 307 setValueNoCheck ("Fact_Acct_ID", new Integer (Fact_Acct_ID)); 308 } 309 public int getFact_Acct_ID() 310 { 311 Integer ii = (Integer )getValue("Fact_Acct_ID"); 312 if (ii == null) return 0; 313 return ii.intValue(); 314 } 315 void setGL_Budget_ID (int GL_Budget_ID) 316 { 317 if (GL_Budget_ID == 0) setValueNoCheck ("GL_Budget_ID", null); 318 else 319 setValueNoCheck ("GL_Budget_ID", new Integer (GL_Budget_ID)); 320 } 321 public int getGL_Budget_ID() 322 { 323 Integer ii = (Integer )getValue("GL_Budget_ID"); 324 if (ii == null) return 0; 325 return ii.intValue(); 326 } 327 void setGL_Category_ID (int GL_Category_ID) 328 { 329 setValueNoCheck ("GL_Category_ID", new Integer (GL_Category_ID)); 330 } 331 public int getGL_Category_ID() 332 { 333 Integer ii = (Integer )getValue("GL_Category_ID"); 334 if (ii == null) return 0; 335 return ii.intValue(); 336 } 337 void setLine_ID (int Line_ID) 338 { 339 if (Line_ID == 0) setValueNoCheck ("Line_ID", null); 340 else 341 setValueNoCheck ("Line_ID", new Integer (Line_ID)); 342 } 343 public int getLine_ID() 344 { 345 Integer ii = (Integer )getValue("Line_ID"); 346 if (ii == null) return 0; 347 return ii.intValue(); 348 } 349 void setM_Locator_ID (int M_Locator_ID) 350 { 351 if (M_Locator_ID == 0) setValueNoCheck ("M_Locator_ID", null); 352 else 353 setValueNoCheck ("M_Locator_ID", new Integer (M_Locator_ID)); 354 } 355 public int getM_Locator_ID() 356 { 357 Integer ii = (Integer )getValue("M_Locator_ID"); 358 if (ii == null) return 0; 359 return ii.intValue(); 360 } 361 void setM_Product_ID (int M_Product_ID) 362 { 363 if (M_Product_ID == 0) setValueNoCheck ("M_Product_ID", null); 364 else 365 setValueNoCheck ("M_Product_ID", new Integer (M_Product_ID)); 366 } 367 public int getM_Product_ID() 368 { 369 Integer ii = (Integer )getValue("M_Product_ID"); 370 if (ii == null) return 0; 371 return ii.intValue(); 372 } 373 public static final String POSTINGTYPE_Actual = "A"; 374 public static final String POSTINGTYPE_Budget = "B"; 375 public static final String POSTINGTYPE_Encumbrance = "E"; 376 public static final String POSTINGTYPE_Statistical = "S"; 377 void setPostingType (String PostingType) 378 { 379 if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S")); 380 else throw new IllegalArgumentException ("PostingType Invalid value - Reference_ID=125 - A - B - E - S"); 381 if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory"); 382 setValueNoCheck ("PostingType", PostingType); 383 } 384 public String getPostingType() 385 { 386 return (String )getValue("PostingType"); 387 } 388 void setQty (BigDecimal Qty) 389 { 390 setValueNoCheck ("Qty", Qty); 391 } 392 public BigDecimal getQty() 393 { 394 BigDecimal bd = (BigDecimal)getValue("Qty"); 395 if (bd == null) return Env.ZERO; 396 return bd; 397 } 398 void setRecord_ID (int Record_ID) 399 { 400 setValueNoCheck ("Record_ID", new Integer (Record_ID)); 401 } 402 public int getRecord_ID() 403 { 404 Integer ii = (Integer )getValue("Record_ID"); 405 if (ii == null) return 0; 406 return ii.intValue(); 407 } 408 void setUser1_ID (int User1_ID) 409 { 410 if (User1_ID == 0) setValueNoCheck ("User1_ID", null); 411 else 412 setValueNoCheck ("User1_ID", new Integer (User1_ID)); 413 } 414 public int getUser1_ID() 415 { 416 Integer ii = (Integer )getValue("User1_ID"); 417 if (ii == null) return 0; 418 return ii.intValue(); 419 } 420 void setUser2_ID (int User2_ID) 421 { 422 if (User2_ID == 0) setValueNoCheck ("User2_ID", null); 423 else 424 setValueNoCheck ("User2_ID", new Integer (User2_ID)); 425 } 426 public int getUser2_ID() 427 { 428 Integer ii = (Integer )getValue("User2_ID"); 429 if (ii == null) return 0; 430 return ii.intValue(); 431 } 432 } 433 | Popular Tags |