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_Allocation extends PO 11 { 12 13 public X_C_Allocation (Properties ctx, int C_Allocation_ID) 14 { 15 super (ctx, C_Allocation_ID); 16 30 } 31 32 public X_C_Allocation (Properties ctx, ResultSet rs) 33 { 34 super (ctx, rs); 35 } 36 37 protected POInfo initPO (Properties ctx) 38 { 39 int AD_Table_ID = 390; 40 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 41 return poi; 42 } 43 public String toString() 44 { 45 StringBuffer sb = new StringBuffer ("X_C_Allocation[").append(getID()).append("]"); 46 return sb.toString(); 47 } 48 void setAllocationNo (int AllocationNo) 49 { 50 setValueNoCheck ("AllocationNo", new Integer (AllocationNo)); 51 } 52 public int getAllocationNo() 53 { 54 Integer ii = (Integer )getValue("AllocationNo"); 55 if (ii == null) return 0; 56 return ii.intValue(); 57 } 58 void setAmount (BigDecimal Amount) 59 { 60 if (Amount == null) throw new IllegalArgumentException ("Amount is mandatory"); 61 setValueNoCheck ("Amount", Amount); 62 } 63 public BigDecimal getAmount() 64 { 65 BigDecimal bd = (BigDecimal)getValue("Amount"); 66 if (bd == null) return Env.ZERO; 67 return bd; 68 } 69 void setC_Allocation_ID (int C_Allocation_ID) 70 { 71 setValueNoCheck ("C_Allocation_ID", new Integer (C_Allocation_ID)); 72 } 73 public int getC_Allocation_ID() 74 { 75 Integer ii = (Integer )getValue("C_Allocation_ID"); 76 if (ii == null) return 0; 77 return ii.intValue(); 78 } 79 void setC_BPartner_ID (int C_BPartner_ID) 80 { 81 if (C_BPartner_ID == 0) setValueNoCheck ("C_BPartner_ID", null); 82 else 83 setValueNoCheck ("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 void setC_CashLine_ID (int C_CashLine_ID) 92 { 93 if (C_CashLine_ID == 0) setValueNoCheck ("C_CashLine_ID", null); 94 else 95 setValueNoCheck ("C_CashLine_ID", new Integer (C_CashLine_ID)); 96 } 97 public int getC_CashLine_ID() 98 { 99 Integer ii = (Integer )getValue("C_CashLine_ID"); 100 if (ii == null) return 0; 101 return ii.intValue(); 102 } 103 void setC_Currency_ID (int C_Currency_ID) 104 { 105 setValueNoCheck ("C_Currency_ID", new Integer (C_Currency_ID)); 106 } 107 public int getC_Currency_ID() 108 { 109 Integer ii = (Integer )getValue("C_Currency_ID"); 110 if (ii == null) return 0; 111 return ii.intValue(); 112 } 113 void setC_Invoice_ID (int C_Invoice_ID) 114 { 115 if (C_Invoice_ID == 0) setValueNoCheck ("C_Invoice_ID", null); 116 else 117 setValueNoCheck ("C_Invoice_ID", new Integer (C_Invoice_ID)); 118 } 119 public int getC_Invoice_ID() 120 { 121 Integer ii = (Integer )getValue("C_Invoice_ID"); 122 if (ii == null) return 0; 123 return ii.intValue(); 124 } 125 void setC_Order_ID (int C_Order_ID) 126 { 127 if (C_Order_ID == 0) setValueNoCheck ("C_Order_ID", null); 128 else 129 setValueNoCheck ("C_Order_ID", new Integer (C_Order_ID)); 130 } 131 public int getC_Order_ID() 132 { 133 Integer ii = (Integer )getValue("C_Order_ID"); 134 if (ii == null) return 0; 135 return ii.intValue(); 136 } 137 void setC_Payment_ID (int C_Payment_ID) 138 { 139 if (C_Payment_ID == 0) setValueNoCheck ("C_Payment_ID", null); 140 else 141 setValueNoCheck ("C_Payment_ID", new Integer (C_Payment_ID)); 142 } 143 public int getC_Payment_ID() 144 { 145 Integer ii = (Integer )getValue("C_Payment_ID"); 146 if (ii == null) return 0; 147 return ii.intValue(); 148 } 149 void setDateTrx (Timestamp DateTrx) 150 { 151 if (DateTrx == null) throw new IllegalArgumentException ("DateTrx is mandatory"); 152 setValueNoCheck ("DateTrx", DateTrx); 153 } 154 public Timestamp getDateTrx() 155 { 156 return (Timestamp)getValue("DateTrx"); 157 } 158 void setDiscountAmt (BigDecimal DiscountAmt) 159 { 160 if (DiscountAmt == null) throw new IllegalArgumentException ("DiscountAmt is mandatory"); 161 setValueNoCheck ("DiscountAmt", DiscountAmt); 162 } 163 public BigDecimal getDiscountAmt() 164 { 165 BigDecimal bd = (BigDecimal)getValue("DiscountAmt"); 166 if (bd == null) return Env.ZERO; 167 return bd; 168 } 169 void setIsManual (boolean IsManual) 170 { 171 setValueNoCheck ("IsManual", new Boolean (IsManual)); 172 } 173 public boolean isManual() 174 { 175 Boolean bb = (Boolean )getValue("IsManual"); 176 if (bb != null) return bb.booleanValue(); 177 return false; 178 } 179 void setPosted (boolean Posted) 180 { 181 setValueNoCheck ("Posted", new Boolean (Posted)); 182 } 183 public boolean isPosted() 184 { 185 Boolean bb = (Boolean )getValue("Posted"); 186 if (bb != null) return bb.booleanValue(); 187 return false; 188 } 189 void setProcessed (boolean Processed) 190 { 191 setValueNoCheck ("Processed", new Boolean (Processed)); 192 } 193 public boolean isProcessed() 194 { 195 Boolean bb = (Boolean )getValue("Processed"); 196 if (bb != null) return bb.booleanValue(); 197 return false; 198 } 199 void setProcessing (String Processing) 200 { 201 setValueNoCheck ("Processing", Processing); 202 } 203 public String getProcessing() 204 { 205 return (String )getValue("Processing"); 206 } 207 void setWriteOffAmt (BigDecimal WriteOffAmt) 208 { 209 if (WriteOffAmt == null) throw new IllegalArgumentException ("WriteOffAmt is mandatory"); 210 setValueNoCheck ("WriteOffAmt", WriteOffAmt); 211 } 212 public BigDecimal getWriteOffAmt() 213 { 214 BigDecimal bd = (BigDecimal)getValue("WriteOffAmt"); 215 if (bd == null) return Env.ZERO; 216 return bd; 217 } 218 } 219
| Popular Tags
|