001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: /*
017: * Created on Sep 2, 2004
018: *
019: */
020: package org.kuali.module.pdp.bo;
021:
022: import java.io.Serializable;
023: import java.math.BigDecimal;
024: import java.sql.Date;
025: import java.sql.Timestamp;
026:
027: import org.apache.commons.lang.builder.EqualsBuilder;
028: import org.apache.commons.lang.builder.HashCodeBuilder;
029: import org.apache.commons.lang.builder.ToStringBuilder;
030: import org.kuali.core.util.KualiDecimal;
031: import org.kuali.module.chart.bo.Account;
032: import org.kuali.module.gl.bo.FlexibleAccountUpdateable;
033: import org.kuali.module.gl.bo.OriginEntryFull;
034:
035: /**
036: * @author jsissom
037: */
038: public class GlPendingTransaction implements Serializable,
039: FlexibleAccountUpdateable {
040: private Integer id; // GL_PENDING_ENTRY_ID NUMBER 8 0
041: private String fsOriginCd; // FS_ORIGIN_CD VARCHAR2 2
042: private String fdocNbr; // FDOC_NBR VARCHAR2 9
043: private Integer sequenceNbr; // TRN_ENTR_SEQ_NBR NUMBER 5 0
044: private String chartOfAccountsCode; // FIN_COA_CD VARCHAR2 2
045: private String accountNumber; // ACCOUNT_NBR VARCHAR2 7
046: private String subAccountNumber; // SUB_ACCOUNT_NBR VARCHAR2 5
047: private String financialObjectCode; // FIN_OBJECT_CD VARCHAR2 4
048: private String financialSubObjectCode; // FIN_SUB_OBJ_CD VARCHAR2 3
049: private String financialBalanceTypeCode; // FIN_BALANCE_TYP_CD VARCHAR2 2
050: private String finObjTypCd; // FIN_OBJ_TYP_CD VARCHAR2 2
051: private Integer universityFiscalYear; // UNIV_FISCAL_YR NUMBER 4 0
052: private String univFiscalPrdCd; // UNIV_FISCAL_PRD_CD VARCHAR2 2
053: private String description; // TRN_LDGR_ENTR_DESC VARCHAR2 40
054: private BigDecimal amount; // TRN_LDGR_ENTR_AMT NUMBER 19 2
055: private String debitCrdtCd; // TRN_DEBIT_CRDT_CD VARCHAR2 1
056: private Timestamp transactionDt; // TRANSACTION_DT DATE 7
057: private String financialDocumentTypeCode; // FDOC_TYP_CD VARCHAR2 4
058: private String orgDocNbr; // ORG_DOC_NBR VARCHAR2 10
059: private String projectCd; // PROJECT_CD VARCHAR2 10
060: private String orgReferenceId; // ORG_REFERENCE_ID VARCHAR2 8
061: private String fdocRefTypCd; // FDOC_REF_TYP_CD VARCHAR2 4
062: private String fsRefOriginCd; // FS_REF_ORIGIN_CD VARCHAR2 2
063: private String fdocRefNbr; // FDOC_REF_NBR VARCHAR2 9
064: private Timestamp fdocReversalDt; // FDOC_REVERSAL_DT DATE 7
065: private String trnEncumUpdtCd; // TRN_ENCUM_UPDT_CD VARCHAR2 1
066: private String fdocApprovedCd; // FDOC_APPROVED_CD VARCHAR2 1
067: private String acctSfFinObjCd; // ACCT_SF_FINOBJ_CD VARCHAR2 4
068: private String trnEntrOfstCd; // TRN_ENTR_OFST_CD VARCHAR2 1
069: private String processInd; // TRN_EXTRT_IND VARCHAR2 7
070:
071: public GlPendingTransaction() {
072: super ();
073: }
074:
075: public OriginEntryFull getOriginEntry() {
076: OriginEntryFull oe = new OriginEntryFull();
077:
078: oe.setFinancialSystemOriginationCode(fsOriginCd);
079: oe.setDocumentNumber(fdocNbr);
080: oe.setTransactionLedgerEntrySequenceNumber(sequenceNbr);
081: oe.setChartOfAccountsCode(chartOfAccountsCode);
082: oe.setAccountNumber(accountNumber);
083: oe.setSubAccountNumber(subAccountNumber);
084: oe.setFinancialObjectCode(financialObjectCode);
085: oe.setFinancialSubObjectCode(financialSubObjectCode);
086: oe.setFinancialBalanceTypeCode(financialBalanceTypeCode);
087: oe.setFinancialObjectTypeCode(finObjTypCd);
088: oe.setUniversityFiscalYear(universityFiscalYear);
089: oe.setUniversityFiscalPeriodCode(univFiscalPrdCd);
090: oe.setTransactionLedgerEntryDescription(description);
091: if (amount != null) {
092: oe
093: .setTransactionLedgerEntryAmount(new KualiDecimal(
094: amount));
095: }
096: oe.setTransactionDebitCreditCode(debitCrdtCd);
097: if (transactionDt != null) {
098: oe.setTransactionDate(new Date(transactionDt.getTime()));
099: }
100: oe.setFinancialDocumentTypeCode(financialDocumentTypeCode);
101: oe.setOrganizationDocumentNumber(orgDocNbr);
102: oe.setProjectCode(projectCd);
103: oe.setOrganizationReferenceId(orgReferenceId);
104: oe.setReferenceFinancialDocumentTypeCode(fdocRefTypCd);
105: oe.setReferenceFinancialSystemOriginationCode(fsRefOriginCd);
106: oe.setReferenceFinancialDocumentNumber(fdocRefNbr);
107: if (fdocReversalDt != null) {
108: oe.setFinancialDocumentReversalDate(new Date(fdocReversalDt
109: .getTime()));
110: }
111: oe.setTransactionEncumbranceUpdateCode(trnEncumUpdtCd);
112:
113: return oe;
114: }
115:
116: public String getAccountNumber() {
117: return accountNumber;
118: }
119:
120: public void setAccountNumber(String accountNbr) {
121: this .accountNumber = accountNbr;
122: }
123:
124: public String getAcctSfFinObjCd() {
125: return acctSfFinObjCd;
126: }
127:
128: public void setAcctSfFinObjCd(String acctSfFinObjCd) {
129: this .acctSfFinObjCd = acctSfFinObjCd;
130: }
131:
132: public BigDecimal getAmount() {
133: return amount;
134: }
135:
136: public void setAmount(BigDecimal amount) {
137: this .amount = amount;
138: }
139:
140: public String getDebitCrdtCd() {
141: return debitCrdtCd;
142: }
143:
144: public void setDebitCrdtCd(String debitCrdtCd) {
145: this .debitCrdtCd = debitCrdtCd;
146: }
147:
148: public String getDescription() {
149: return description;
150: }
151:
152: public void setDescription(String description) {
153: this .description = description;
154: }
155:
156: public String getFdocApprovedCd() {
157: return fdocApprovedCd;
158: }
159:
160: public void setFdocApprovedCd(String fdocApprovedCd) {
161: this .fdocApprovedCd = fdocApprovedCd;
162: }
163:
164: public String getFdocNbr() {
165: return fdocNbr;
166: }
167:
168: public void setFdocNbr(String fdocNbr) {
169: this .fdocNbr = fdocNbr;
170: }
171:
172: public String getFdocRefNbr() {
173: return fdocRefNbr;
174: }
175:
176: public void setFdocRefNbr(String fdocRefNbr) {
177: this .fdocRefNbr = fdocRefNbr;
178: }
179:
180: public String getFdocRefTypCd() {
181: return fdocRefTypCd;
182: }
183:
184: public void setFdocRefTypCd(String fdocRefTypCd) {
185: this .fdocRefTypCd = fdocRefTypCd;
186: }
187:
188: public Timestamp getFdocReversalDt() {
189: return fdocReversalDt;
190: }
191:
192: public void setFdocReversalDt(Timestamp fdocReversalDt) {
193: this .fdocReversalDt = fdocReversalDt;
194: }
195:
196: public String getFinancialDocumentTypeCode() {
197: return financialDocumentTypeCode;
198: }
199:
200: public void setFinancialDocumentTypeCode(String fdocTypCd) {
201: this .financialDocumentTypeCode = fdocTypCd;
202: }
203:
204: public String getFinancialBalanceTypeCode() {
205: return financialBalanceTypeCode;
206: }
207:
208: public void setFinancialBalanceTypeCode(String finBalanceTypCd) {
209: this .financialBalanceTypeCode = finBalanceTypCd;
210: }
211:
212: public String getChartOfAccountsCode() {
213: return chartOfAccountsCode;
214: }
215:
216: public void setChartOfAccountsCode(String finCoaCd) {
217: this .chartOfAccountsCode = finCoaCd;
218: }
219:
220: public String getFinancialObjectCode() {
221: return financialObjectCode;
222: }
223:
224: public void setFinancialObjectCode(String finObjectCd) {
225: this .financialObjectCode = finObjectCd;
226: }
227:
228: public String getFinObjTypCd() {
229: return finObjTypCd;
230: }
231:
232: public void setFinObjTypCd(String finObjTypCd) {
233: this .finObjTypCd = finObjTypCd;
234: }
235:
236: public String getFinancialSubObjectCode() {
237: return financialSubObjectCode;
238: }
239:
240: public void setFinancialSubObjectCode(String finSubObjCd) {
241: this .financialSubObjectCode = finSubObjCd;
242: }
243:
244: public String getFsOriginCd() {
245: return fsOriginCd;
246: }
247:
248: public void setFsOriginCd(String fsOriginCd) {
249: this .fsOriginCd = fsOriginCd;
250: }
251:
252: public String getFsRefOriginCd() {
253: return fsRefOriginCd;
254: }
255:
256: public void setFsRefOriginCd(String fsRefOriginCd) {
257: this .fsRefOriginCd = fsRefOriginCd;
258: }
259:
260: public Integer getId() {
261: return id;
262: }
263:
264: public void setId(Integer id) {
265: this .id = id;
266: }
267:
268: public String getOrgDocNbr() {
269: return orgDocNbr;
270: }
271:
272: public void setOrgDocNbr(String orgDocNbr) {
273: this .orgDocNbr = orgDocNbr;
274: }
275:
276: public String getOrgReferenceId() {
277: return orgReferenceId;
278: }
279:
280: public void setOrgReferenceId(String orgReferenceId) {
281: this .orgReferenceId = orgReferenceId;
282: }
283:
284: public String getProcessInd() {
285: return processInd;
286: }
287:
288: public void setProcessInd(String processInd) {
289: this .processInd = processInd;
290: }
291:
292: public String getProjectCd() {
293: return projectCd;
294: }
295:
296: public void setProjectCd(String projectCd) {
297: this .projectCd = projectCd;
298: }
299:
300: public Integer getSequenceNbr() {
301: return sequenceNbr;
302: }
303:
304: public void setSequenceNbr(Integer sequenceNbr) {
305: this .sequenceNbr = sequenceNbr;
306: }
307:
308: public String getSubAccountNumber() {
309: return subAccountNumber;
310: }
311:
312: public void setSubAccountNumber(String subAccountNbr) {
313: this .subAccountNumber = subAccountNbr;
314: }
315:
316: public Timestamp getTransactionDt() {
317: return transactionDt;
318: }
319:
320: public void setTransactionDt(Timestamp transactionDt) {
321: this .transactionDt = transactionDt;
322: }
323:
324: public String getTrnEncumUpdtCd() {
325: return trnEncumUpdtCd;
326: }
327:
328: public void setTrnEncumUpdtCd(String trnEncumUpdtCd) {
329: this .trnEncumUpdtCd = trnEncumUpdtCd;
330: }
331:
332: public String getTrnEntrOfstCd() {
333: return trnEntrOfstCd;
334: }
335:
336: public void setTrnEntrOfstCd(String trnEntrOfstCd) {
337: this .trnEntrOfstCd = trnEntrOfstCd;
338: }
339:
340: public String getUnivFiscalPrdCd() {
341: return univFiscalPrdCd;
342: }
343:
344: public void setUnivFiscalPrdCd(String univFiscalPrdCd) {
345: this .univFiscalPrdCd = univFiscalPrdCd;
346: }
347:
348: public Integer getUniversityFiscalYear() {
349: return universityFiscalYear;
350: }
351:
352: public void setUniversityFiscalYear(Integer univFiscalYr) {
353: this .universityFiscalYear = univFiscalYr;
354: }
355:
356: public boolean equals(Object obj) {
357: if (!(obj instanceof GlPendingTransaction)) {
358: return false;
359: }
360: GlPendingTransaction o = (GlPendingTransaction) obj;
361: return new EqualsBuilder().append(id, o.getId()).isEquals();
362: }
363:
364: public int hashCode() {
365: return new HashCodeBuilder(83, 5).append(id).toHashCode();
366: }
367:
368: public String toString() {
369: return new ToStringBuilder(this ).append("id", id).toString();
370: }
371:
372: public void setAccount(Account a) { /* don't do nada; we're just fulfilling the contract of FlexibleAccountUpdateable */
373: }
374: }
|