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_GL_JournalLine extends PO 11 { 12 13 public X_GL_JournalLine (Properties ctx, int GL_JournalLine_ID) 14 { 15 super (ctx, GL_JournalLine_ID); 16 33 } 34 35 public X_GL_JournalLine (Properties ctx, ResultSet rs) 36 { 37 super (ctx, rs); 38 } 39 40 protected POInfo initPO (Properties ctx) 41 { 42 int AD_Table_ID = 226; 43 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 44 return poi; 45 } 46 public String toString() 47 { 48 StringBuffer sb = new StringBuffer ("X_GL_JournalLine[").append(getID()).append("]"); 49 return sb.toString(); 50 } 51 void setAmtAcctCr (BigDecimal AmtAcctCr) 52 { 53 if (AmtAcctCr == null) throw new IllegalArgumentException ("AmtAcctCr is mandatory"); 54 setValueNoCheck ("AmtAcctCr", AmtAcctCr); 55 } 56 public BigDecimal getAmtAcctCr() 57 { 58 BigDecimal bd = (BigDecimal)getValue("AmtAcctCr"); 59 if (bd == null) return Env.ZERO; 60 return bd; 61 } 62 void setAmtAcctDr (BigDecimal AmtAcctDr) 63 { 64 if (AmtAcctDr == null) throw new IllegalArgumentException ("AmtAcctDr is mandatory"); 65 setValueNoCheck ("AmtAcctDr", AmtAcctDr); 66 } 67 public BigDecimal getAmtAcctDr() 68 { 69 BigDecimal bd = (BigDecimal)getValue("AmtAcctDr"); 70 if (bd == null) return Env.ZERO; 71 return bd; 72 } 73 public void setAmtSourceCr (BigDecimal AmtSourceCr) 74 { 75 if (AmtSourceCr == null) throw new IllegalArgumentException ("AmtSourceCr is mandatory"); 76 setValue ("AmtSourceCr", AmtSourceCr); 77 } 78 public BigDecimal getAmtSourceCr() 79 { 80 BigDecimal bd = (BigDecimal)getValue("AmtSourceCr"); 81 if (bd == null) return Env.ZERO; 82 return bd; 83 } 84 public void setAmtSourceDr (BigDecimal AmtSourceDr) 85 { 86 if (AmtSourceDr == null) throw new IllegalArgumentException ("AmtSourceDr is mandatory"); 87 setValue ("AmtSourceDr", AmtSourceDr); 88 } 89 public BigDecimal getAmtSourceDr() 90 { 91 BigDecimal bd = (BigDecimal)getValue("AmtSourceDr"); 92 if (bd == null) return Env.ZERO; 93 return bd; 94 } 95 public void setC_Currency_ID (int C_Currency_ID) 96 { 97 setValue ("C_Currency_ID", new Integer (C_Currency_ID)); 98 } 99 public int getC_Currency_ID() 100 { 101 Integer ii = (Integer )getValue("C_Currency_ID"); 102 if (ii == null) return 0; 103 return ii.intValue(); 104 } 105 public void setC_UOM_ID (int C_UOM_ID) 106 { 107 if (C_UOM_ID == 0) setValue ("C_UOM_ID", null); 108 else 109 setValue ("C_UOM_ID", new Integer (C_UOM_ID)); 110 } 111 public int getC_UOM_ID() 112 { 113 Integer ii = (Integer )getValue("C_UOM_ID"); 114 if (ii == null) return 0; 115 return ii.intValue(); 116 } 117 public void setC_ValidCombination_ID (int C_ValidCombination_ID) 118 { 119 setValue ("C_ValidCombination_ID", new Integer (C_ValidCombination_ID)); 120 } 121 public int getC_ValidCombination_ID() 122 { 123 Integer ii = (Integer )getValue("C_ValidCombination_ID"); 124 if (ii == null) return 0; 125 return ii.intValue(); 126 } 127 void setCurrencyRate (BigDecimal CurrencyRate) 128 { 129 if (CurrencyRate == null) throw new IllegalArgumentException ("CurrencyRate is mandatory"); 130 setValueNoCheck ("CurrencyRate", CurrencyRate); 131 } 132 public BigDecimal getCurrencyRate() 133 { 134 BigDecimal bd = (BigDecimal)getValue("CurrencyRate"); 135 if (bd == null) return Env.ZERO; 136 return bd; 137 } 138 public static final String CURRENCYRATETYPE_Spot = "S"; 139 public static final String CURRENCYRATETYPE_PeriodEnd = "P"; 140 public static final String CURRENCYRATETYPE_None = "N"; 141 public static final String CURRENCYRATETYPE_Fixed = "F"; 142 public static final String CURRENCYRATETYPE_Average = "A"; 143 public static final String CURRENCYRATETYPE_Company = "C"; 144 public static final String CURRENCYRATETYPE_UserType = "U"; 145 public static final String CURRENCYRATETYPE_ManualRate = "M"; 146 void setCurrencyRateType (String CurrencyRateType) 147 { 148 if (CurrencyRateType.equals("S") || CurrencyRateType.equals("P") || CurrencyRateType.equals("N") || CurrencyRateType.equals("F") || CurrencyRateType.equals("A") || CurrencyRateType.equals("C") || CurrencyRateType.equals("U") || CurrencyRateType.equals("M")); 149 else throw new IllegalArgumentException ("CurrencyRateType Invalid value - Reference_ID=111 - S - P - N - F - A - C - U - M"); 150 if (CurrencyRateType == null) throw new IllegalArgumentException ("CurrencyRateType is mandatory"); 151 setValueNoCheck ("CurrencyRateType", CurrencyRateType); 152 } 153 public String getCurrencyRateType() 154 { 155 return (String )getValue("CurrencyRateType"); 156 } 157 public void setDateAcct (Timestamp DateAcct) 158 { 159 if (DateAcct == null) throw new IllegalArgumentException ("DateAcct is mandatory"); 160 setValue ("DateAcct", DateAcct); 161 } 162 public Timestamp getDateAcct() 163 { 164 return (Timestamp)getValue("DateAcct"); 165 } 166 public void setDescription (String Description) 167 { 168 setValue ("Description", Description); 169 } 170 public String getDescription() 171 { 172 return (String )getValue("Description"); 173 } 174 void setGL_JournalLine_ID (int GL_JournalLine_ID) 175 { 176 setValueNoCheck ("GL_JournalLine_ID", new Integer (GL_JournalLine_ID)); 177 } 178 public int getGL_JournalLine_ID() 179 { 180 Integer ii = (Integer )getValue("GL_JournalLine_ID"); 181 if (ii == null) return 0; 182 return ii.intValue(); 183 } 184 void setGL_Journal_ID (int GL_Journal_ID) 185 { 186 setValueNoCheck ("GL_Journal_ID", new Integer (GL_Journal_ID)); 187 } 188 public int getGL_Journal_ID() 189 { 190 Integer ii = (Integer )getValue("GL_Journal_ID"); 191 if (ii == null) return 0; 192 return ii.intValue(); 193 } 194 void setIsGenerated (boolean IsGenerated) 195 { 196 setValueNoCheck ("IsGenerated", new Boolean (IsGenerated)); 197 } 198 public boolean isGenerated() 199 { 200 Boolean bb = (Boolean )getValue("IsGenerated"); 201 if (bb != null) return bb.booleanValue(); 202 return false; 203 } 204 public void setLine (int Line) 205 { 206 setValue ("Line", new Integer (Line)); 207 } 208 public int getLine() 209 { 210 Integer ii = (Integer )getValue("Line"); 211 if (ii == null) return 0; 212 return ii.intValue(); 213 } 214 public void setQty (BigDecimal Qty) 215 { 216 setValue ("Qty", Qty); 217 } 218 public BigDecimal getQty() 219 { 220 BigDecimal bd = (BigDecimal)getValue("Qty"); 221 if (bd == null) return Env.ZERO; 222 return bd; 223 } 224 } 225
| Popular Tags
|