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
017package org.kuali.ole.coa.businessobject;
018
019import java.util.LinkedHashMap;
020
021import org.apache.log4j.Logger;
022import org.springframework.beans.BeanUtils;
023
024/**
025 * IndirectCostRecoveryAccount for A21SubAccount
026 */
027public class A21IndirectCostRecoveryAccount extends IndirectCostRecoveryAccount {
028    private static Logger LOG = Logger.getLogger(A21IndirectCostRecoveryAccount.class);
029
030    private Integer a21IndirectCostRecoveryAccountGeneratedIdentifier;
031    
032    //additional foreign keys to SubAccount
033    private String subAccountNumber;
034    
035    /**
036     * Default constructor.
037     */
038    public A21IndirectCostRecoveryAccount() {
039    }
040    
041    /**
042     * private constructor 
043     * 
044     * @param icr
045     */
046    private A21IndirectCostRecoveryAccount(IndirectCostRecoveryAccount icr) {
047        BeanUtils.copyProperties(icr,this);
048    }
049    
050    /**
051     * static instantiate an A21ICRAccount from an ICRAccount
052     *
053     * @param icrAccount
054     * @return
055     */
056    public static A21IndirectCostRecoveryAccount copyICRAccount(IndirectCostRecoveryAccount icrAccount) {
057        return new A21IndirectCostRecoveryAccount(icrAccount); 
058    }
059
060    public Integer getA21IndirectCostRecoveryAccountGeneratedIdentifier() {
061        return a21IndirectCostRecoveryAccountGeneratedIdentifier;
062    }
063
064    public void setA21IndirectCostRecoveryAccountGeneratedIdentifier(Integer a21IndirectCostRecoveryAccountGeneratedIdentifier) {
065        this.a21IndirectCostRecoveryAccountGeneratedIdentifier = a21IndirectCostRecoveryAccountGeneratedIdentifier;
066    }
067
068    public String getSubAccountNumber() {
069        return subAccountNumber;
070    }
071
072    public void setSubAccountNumber(String subAccountNumber) {
073        this.subAccountNumber = subAccountNumber;
074    }
075
076    /**
077     * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
078     */
079    protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
080        LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
081        if (this.a21IndirectCostRecoveryAccountGeneratedIdentifier != null) {
082            m.put("a21IndirectCostRecoveryAccountGeneratedIdentifier", this.a21IndirectCostRecoveryAccountGeneratedIdentifier.toString());
083        }
084        return m;
085    }
086
087}