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_Journal extends PO 11 { 12 13 public X_GL_Journal (Properties ctx, int GL_Journal_ID) 14 { 15 super (ctx, GL_Journal_ID); 16 40 } 41 42 public X_GL_Journal (Properties ctx, ResultSet rs) 43 { 44 super (ctx, rs); 45 } 46 47 protected POInfo initPO (Properties ctx) 48 { 49 int AD_Table_ID = 224; 50 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 51 return poi; 52 } 53 public String toString() 54 { 55 StringBuffer sb = new StringBuffer ("X_GL_Journal[").append(getID()).append("]"); 56 return sb.toString(); 57 } 58 void setC_AcctSchema_ID (int C_AcctSchema_ID) 59 { 60 setValueNoCheck ("C_AcctSchema_ID", new Integer (C_AcctSchema_ID)); 61 } 62 public int getC_AcctSchema_ID() 63 { 64 Integer ii = (Integer )getValue("C_AcctSchema_ID"); 65 if (ii == null) return 0; 66 return ii.intValue(); 67 } 68 public void setC_Currency_ID (int C_Currency_ID) 69 { 70 setValue ("C_Currency_ID", new Integer (C_Currency_ID)); 71 } 72 public int getC_Currency_ID() 73 { 74 Integer ii = (Integer )getValue("C_Currency_ID"); 75 if (ii == null) return 0; 76 return ii.intValue(); 77 } 78 public void setC_DocType_ID (int C_DocType_ID) 79 { 80 setValue ("C_DocType_ID", new Integer (C_DocType_ID)); 81 } 82 public int getC_DocType_ID() 83 { 84 Integer ii = (Integer )getValue("C_DocType_ID"); 85 if (ii == null) return 0; 86 return ii.intValue(); 87 } 88 public void setC_Period_ID (int C_Period_ID) 89 { 90 setValue ("C_Period_ID", new Integer (C_Period_ID)); 91 } 92 public int getC_Period_ID() 93 { 94 Integer ii = (Integer )getValue("C_Period_ID"); 95 if (ii == null) return 0; 96 return ii.intValue(); 97 } 98 public void setControlAmt (BigDecimal ControlAmt) 99 { 100 setValue ("ControlAmt", ControlAmt); 101 } 102 public BigDecimal getControlAmt() 103 { 104 BigDecimal bd = (BigDecimal)getValue("ControlAmt"); 105 if (bd == null) return Env.ZERO; 106 return bd; 107 } 108 public void setCurrencyRate (BigDecimal CurrencyRate) 109 { 110 if (CurrencyRate == null) throw new IllegalArgumentException ("CurrencyRate is mandatory"); 111 setValue ("CurrencyRate", CurrencyRate); 112 } 113 public BigDecimal getCurrencyRate() 114 { 115 BigDecimal bd = (BigDecimal)getValue("CurrencyRate"); 116 if (bd == null) return Env.ZERO; 117 return bd; 118 } 119 public static final String CURRENCYRATETYPE_Spot = "S"; 120 public static final String CURRENCYRATETYPE_PeriodEnd = "P"; 121 public static final String CURRENCYRATETYPE_None = "N"; 122 public static final String CURRENCYRATETYPE_Fixed = "F"; 123 public static final String CURRENCYRATETYPE_Average = "A"; 124 public static final String CURRENCYRATETYPE_Company = "C"; 125 public static final String CURRENCYRATETYPE_UserType = "U"; 126 public static final String CURRENCYRATETYPE_ManualRate = "M"; 127 public void setCurrencyRateType (String CurrencyRateType) 128 { 129 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")); 130 else throw new IllegalArgumentException ("CurrencyRateType Invalid value - Reference_ID=111 - S - P - N - F - A - C - U - M"); 131 if (CurrencyRateType == null) throw new IllegalArgumentException ("CurrencyRateType is mandatory"); 132 setValue ("CurrencyRateType", CurrencyRateType); 133 } 134 public String getCurrencyRateType() 135 { 136 return (String )getValue("CurrencyRateType"); 137 } 138 public void setDateAcct (Timestamp DateAcct) 139 { 140 if (DateAcct == null) throw new IllegalArgumentException ("DateAcct is mandatory"); 141 setValue ("DateAcct", DateAcct); 142 } 143 public Timestamp getDateAcct() 144 { 145 return (Timestamp)getValue("DateAcct"); 146 } 147 public void setDateDoc (Timestamp DateDoc) 148 { 149 if (DateDoc == null) throw new IllegalArgumentException ("DateDoc is mandatory"); 150 setValue ("DateDoc", DateDoc); 151 } 152 public Timestamp getDateDoc() 153 { 154 return (Timestamp)getValue("DateDoc"); 155 } 156 public void setDescription (String Description) 157 { 158 if (Description == null) throw new IllegalArgumentException ("Description is mandatory"); 159 setValue ("Description", Description); 160 } 161 public String getDescription() 162 { 163 return (String )getValue("Description"); 164 } 165 public static final String DOCACTION_Process = "PR"; 166 public static final String DOCACTION_Unlock = "XL"; 167 public static final String DOCACTION_Complete = "CO"; 168 public static final String DOCACTION_Approve = "AP"; 169 public static final String DOCACTION_Reject = "RJ"; 170 public static final String DOCACTION_Post = "PO"; 171 public static final String DOCACTION_Void = "VO"; 172 public static final String DOCACTION_Close = "CL"; 173 public static final String DOCACTION_ReverseMinusCorrection = "RC"; 174 public static final String DOCACTION_ReverseMinusAccrual = "RA"; 175 public static final String DOCACTION_Transfer = "TR"; 176 public static final String DOCACTION_ReMinusActivate = "RE"; 177 public static final String DOCACTION_LeNoneGt = "--"; 178 public void setDocAction (String DocAction) 179 { 180 if (DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("CO") || DocAction.equals("AP") || DocAction.equals("RJ") || DocAction.equals("PO") || DocAction.equals("VO") || DocAction.equals("CL") || DocAction.equals("RC") || DocAction.equals("RA") || DocAction.equals("TR") || DocAction.equals("RE") || DocAction.equals("--")); 181 else throw new IllegalArgumentException ("DocAction Invalid value - Reference_ID=135 - PR - XL - CO - AP - RJ - PO - VO - CL - RC - RA - TR - RE - --"); 182 if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory"); 183 setValue ("DocAction", DocAction); 184 } 185 public String getDocAction() 186 { 187 return (String )getValue("DocAction"); 188 } 189 public static final String DOCSTATUS_InProgress = "IP"; 190 public static final String DOCSTATUS_WaitingPayment = "WP"; 191 public static final String DOCSTATUS_Drafted = "DR"; 192 public static final String DOCSTATUS_Completed = "CO"; 193 public static final String DOCSTATUS_Approved = "AP"; 194 public static final String DOCSTATUS_Changed = "CH"; 195 public static final String DOCSTATUS_NotApproved = "NA"; 196 public static final String DOCSTATUS_TransferError = "TE"; 197 public static final String DOCSTATUS_Printed = "PR"; 198 public static final String DOCSTATUS_Transferred = "TR"; 199 public static final String DOCSTATUS_Voided = "VO"; 200 public static final String DOCSTATUS_Inactive = "IN"; 201 public static final String DOCSTATUS_PostingError = "PE"; 202 public static final String DOCSTATUS_Posted = "PO"; 203 public static final String DOCSTATUS_Reversed = "RE"; 204 public static final String DOCSTATUS_Closed = "CL"; 205 public static final String DOCSTATUS_Unknown = "??"; 206 public static final String DOCSTATUS_BeingProcessed = "XX"; 207 void setDocStatus (String DocStatus) 208 { 209 if (DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("CH") || DocStatus.equals("NA") || DocStatus.equals("TE") || DocStatus.equals("PR") || DocStatus.equals("TR") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("PE") || DocStatus.equals("PO") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("XX")); 210 else throw new IllegalArgumentException ("DocStatus Invalid value - Reference_ID=131 - IP - WP - DR - CO - AP - CH - NA - TE - PR - TR - VO - IN - PE - PO - RE - CL - ?? - XX"); 211 if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory"); 212 setValueNoCheck ("DocStatus", DocStatus); 213 } 214 public String getDocStatus() 215 { 216 return (String )getValue("DocStatus"); 217 } 218 void setDocumentNo (String DocumentNo) 219 { 220 if (DocumentNo == null) throw new IllegalArgumentException ("DocumentNo is mandatory"); 221 setValueNoCheck ("DocumentNo", DocumentNo); 222 } 223 public String getDocumentNo() 224 { 225 return (String )getValue("DocumentNo"); 226 } 227 public void setGL_Budget_ID (int GL_Budget_ID) 228 { 229 if (GL_Budget_ID == 0) setValue ("GL_Budget_ID", null); 230 else 231 setValue ("GL_Budget_ID", new Integer (GL_Budget_ID)); 232 } 233 public int getGL_Budget_ID() 234 { 235 Integer ii = (Integer )getValue("GL_Budget_ID"); 236 if (ii == null) return 0; 237 return ii.intValue(); 238 } 239 public void setGL_Category_ID (int GL_Category_ID) 240 { 241 setValue ("GL_Category_ID", new Integer (GL_Category_ID)); 242 } 243 public int getGL_Category_ID() 244 { 245 Integer ii = (Integer )getValue("GL_Category_ID"); 246 if (ii == null) return 0; 247 return ii.intValue(); 248 } 249 void setGL_JournalBatch_ID (int GL_JournalBatch_ID) 250 { 251 if (GL_JournalBatch_ID == 0) setValueNoCheck ("GL_JournalBatch_ID", null); 252 else 253 setValueNoCheck ("GL_JournalBatch_ID", new Integer (GL_JournalBatch_ID)); 254 } 255 public int getGL_JournalBatch_ID() 256 { 257 Integer ii = (Integer )getValue("GL_JournalBatch_ID"); 258 if (ii == null) return 0; 259 return ii.intValue(); 260 } 261 void setGL_Journal_ID (int GL_Journal_ID) 262 { 263 setValueNoCheck ("GL_Journal_ID", new Integer (GL_Journal_ID)); 264 } 265 public int getGL_Journal_ID() 266 { 267 Integer ii = (Integer )getValue("GL_Journal_ID"); 268 if (ii == null) return 0; 269 return ii.intValue(); 270 } 271 void setIsApproved (boolean IsApproved) 272 { 273 setValueNoCheck ("IsApproved", new Boolean (IsApproved)); 274 } 275 public boolean isApproved() 276 { 277 Boolean bb = (Boolean )getValue("IsApproved"); 278 if (bb != null) return bb.booleanValue(); 279 return false; 280 } 281 void setIsPrinted (boolean IsPrinted) 282 { 283 setValueNoCheck ("IsPrinted", new Boolean (IsPrinted)); 284 } 285 public boolean isPrinted() 286 { 287 Boolean bb = (Boolean )getValue("IsPrinted"); 288 if (bb != null) return bb.booleanValue(); 289 return false; 290 } 291 void setPosted (boolean Posted) 292 { 293 setValueNoCheck ("Posted", new Boolean (Posted)); 294 } 295 public boolean isPosted() 296 { 297 Boolean bb = (Boolean )getValue("Posted"); 298 if (bb != null) return bb.booleanValue(); 299 return false; 300 } 301 public static final String POSTINGTYPE_Actual = "A"; 302 public static final String POSTINGTYPE_Budget = "B"; 303 public static final String POSTINGTYPE_Encumbrance = "E"; 304 public static final String POSTINGTYPE_Statistical = "S"; 305 public void setPostingType (String PostingType) 306 { 307 if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S")); 308 else throw new IllegalArgumentException ("PostingType Invalid value - Reference_ID=125 - A - B - E - S"); 309 if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory"); 310 setValue ("PostingType", PostingType); 311 } 312 public String getPostingType() 313 { 314 return (String )getValue("PostingType"); 315 } 316 public void setProcessed (boolean Processed) 317 { 318 setValue ("Processed", new Boolean (Processed)); 319 } 320 public boolean isProcessed() 321 { 322 Boolean bb = (Boolean )getValue("Processed"); 323 if (bb != null) return bb.booleanValue(); 324 return false; 325 } 326 public void setProcessing (String Processing) 327 { 328 setValue ("Processing", Processing); 329 } 330 public String getProcessing() 331 { 332 return (String )getValue("Processing"); 333 } 334 void setTotalCr (BigDecimal TotalCr) 335 { 336 if (TotalCr == null) throw new IllegalArgumentException ("TotalCr is mandatory"); 337 setValueNoCheck ("TotalCr", TotalCr); 338 } 339 public BigDecimal getTotalCr() 340 { 341 BigDecimal bd = (BigDecimal)getValue("TotalCr"); 342 if (bd == null) return Env.ZERO; 343 return bd; 344 } 345 void setTotalDr (BigDecimal TotalDr) 346 { 347 if (TotalDr == null) throw new IllegalArgumentException ("TotalDr is mandatory"); 348 setValueNoCheck ("TotalDr", TotalDr); 349 } 350 public BigDecimal getTotalDr() 351 { 352 BigDecimal bd = (BigDecimal)getValue("TotalDr"); 353 if (bd == null) return Env.ZERO; 354 return bd; 355 } 356 } 357 | Popular Tags |