001: /*
002: * Copyright 2006-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: package org.kuali.module.kra.budget.bo;
018:
019: import java.util.LinkedHashMap;
020:
021: import org.kuali.core.bo.PersistableBusinessObjectBase;
022: import org.kuali.core.util.KualiInteger;
023:
024: /**
025: *
026: */
027: public class BudgetModularPeriod extends PersistableBusinessObjectBase {
028:
029: // Stored values
030: private String documentNumber;
031: private Integer budgetPeriodSequenceNumber;
032: private KualiInteger budgetAdjustedModularDirectCostAmount;
033:
034: // Derived values
035: private KualiInteger actualDirectCostAmount;
036: private KualiInteger consortiumAmount;
037: private KualiInteger totalPeriodDirectCostAmount;
038:
039: /**
040: * Default no-arg constructor.
041: */
042: public BudgetModularPeriod() {
043: }
044:
045: public BudgetModularPeriod(String documentNumber,
046: Integer budgetPeriodSequenceNumber) {
047: this .documentNumber = documentNumber;
048: this .budgetPeriodSequenceNumber = budgetPeriodSequenceNumber;
049: }
050:
051: /**
052: * Gets the documentNumber attribute.
053: *
054: * @return Returns the documentNumber
055: */
056: public String getDocumentNumber() {
057: return documentNumber;
058: }
059:
060: /**
061: * Sets the documentNumber attribute.
062: *
063: * @param documentNumber The documentNumber to set.
064: */
065: public void setDocumentNumber(String documentNumber) {
066: this .documentNumber = documentNumber;
067: }
068:
069: /**
070: * Gets the budgetPeriodSequenceNumber attribute.
071: *
072: * @return Returns the budgetPeriodSequenceNumber
073: */
074: public Integer getBudgetPeriodSequenceNumber() {
075: return budgetPeriodSequenceNumber;
076: }
077:
078: /**
079: * Sets the budgetPeriodSequenceNumber attribute.
080: *
081: * @param budgetPeriodSequenceNumber The budgetPeriodSequenceNumber to set.
082: */
083: public void setBudgetPeriodSequenceNumber(
084: Integer budgetPeriodSequenceNumber) {
085: this .budgetPeriodSequenceNumber = budgetPeriodSequenceNumber;
086: }
087:
088: /**
089: * Gets the budgetAdjustedModularDirectCostAmount attribute.
090: *
091: * @return Returns the budgetAdjustedModularDirectCostAmount
092: */
093: public KualiInteger getBudgetAdjustedModularDirectCostAmount() {
094: return budgetAdjustedModularDirectCostAmount;
095: }
096:
097: /**
098: * Sets the budgetAdjustedModularDirectCostAmount attribute.
099: *
100: * @param budgetAdjustedModularDirectCostAmount The budgetAdjustedModularDirectCostAmount to set.
101: */
102: public void setBudgetAdjustedModularDirectCostAmount(
103: KualiInteger budgetAdjustedModularDirectCostAmount) {
104: this .budgetAdjustedModularDirectCostAmount = budgetAdjustedModularDirectCostAmount;
105: }
106:
107: public void setActualDirectCostAmount(
108: KualiInteger actualDirectCostAmount) {
109: this .actualDirectCostAmount = actualDirectCostAmount;
110: }
111:
112: public KualiInteger getActualDirectCostAmount() {
113: return this .actualDirectCostAmount;
114: }
115:
116: public KualiInteger getConsortiumAmount() {
117: return consortiumAmount;
118: }
119:
120: public void setConsortiumAmount(KualiInteger consortiumAmount) {
121: this .consortiumAmount = consortiumAmount;
122: }
123:
124: public KualiInteger getTotalPeriodDirectCostAmount() {
125: return totalPeriodDirectCostAmount;
126: }
127:
128: public void setTotalPeriodDirectCostAmount(
129: KualiInteger totalPeriodDirectCostAmount) {
130: this .totalPeriodDirectCostAmount = totalPeriodDirectCostAmount;
131: }
132:
133: public KualiInteger getModularVarianceAmount() {
134: if (this .getBudgetAdjustedModularDirectCostAmount() != null
135: && this .getActualDirectCostAmount() != null) {
136: return this .getBudgetAdjustedModularDirectCostAmount()
137: .subtract(this .getActualDirectCostAmount());
138: }
139: return new KualiInteger(0);
140: }
141:
142: /**
143: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
144: */
145: protected LinkedHashMap toStringMapper() {
146: LinkedHashMap m = new LinkedHashMap();
147:
148: // m.put("<unique identifier 1>", this.<UniqueIdentifier1>());
149: // m.put("<unique identifier 2>", this.<UniqueIdentifier2>());
150:
151: return m;
152: }
153: }
|