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_PaySelectionCheck extends PO 11 { 12 13 public X_C_PaySelectionCheck (Properties ctx, int C_PaySelectionCheck_ID) 14 { 15 super (ctx, C_PaySelectionCheck_ID); 16 27 } 28 29 public X_C_PaySelectionCheck (Properties ctx, ResultSet rs) 30 { 31 super (ctx, rs); 32 } 33 34 protected POInfo initPO (Properties ctx) 35 { 36 int AD_Table_ID = 525; 37 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 38 return poi; 39 } 40 public String toString() 41 { 42 StringBuffer sb = new StringBuffer ("X_C_PaySelectionCheck[").append(getID()).append("]"); 43 return sb.toString(); 44 } 45 public void setC_BPartner_ID (int C_BPartner_ID) 46 { 47 setValue ("C_BPartner_ID", new Integer (C_BPartner_ID)); 48 } 49 public int getC_BPartner_ID() 50 { 51 Integer ii = (Integer )getValue("C_BPartner_ID"); 52 if (ii == null) return 0; 53 return ii.intValue(); 54 } 55 void setC_PaySelectionCheck_ID (int C_PaySelectionCheck_ID) 56 { 57 setValueNoCheck ("C_PaySelectionCheck_ID", new Integer (C_PaySelectionCheck_ID)); 58 } 59 public int getC_PaySelectionCheck_ID() 60 { 61 Integer ii = (Integer )getValue("C_PaySelectionCheck_ID"); 62 if (ii == null) return 0; 63 return ii.intValue(); 64 } 65 void setC_PaySelection_ID (int C_PaySelection_ID) 66 { 67 setValueNoCheck ("C_PaySelection_ID", new Integer (C_PaySelection_ID)); 68 } 69 public int getC_PaySelection_ID() 70 { 71 Integer ii = (Integer )getValue("C_PaySelection_ID"); 72 if (ii == null) return 0; 73 return ii.intValue(); 74 } 75 public void setC_Payment_ID (int C_Payment_ID) 76 { 77 if (C_Payment_ID == 0) setValue ("C_Payment_ID", null); 78 else 79 setValue ("C_Payment_ID", new Integer (C_Payment_ID)); 80 } 81 public int getC_Payment_ID() 82 { 83 Integer ii = (Integer )getValue("C_Payment_ID"); 84 if (ii == null) return 0; 85 return ii.intValue(); 86 } 87 public void setDocumentNo (String DocumentNo) 88 { 89 setValue ("DocumentNo", DocumentNo); 90 } 91 public String getDocumentNo() 92 { 93 return (String )getValue("DocumentNo"); 94 } 95 public void setIsPrinted (boolean IsPrinted) 96 { 97 setValue ("IsPrinted", new Boolean (IsPrinted)); 98 } 99 public boolean isPrinted() 100 { 101 Boolean bb = (Boolean )getValue("IsPrinted"); 102 if (bb != null) return bb.booleanValue(); 103 return false; 104 } 105 public void setPayAmt (BigDecimal PayAmt) 106 { 107 if (PayAmt == null) throw new IllegalArgumentException ("PayAmt is mandatory"); 108 setValue ("PayAmt", PayAmt); 109 } 110 public BigDecimal getPayAmt() 111 { 112 BigDecimal bd = (BigDecimal)getValue("PayAmt"); 113 if (bd == null) return Env.ZERO; 114 return bd; 115 } 116 public static final String PAYMENTRULE_Cash = "B"; 117 public static final String PAYMENTRULE_CreditCard = "K"; 118 public static final String PAYMENTRULE_TransferACH = "T"; 119 public static final String PAYMENTRULE_Check = "S"; 120 public static final String PAYMENTRULE_OnCredit = "P"; 121 public void setPaymentRule (String PaymentRule) 122 { 123 if (PaymentRule.equals("B") || PaymentRule.equals("K") || PaymentRule.equals("T") || PaymentRule.equals("S") || PaymentRule.equals("P")); 124 else throw new IllegalArgumentException ("PaymentRule Invalid value - Reference_ID=195 - B - K - T - S - P"); 125 if (PaymentRule == null) throw new IllegalArgumentException ("PaymentRule is mandatory"); 126 setValue ("PaymentRule", PaymentRule); 127 } 128 public String getPaymentRule() 129 { 130 return (String )getValue("PaymentRule"); 131 } 132 public void setQty (int Qty) 133 { 134 setValue ("Qty", new Integer (Qty)); 135 } 136 public int getQty() 137 { 138 Integer ii = (Integer )getValue("Qty"); 139 if (ii == null) return 0; 140 return ii.intValue(); 141 } 142 } 143 | Popular Tags |