001 /*
002 * Copyright 2011 The Kuali Foundation.
003 *
004 * Licensed under the Educational Community License, Version 2.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/ecl2.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 package org.kuali.kfs.module.purap.businessobject;
018
019 import java.sql.Timestamp;
020 import java.util.HashMap;
021 import java.util.HashSet;
022
023 import org.kuali.kfs.coa.businessobject.AccountingPeriod;
024 import org.kuali.kfs.module.purap.util.PurApObjectUtils;
025 import org.kuali.kfs.sys.context.SpringContext;
026 import org.kuali.rice.kns.service.DateTimeService;
027
028 /**
029 * Payment Request Account Revision Business Object.
030 */
031 public class PaymentRequestAccountRevision extends PaymentRequestAccount {
032
033 protected Integer accountRevisionIdentifier;
034 private Timestamp accountRevisionTimestamp;
035
036 private AccountingPeriod accountingPeriod;
037
038 public AccountingPeriod getAccountingPeriod() {
039 return accountingPeriod;
040 }
041
042 public void setAccountingPeriod(AccountingPeriod accountingPeriod) {
043 this.accountingPeriod = accountingPeriod;
044 }
045
046 /**
047 * Default constructor.
048 */
049 public PaymentRequestAccountRevision() {
050
051 }
052
053 /**
054 * Constructor.
055 *
056 * @param account - payment request account
057 */
058 public PaymentRequestAccountRevision(PaymentRequestAccount pra, Integer postingYear, String postingPeriodCode) {
059 // copy base attributes
060 PurApObjectUtils.populateFromBaseWithSuper(pra, this, new HashMap<String, Class<?>>(), new HashSet<Class>());
061 this.setAccountRevisionTimestamp(SpringContext.getBean(DateTimeService.class).getCurrentTimestamp());
062 this.setPostingYear(postingYear);
063 this.setPostingPeriodCode(postingPeriodCode);
064 }
065
066 public Integer getAccountRevisionIdentifier() {
067 return accountRevisionIdentifier;
068 }
069
070 public void setAccountRevisionIdentifier(Integer accountRevisionIdentifier) {
071 this.accountRevisionIdentifier = accountRevisionIdentifier;
072 }
073
074 public Timestamp getAccountRevisionTimestamp() {
075 return accountRevisionTimestamp;
076 }
077
078 public void setAccountRevisionTimestamp(Timestamp accountRevisionTimestamp) {
079 this.accountRevisionTimestamp = accountRevisionTimestamp;
080 }
081
082 }