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