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_BPartner extends PO 11 { 12 13 public X_C_BPartner (Properties ctx, int C_BPartner_ID) 14 { 15 super (ctx, C_BPartner_ID); 16 34 } 35 36 public X_C_BPartner (Properties ctx, ResultSet rs) 37 { 38 super (ctx, rs); 39 } 40 41 protected POInfo initPO (Properties ctx) 42 { 43 int AD_Table_ID = 291; 44 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 45 return poi; 46 } 47 public String toString() 48 { 49 StringBuffer sb = new StringBuffer ("X_C_BPartner[").append(getID()).append("]"); 50 return sb.toString(); 51 } 52 public void setAD_Language (String AD_Language) 53 { 54 setValue ("AD_Language", AD_Language); 55 } 56 public String getAD_Language() 57 { 58 return (String )getValue("AD_Language"); 59 } 60 public void setAcqusitionCost (BigDecimal AcqusitionCost) 61 { 62 setValue ("AcqusitionCost", AcqusitionCost); 63 } 64 public BigDecimal getAcqusitionCost() 65 { 66 BigDecimal bd = (BigDecimal)getValue("AcqusitionCost"); 67 if (bd == null) return Env.ZERO; 68 return bd; 69 } 70 public void setActualLifeTimeValue (BigDecimal ActualLifeTimeValue) 71 { 72 setValue ("ActualLifeTimeValue", ActualLifeTimeValue); 73 } 74 public BigDecimal getActualLifeTimeValue() 75 { 76 BigDecimal bd = (BigDecimal)getValue("ActualLifeTimeValue"); 77 if (bd == null) return Env.ZERO; 78 return bd; 79 } 80 public void setBPartner_Parent_ID (int BPartner_Parent_ID) 81 { 82 if (BPartner_Parent_ID == 0) setValue ("BPartner_Parent_ID", null); 83 else 84 setValue ("BPartner_Parent_ID", new Integer (BPartner_Parent_ID)); 85 } 86 public int getBPartner_Parent_ID() 87 { 88 Integer ii = (Integer )getValue("BPartner_Parent_ID"); 89 if (ii == null) return 0; 90 return ii.intValue(); 91 } 92 public void setC_BP_Group_ID (int C_BP_Group_ID) 93 { 94 setValue ("C_BP_Group_ID", new Integer (C_BP_Group_ID)); 95 } 96 public int getC_BP_Group_ID() 97 { 98 Integer ii = (Integer )getValue("C_BP_Group_ID"); 99 if (ii == null) return 0; 100 return ii.intValue(); 101 } 102 void setC_BPartner_ID (int C_BPartner_ID) 103 { 104 setValueNoCheck ("C_BPartner_ID", new Integer (C_BPartner_ID)); 105 } 106 public int getC_BPartner_ID() 107 { 108 Integer ii = (Integer )getValue("C_BPartner_ID"); 109 if (ii == null) return 0; 110 return ii.intValue(); 111 } 112 public void setC_Dunning_ID (int C_Dunning_ID) 113 { 114 if (C_Dunning_ID == 0) setValue ("C_Dunning_ID", null); 115 else 116 setValue ("C_Dunning_ID", new Integer (C_Dunning_ID)); 117 } 118 public int getC_Dunning_ID() 119 { 120 Integer ii = (Integer )getValue("C_Dunning_ID"); 121 if (ii == null) return 0; 122 return ii.intValue(); 123 } 124 public void setC_Greeting_ID (int C_Greeting_ID) 125 { 126 if (C_Greeting_ID == 0) setValue ("C_Greeting_ID", null); 127 else 128 setValue ("C_Greeting_ID", new Integer (C_Greeting_ID)); 129 } 130 public int getC_Greeting_ID() 131 { 132 Integer ii = (Integer )getValue("C_Greeting_ID"); 133 if (ii == null) return 0; 134 return ii.intValue(); 135 } 136 public void setC_InvoiceSchedule_ID (int C_InvoiceSchedule_ID) 137 { 138 if (C_InvoiceSchedule_ID == 0) setValue ("C_InvoiceSchedule_ID", null); 139 else 140 setValue ("C_InvoiceSchedule_ID", new Integer (C_InvoiceSchedule_ID)); 141 } 142 public int getC_InvoiceSchedule_ID() 143 { 144 Integer ii = (Integer )getValue("C_InvoiceSchedule_ID"); 145 if (ii == null) return 0; 146 return ii.intValue(); 147 } 148 public void setC_PaymentTerm_ID (int C_PaymentTerm_ID) 149 { 150 if (C_PaymentTerm_ID == 0) setValue ("C_PaymentTerm_ID", null); 151 else 152 setValue ("C_PaymentTerm_ID", new Integer (C_PaymentTerm_ID)); 153 } 154 public int getC_PaymentTerm_ID() 155 { 156 Integer ii = (Integer )getValue("C_PaymentTerm_ID"); 157 if (ii == null) return 0; 158 return ii.intValue(); 159 } 160 public void setDUNS (String DUNS) 161 { 162 setValue ("DUNS", DUNS); 163 } 164 public String getDUNS() 165 { 166 return (String )getValue("DUNS"); 167 } 168 public static final String DELIVERYRULE_AfterReceipt = "R"; 169 public static final String DELIVERYRULE_Availability = "A"; 170 public static final String DELIVERYRULE_CompleteLine = "L"; 171 public static final String DELIVERYRULE_CompleteOrder = "O"; 172 public void setDeliveryRule (String DeliveryRule) 173 { 174 if (DeliveryRule.equals("R") || DeliveryRule.equals("A") || DeliveryRule.equals("L") || DeliveryRule.equals("O")); 175 else throw new IllegalArgumentException ("DeliveryRule Invalid value - Reference_ID=151 - R - A - L - O"); 176 setValue ("DeliveryRule", DeliveryRule); 177 } 178 public String getDeliveryRule() 179 { 180 return (String )getValue("DeliveryRule"); 181 } 182 public static final String DELIVERYVIARULE_Pickup = "P"; 183 public static final String DELIVERYVIARULE_Delivery = "D"; 184 public static final String DELIVERYVIARULE_Shipper = "S"; 185 public void setDeliveryViaRule (String DeliveryViaRule) 186 { 187 if (DeliveryViaRule.equals("P") || DeliveryViaRule.equals("D") || DeliveryViaRule.equals("S")); 188 else throw new IllegalArgumentException ("DeliveryViaRule Invalid value - Reference_ID=152 - P - D - S"); 189 setValue ("DeliveryViaRule", DeliveryViaRule); 190 } 191 public String getDeliveryViaRule() 192 { 193 return (String )getValue("DeliveryViaRule"); 194 } 195 public void setDescription (String Description) 196 { 197 setValue ("Description", Description); 198 } 199 public String getDescription() 200 { 201 return (String )getValue("Description"); 202 } 203 public void setDocumentCopies (int DocumentCopies) 204 { 205 setValue ("DocumentCopies", new Integer (DocumentCopies)); 206 } 207 public int getDocumentCopies() 208 { 209 Integer ii = (Integer )getValue("DocumentCopies"); 210 if (ii == null) return 0; 211 return ii.intValue(); 212 } 213 public void setFirstSale (Timestamp FirstSale) 214 { 215 setValue ("FirstSale", FirstSale); 216 } 217 public Timestamp getFirstSale() 218 { 219 return (Timestamp)getValue("FirstSale"); 220 } 221 public static final String FREIGHTCOSTRULE_FreightIncluded = "I"; 222 public static final String FREIGHTCOSTRULE_FixPrice = "F"; 223 public static final String FREIGHTCOSTRULE_Calculated = "C"; 224 public static final String FREIGHTCOSTRULE_Line = "L"; 225 public void setFreightCostRule (String FreightCostRule) 226 { 227 if (FreightCostRule.equals("I") || FreightCostRule.equals("F") || FreightCostRule.equals("C") || FreightCostRule.equals("L")); 228 else throw new IllegalArgumentException ("FreightCostRule Invalid value - Reference_ID=153 - I - F - C - L"); 229 setValue ("FreightCostRule", FreightCostRule); 230 } 231 public String getFreightCostRule() 232 { 233 return (String )getValue("FreightCostRule"); 234 } 235 public static final String INVOICERULE_AfterOrderDelivered = "O"; 236 public static final String INVOICERULE_AfterDelivery = "D"; 237 public static final String INVOICERULE_CustomerScheduleAfterDelivery = "S"; 238 public static final String INVOICERULE_Immediate = "I"; 239 public void setInvoiceRule (String InvoiceRule) 240 { 241 if (InvoiceRule.equals("O") || InvoiceRule.equals("D") || InvoiceRule.equals("S") || InvoiceRule.equals("I")); 242 else throw new IllegalArgumentException ("InvoiceRule Invalid value - Reference_ID=150 - O - D - S - I"); 243 setValue ("InvoiceRule", InvoiceRule); 244 } 245 public String getInvoiceRule() 246 { 247 return (String )getValue("InvoiceRule"); 248 } 249 public void setInvoice_PrintFormat_ID (int Invoice_PrintFormat_ID) 250 { 251 if (Invoice_PrintFormat_ID == 0) setValue ("Invoice_PrintFormat_ID", null); 252 else 253 setValue ("Invoice_PrintFormat_ID", new Integer (Invoice_PrintFormat_ID)); 254 } 255 public int getInvoice_PrintFormat_ID() 256 { 257 Integer ii = (Integer )getValue("Invoice_PrintFormat_ID"); 258 if (ii == null) return 0; 259 return ii.intValue(); 260 } 261 public void setIsCustomer (boolean IsCustomer) 262 { 263 setValue ("IsCustomer", new Boolean (IsCustomer)); 264 } 265 public boolean isCustomer() 266 { 267 Boolean bb = (Boolean )getValue("IsCustomer"); 268 if (bb != null) return bb.booleanValue(); 269 return false; 270 } 271 public void setIsDiscountPrinted (boolean IsDiscountPrinted) 272 { 273 setValue ("IsDiscountPrinted", new Boolean (IsDiscountPrinted)); 274 } 275 public boolean isDiscountPrinted() 276 { 277 Boolean bb = (Boolean )getValue("IsDiscountPrinted"); 278 if (bb != null) return bb.booleanValue(); 279 return false; 280 } 281 public void setIsEmployee (boolean IsEmployee) 282 { 283 setValue ("IsEmployee", new Boolean (IsEmployee)); 284 } 285 public boolean isEmployee() 286 { 287 Boolean bb = (Boolean )getValue("IsEmployee"); 288 if (bb != null) return bb.booleanValue(); 289 return false; 290 } 291 public void setIsOneTime (boolean IsOneTime) 292 { 293 setValue ("IsOneTime", new Boolean (IsOneTime)); 294 } 295 public boolean isOneTime() 296 { 297 Boolean bb = (Boolean )getValue("IsOneTime"); 298 if (bb != null) return bb.booleanValue(); 299 return false; 300 } 301 public void setIsProspect (boolean IsProspect) 302 { 303 setValue ("IsProspect", new Boolean (IsProspect)); 304 } 305 public boolean isProspect() 306 { 307 Boolean bb = (Boolean )getValue("IsProspect"); 308 if (bb != null) return bb.booleanValue(); 309 return false; 310 } 311 public void setIsSalesRep (boolean IsSalesRep) 312 { 313 setValue ("IsSalesRep", new Boolean (IsSalesRep)); 314 } 315 public boolean isSalesRep() 316 { 317 Boolean bb = (Boolean )getValue("IsSalesRep"); 318 if (bb != null) return bb.booleanValue(); 319 return false; 320 } 321 public void setIsSummary (boolean IsSummary) 322 { 323 setValue ("IsSummary", new Boolean (IsSummary)); 324 } 325 public boolean isSummary() 326 { 327 Boolean bb = (Boolean )getValue("IsSummary"); 328 if (bb != null) return bb.booleanValue(); 329 return false; 330 } 331 public void setIsTaxExempt (boolean IsTaxExempt) 332 { 333 setValue ("IsTaxExempt", new Boolean (IsTaxExempt)); 334 } 335 public boolean isTaxExempt() 336 { 337 Boolean bb = (Boolean )getValue("IsTaxExempt"); 338 if (bb != null) return bb.booleanValue(); 339 return false; 340 } 341 public void setIsVendor (boolean IsVendor) 342 { 343 setValue ("IsVendor", new Boolean (IsVendor)); 344 } 345 public boolean isVendor() 346 { 347 Boolean bb = (Boolean )getValue("IsVendor"); 348 if (bb != null) return bb.booleanValue(); 349 return false; 350 } 351 public void setM_DiscountSchema_ID (int M_DiscountSchema_ID) 352 { 353 if (M_DiscountSchema_ID == 0) setValue ("M_DiscountSchema_ID", null); 354 else 355 setValue ("M_DiscountSchema_ID", new Integer (M_DiscountSchema_ID)); 356 } 357 public int getM_DiscountSchema_ID() 358 { 359 Integer ii = (Integer )getValue("M_DiscountSchema_ID"); 360 if (ii == null) return 0; 361 return ii.intValue(); 362 } 363 public void setM_PriceList_ID (int M_PriceList_ID) 364 { 365 if (M_PriceList_ID == 0) setValue ("M_PriceList_ID", null); 366 else 367 setValue ("M_PriceList_ID", new Integer (M_PriceList_ID)); 368 } 369 public int getM_PriceList_ID() 370 { 371 Integer ii = (Integer )getValue("M_PriceList_ID"); 372 if (ii == null) return 0; 373 return ii.intValue(); 374 } 375 public void setNAICS (String NAICS) 376 { 377 setValue ("NAICS", NAICS); 378 } 379 public String getNAICS() 380 { 381 return (String )getValue("NAICS"); 382 } 383 public void setName (String Name) 384 { 385 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 386 setValue ("Name", Name); 387 } 388 public String getName() 389 { 390 return (String )getValue("Name"); 391 } 392 public void setName2 (String Name2) 393 { 394 setValue ("Name2", Name2); 395 } 396 public String getName2() 397 { 398 return (String )getValue("Name2"); 399 } 400 public void setNumberEmployees (int NumberEmployees) 401 { 402 setValue ("NumberEmployees", new Integer (NumberEmployees)); 403 } 404 public int getNumberEmployees() 405 { 406 Integer ii = (Integer )getValue("NumberEmployees"); 407 if (ii == null) return 0; 408 return ii.intValue(); 409 } 410 public void setPOReference (String POReference) 411 { 412 setValue ("POReference", POReference); 413 } 414 public String getPOReference() 415 { 416 return (String )getValue("POReference"); 417 } 418 public void setPO_DiscountSchema_ID (int PO_DiscountSchema_ID) 419 { 420 if (PO_DiscountSchema_ID == 0) setValue ("PO_DiscountSchema_ID", null); 421 else 422 setValue ("PO_DiscountSchema_ID", new Integer (PO_DiscountSchema_ID)); 423 } 424 public int getPO_DiscountSchema_ID() 425 { 426 Integer ii = (Integer )getValue("PO_DiscountSchema_ID"); 427 if (ii == null) return 0; 428 return ii.intValue(); 429 } 430 public void setPO_PaymentTerm_ID (int PO_PaymentTerm_ID) 431 { 432 if (PO_PaymentTerm_ID == 0) setValue ("PO_PaymentTerm_ID", null); 433 else 434 setValue ("PO_PaymentTerm_ID", new Integer (PO_PaymentTerm_ID)); 435 } 436 public int getPO_PaymentTerm_ID() 437 { 438 Integer ii = (Integer )getValue("PO_PaymentTerm_ID"); 439 if (ii == null) return 0; 440 return ii.intValue(); 441 } 442 public void setPO_PriceList_ID (int PO_PriceList_ID) 443 { 444 if (PO_PriceList_ID == 0) setValue ("PO_PriceList_ID", null); 445 else 446 setValue ("PO_PriceList_ID", new Integer (PO_PriceList_ID)); 447 } 448 public int getPO_PriceList_ID() 449 { 450 Integer ii = (Integer )getValue("PO_PriceList_ID"); 451 if (ii == null) return 0; 452 return ii.intValue(); 453 } 454 public static final String PAYMENTRULE_Cash = "B"; 455 public static final String PAYMENTRULE_CreditCard = "K"; 456 public static final String PAYMENTRULE_TransferACH = "T"; 457 public static final String PAYMENTRULE_Check = "S"; 458 public static final String PAYMENTRULE_OnCredit = "P"; 459 public void setPaymentRule (String PaymentRule) 460 { 461 if (PaymentRule.equals("B") || PaymentRule.equals("K") || PaymentRule.equals("T") || PaymentRule.equals("S") || PaymentRule.equals("P")); 462 else throw new IllegalArgumentException ("PaymentRule Invalid value - Reference_ID=195 - B - K - T - S - P"); 463 setValue ("PaymentRule", PaymentRule); 464 } 465 public String getPaymentRule() 466 { 467 return (String )getValue("PaymentRule"); 468 } 469 public static final String PAYMENTRULEPO_Cash = "B"; 470 public static final String PAYMENTRULEPO_CreditCard = "K"; 471 public static final String PAYMENTRULEPO_TransferACH = "T"; 472 public static final String PAYMENTRULEPO_Check = "S"; 473 public static final String PAYMENTRULEPO_OnCredit = "P"; 474 public void setPaymentRulePO (String PaymentRulePO) 475 { 476 if (PaymentRulePO.equals("B") || PaymentRulePO.equals("K") || PaymentRulePO.equals("T") || PaymentRulePO.equals("S") || PaymentRulePO.equals("P")); 477 else throw new IllegalArgumentException ("PaymentRulePO Invalid value - Reference_ID=195 - B - K - T - S - P"); 478 setValue ("PaymentRulePO", PaymentRulePO); 479 } 480 public String getPaymentRulePO() 481 { 482 return (String )getValue("PaymentRulePO"); 483 } 484 public void setPotentialLifeTimeValue (BigDecimal PotentialLifeTimeValue) 485 { 486 setValue ("PotentialLifeTimeValue", PotentialLifeTimeValue); 487 } 488 public BigDecimal getPotentialLifeTimeValue() 489 { 490 BigDecimal bd = (BigDecimal)getValue("PotentialLifeTimeValue"); 491 if (bd == null) return Env.ZERO; 492 return bd; 493 } 494 public void setRating (String Rating) 495 { 496 setValue ("Rating", Rating); 497 } 498 public String getRating() 499 { 500 return (String )getValue("Rating"); 501 } 502 public void setReferenceNo (String ReferenceNo) 503 { 504 setValue ("ReferenceNo", ReferenceNo); 505 } 506 public String getReferenceNo() 507 { 508 return (String )getValue("ReferenceNo"); 509 } 510 public static final String SOCREDITSTATUS_CreditStop = "S"; 511 public static final String SOCREDITSTATUS_CreditHold = "H"; 512 public static final String SOCREDITSTATUS_CreditWatch = "W"; 513 public static final String SOCREDITSTATUS_NoCreditCheck = "X"; 514 public static final String SOCREDITSTATUS_CreditOK = "O"; 515 public void setSOCreditStatus (String SOCreditStatus) 516 { 517 if (SOCreditStatus.equals("S") || SOCreditStatus.equals("H") || SOCreditStatus.equals("W") || SOCreditStatus.equals("X") || SOCreditStatus.equals("O")); 518 else throw new IllegalArgumentException ("SOCreditStatus Invalid value - Reference_ID=289 - S - H - W - X - O"); 519 setValue ("SOCreditStatus", SOCreditStatus); 520 } 521 public String getSOCreditStatus() 522 { 523 return (String )getValue("SOCreditStatus"); 524 } 525 public void setSO_CreditLimit (BigDecimal SO_CreditLimit) 526 { 527 if (SO_CreditLimit == null) throw new IllegalArgumentException ("SO_CreditLimit is mandatory"); 528 setValue ("SO_CreditLimit", SO_CreditLimit); 529 } 530 public BigDecimal getSO_CreditLimit() 531 { 532 BigDecimal bd = (BigDecimal)getValue("SO_CreditLimit"); 533 if (bd == null) return Env.ZERO; 534 return bd; 535 } 536 void setSO_CreditUsed (BigDecimal SO_CreditUsed) 537 { 538 if (SO_CreditUsed == null) throw new IllegalArgumentException ("SO_CreditUsed is mandatory"); 539 setValueNoCheck ("SO_CreditUsed", SO_CreditUsed); 540 } 541 public BigDecimal getSO_CreditUsed() 542 { 543 BigDecimal bd = (BigDecimal)getValue("SO_CreditUsed"); 544 if (bd == null) return Env.ZERO; 545 return bd; 546 } 547 public void setSO_Description (String SO_Description) 548 { 549 setValue ("SO_Description", SO_Description); 550 } 551 public String getSO_Description() 552 { 553 return (String )getValue("SO_Description"); 554 } 555 public void setSalesRep_ID (int SalesRep_ID) 556 { 557 if (SalesRep_ID == 0) setValue ("SalesRep_ID", null); 558 else 559 setValue ("SalesRep_ID", new Integer (SalesRep_ID)); 560 } 561 public int getSalesRep_ID() 562 { 563 Integer ii = (Integer )getValue("SalesRep_ID"); 564 if (ii == null) return 0; 565 return ii.intValue(); 566 } 567 public void setSalesVolume (int SalesVolume) 568 { 569 setValue ("SalesVolume", new Integer (SalesVolume)); 570 } 571 public int getSalesVolume() 572 { 573 Integer ii = (Integer )getValue("SalesVolume"); 574 if (ii == null) return 0; 575 return ii.intValue(); 576 } 577 public void setSendEMail (boolean SendEMail) 578 { 579 setValue ("SendEMail", new Boolean (SendEMail)); 580 } 581 public boolean isSendEMail() 582 { 583 Boolean bb = (Boolean )getValue("SendEMail"); 584 if (bb != null) return bb.booleanValue(); 585 return false; 586 } 587 public void setShareOfCustomer (int ShareOfCustomer) 588 { 589 setValue ("ShareOfCustomer", new Integer (ShareOfCustomer)); 590 } 591 public int getShareOfCustomer() 592 { 593 Integer ii = (Integer )getValue("ShareOfCustomer"); 594 if (ii == null) return 0; 595 return ii.intValue(); 596 } 597 public void setTaxID (String TaxID) 598 { 599 setValue ("TaxID", TaxID); 600 } 601 public String getTaxID() 602 { 603 return (String )getValue("TaxID"); 604 } 605 public void setURL (String URL) 606 { 607 setValue ("URL", URL); 608 } 609 public String getURL() 610 { 611 return (String )getValue("URL"); 612 } 613 public void setValue (String Value) 614 { 615 if (Value == null) throw new IllegalArgumentException ("Value is mandatory"); 616 setValue ("Value", Value); 617 } 618 public String getValue() 619 { 620 return (String )getValue("Value"); 621 } 622 } 623 | Popular Tags |