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: package org.kuali.module.purap.document;
017:
018: import java.util.Date;
019: import java.util.List;
020:
021: import org.kuali.core.document.DocumentBase;
022: import org.kuali.core.util.KualiDecimal;
023: import org.kuali.kfs.bo.SourceAccountingLine;
024:
025: /**
026: * Payment Request Document subset containing fields needed for routing and searchable attributes for workflow, in order to reduce
027: * data transfer and improve performance.
028: */
029: public class WorkflowXmlPaymentRequestDocument extends DocumentBase {
030:
031: // fields from PurchasingAccountsPayableDocumentBase
032: private Integer purapDocumentIdentifier;
033: private Integer vendorHeaderGeneratedIdentifier;
034: private Integer vendorDetailAssignedIdentifier;
035: private String vendorName;
036: private String vendorNumber;
037: private String vendorCustomerNumber;
038: private Date accountsPayableApprovalDate;
039: private List<SourceAccountingLine> accountsForRouting;
040: private String statusCode;
041:
042: // fields from AccountsPayableDocumentBase
043: private Integer purchaseOrderIdentifier;
044: private String chartOfAccountsCode;
045: private String organizationCode;
046: private String processingCampusCode;
047: private Date extractedDate;
048: private boolean holdIndicator;
049:
050: // fields from PaymentRequestDocument
051: private Integer requisitionIdentifier;
052: private Date invoiceDate;
053: private String invoiceNumber;
054: private KualiDecimal vendorInvoiceAmount;
055: private Date paymentRequestPayDate;
056: private Date paymentPaidDate;
057: private boolean paymentRequestedCancelIndicator;
058:
059: // dummy reference objects, with same field names as the original reference objects,
060: // but only contain the fields that are actually used in workflow
061: private DummyStatus status;
062:
063: /**
064: * Dummy Reference Object for Status
065: */
066: public class DummyStatus {
067: private String statusDescription;
068:
069: /**
070: * Constructs a Dummy Status
071: *
072: * @param statusDescription String description of the Status.
073: */
074: public DummyStatus(String statusDescription) {
075: this .statusDescription = statusDescription;
076: }
077:
078: public String getStatusDescription() {
079: return this .statusDescription;
080: }
081:
082: public void setStatusDescription(String statusDescription) {
083: this .statusDescription = statusDescription;
084: }
085: }
086:
087: /**
088: * Default constructor.
089: */
090: public WorkflowXmlPaymentRequestDocument() {
091: super ();
092: }
093:
094: /**
095: * Constructor to populate from PaymentRequestDocument
096: *
097: * @param document A PaymentRequestDocument.
098: */
099: public WorkflowXmlPaymentRequestDocument(
100: PaymentRequestDocument document) {
101: super ();
102:
103: this .documentHeader = document.getDocumentHeader();
104: this .documentNumber = document.getDocumentNumber();
105:
106: this .purapDocumentIdentifier = document
107: .getPurapDocumentIdentifier();
108: this .vendorHeaderGeneratedIdentifier = document
109: .getVendorHeaderGeneratedIdentifier();
110: this .vendorDetailAssignedIdentifier = document
111: .getVendorDetailAssignedIdentifier();
112: this .vendorName = document.getVendorName();
113: this .vendorNumber = document.getVendorNumber();
114: this .vendorCustomerNumber = document.getVendorCustomerNumber();
115: this .accountsPayableApprovalDate = document
116: .getAccountsPayableApprovalDate();
117: this .accountsForRouting = document.getAccountsForRouting();
118: this .statusCode = document.getStatusCode();
119:
120: this .purchaseOrderIdentifier = document
121: .getPurchaseOrderIdentifier();
122: this .chartOfAccountsCode = document.getChartOfAccountsCode();
123: this .organizationCode = document.getOrganizationCode();
124: this .processingCampusCode = document.getProcessingCampusCode();
125: this .extractedDate = document.getExtractedDate();
126: this .holdIndicator = document.isHoldIndicator();
127:
128: this .requisitionIdentifier = document
129: .getRequisitionIdentifier();
130: this .invoiceDate = document.getInvoiceDate();
131: this .invoiceNumber = document.getInvoiceNumber();
132: this .vendorInvoiceAmount = document.getVendorInvoiceAmount();
133: this .paymentRequestPayDate = document
134: .getPaymentRequestPayDate();
135: this .paymentPaidDate = document.getPaymentPaidDate();
136: this .paymentRequestedCancelIndicator = document
137: .getPaymentRequestedCancelIndicator();
138:
139: this .status = new DummyStatus(document.getStatus()
140: .getStatusDescription());
141: }
142:
143: public List<SourceAccountingLine> getAccountsForRouting() {
144: return accountsForRouting;
145: }
146:
147: public void setAccountsForRouting(
148: List<SourceAccountingLine> accountsForRouting) {
149: this .accountsForRouting = accountsForRouting;
150: }
151:
152: public Date getAccountsPayableApprovalDate() {
153: return accountsPayableApprovalDate;
154: }
155:
156: public void setAccountsPayableApprovalDate(
157: Date accountsPayableApprovalDate) {
158: this .accountsPayableApprovalDate = accountsPayableApprovalDate;
159: }
160:
161: public String getChartOfAccountsCode() {
162: return chartOfAccountsCode;
163: }
164:
165: public void setChartOfAccountsCode(String chartOfAccountsCode) {
166: this .chartOfAccountsCode = chartOfAccountsCode;
167: }
168:
169: public Date getExtractedDate() {
170: return extractedDate;
171: }
172:
173: public void setExtractedDate(Date extractedDate) {
174: this .extractedDate = extractedDate;
175: }
176:
177: public boolean isHoldIndicator() {
178: return holdIndicator;
179: }
180:
181: public void setHoldIndicator(boolean holdIndicator) {
182: this .holdIndicator = holdIndicator;
183: }
184:
185: public Date getInvoiceDate() {
186: return invoiceDate;
187: }
188:
189: public void setInvoiceDate(Date invoiceDate) {
190: this .invoiceDate = invoiceDate;
191: }
192:
193: public String getInvoiceNumber() {
194: return invoiceNumber;
195: }
196:
197: public void setInvoiceNumber(String invoiceNumber) {
198: this .invoiceNumber = invoiceNumber;
199: }
200:
201: public String getOrganizationCode() {
202: return organizationCode;
203: }
204:
205: public void setOrganizationCode(String organizationCode) {
206: this .organizationCode = organizationCode;
207: }
208:
209: public boolean isPaymentRequestedCancelIndicator() {
210: return paymentRequestedCancelIndicator;
211: }
212:
213: public void setPaymentRequestedCancelIndicator(
214: boolean paymentRequestedCancelIndicator) {
215: this .paymentRequestedCancelIndicator = paymentRequestedCancelIndicator;
216: }
217:
218: public Date getPaymentPaidDate() {
219: return paymentPaidDate;
220: }
221:
222: public void setPaymentPaidDate(Date paymentPaidDate) {
223: this .paymentPaidDate = paymentPaidDate;
224: }
225:
226: public Date getPaymentRequestPayDate() {
227: return paymentRequestPayDate;
228: }
229:
230: public void setPaymentRequestPayDate(Date paymentRequestPayDate) {
231: this .paymentRequestPayDate = paymentRequestPayDate;
232: }
233:
234: public String getProcessingCampusCode() {
235: return processingCampusCode;
236: }
237:
238: public void setProcessingCampusCode(String processingCampusCode) {
239: this .processingCampusCode = processingCampusCode;
240: }
241:
242: public Integer getPurapDocumentIdentifier() {
243: return purapDocumentIdentifier;
244: }
245:
246: public void setPurapDocumentIdentifier(
247: Integer purapDocumentIdentifier) {
248: this .purapDocumentIdentifier = purapDocumentIdentifier;
249: }
250:
251: public Integer getPurchaseOrderIdentifier() {
252: return purchaseOrderIdentifier;
253: }
254:
255: public void setPurchaseOrderIdentifier(
256: Integer purchaseOrderIdentifier) {
257: this .purchaseOrderIdentifier = purchaseOrderIdentifier;
258: }
259:
260: public Integer getRequisitionIdentifier() {
261: return requisitionIdentifier;
262: }
263:
264: public void setRequisitionIdentifier(Integer requisitionIdentifier) {
265: this .requisitionIdentifier = requisitionIdentifier;
266: }
267:
268: public DummyStatus getStatus() {
269: return status;
270: }
271:
272: public void setStatus(DummyStatus status) {
273: this .status = status;
274: }
275:
276: public String getStatusCode() {
277: return statusCode;
278: }
279:
280: public void setStatusCode(String statusCode) {
281: this .statusCode = statusCode;
282: }
283:
284: public String getVendorCustomerNumber() {
285: return vendorCustomerNumber;
286: }
287:
288: public void setVendorCustomerNumber(String vendorCustomerNumber) {
289: this .vendorCustomerNumber = vendorCustomerNumber;
290: }
291:
292: public Integer getVendorDetailAssignedIdentifier() {
293: return vendorDetailAssignedIdentifier;
294: }
295:
296: public void setVendorDetailAssignedIdentifier(
297: Integer vendorDetailAssignedIdentifier) {
298: this .vendorDetailAssignedIdentifier = vendorDetailAssignedIdentifier;
299: }
300:
301: public Integer getVendorHeaderGeneratedIdentifier() {
302: return vendorHeaderGeneratedIdentifier;
303: }
304:
305: public void setVendorHeaderGeneratedIdentifier(
306: Integer vendorHeaderGeneratedIdentifier) {
307: this .vendorHeaderGeneratedIdentifier = vendorHeaderGeneratedIdentifier;
308: }
309:
310: public KualiDecimal getVendorInvoiceAmount() {
311: return vendorInvoiceAmount;
312: }
313:
314: public void setVendorInvoiceAmount(KualiDecimal vendorInvoiceAmount) {
315: this .vendorInvoiceAmount = vendorInvoiceAmount;
316: }
317:
318: public String getVendorName() {
319: return vendorName;
320: }
321:
322: public void setVendorName(String vendorName) {
323: this .vendorName = vendorName;
324: }
325:
326: public String getVendorNumber() {
327: return vendorNumber;
328: }
329:
330: public void setVendorNumber(String vendorNumber) {
331: this.vendorNumber = vendorNumber;
332: }
333:
334: }
|