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 package org.kuali.kfs.module.endow.businessobject;
017
018 import java.math.BigDecimal;
019 import java.sql.Date;
020 import java.text.ParseException;
021 import java.util.LinkedHashMap;
022
023 import org.kuali.kfs.module.endow.EndowConstants;
024 import org.kuali.kfs.module.endow.EndowPropertyConstants;
025 import org.kuali.kfs.module.endow.document.service.KEMService;
026 import org.kuali.kfs.sys.context.SpringContext;
027 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
028 import org.kuali.rice.kns.service.DateTimeService;
029 import org.kuali.rice.kns.service.ParameterService;
030
031 public class KEMIDCurrentBalance extends PersistableBusinessObjectBase {
032
033 private String kemid;
034 private BigDecimal incomeAtMarket;
035 private BigDecimal principalAtMarket;
036 private BigDecimal totalMarketValue;
037 private BigDecimal annualEstimatedIncome;
038 private BigDecimal remainderOfFYEstimatedIncome;
039 private BigDecimal nextFYEstimatedIncome;
040
041 private KEMID kemidObj;
042
043 /**
044 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
045 */
046 @Override
047 protected LinkedHashMap toStringMapper() {
048 LinkedHashMap m = new LinkedHashMap();
049 m.put(EndowPropertyConstants.KEMID, this.kemid);
050 return m;
051 }
052
053 /**
054 * Gets the incomeAtMarket.
055 *
056 * @return incomeAtMarket
057 */
058 public BigDecimal getIncomeAtMarket() {
059 return incomeAtMarket;
060 }
061
062 /**
063 * Sets the incomeAtMarket.
064 *
065 * @param incomeAtMarket
066 */
067 public void setIncomeAtMarket(BigDecimal incomeAtMarket) {
068 this.incomeAtMarket = incomeAtMarket;
069 }
070
071 /**
072 * Gets the principalAtMarket.
073 *
074 * @return principalAtMarket
075 */
076 public BigDecimal getPrincipalAtMarket() {
077 return principalAtMarket;
078 }
079
080 /**
081 * Sets the principalAtMarket.
082 *
083 * @param principalAtMarket
084 */
085 public void setPrincipalAtMarket(BigDecimal principalAtMarket) {
086 this.principalAtMarket = principalAtMarket;
087 }
088
089 /**
090 * Gets the totalMarketValue.
091 *
092 * @return totalMarketValue
093 */
094 public BigDecimal getTotalMarketValue() {
095 return totalMarketValue;
096 }
097
098 /**
099 * Sets the totalMarketValue.
100 *
101 * @param totalMarketValue
102 */
103 public void setTotalMarketValue(BigDecimal totalMarketValue) {
104 this.totalMarketValue = totalMarketValue;
105 }
106
107 /**
108 * Gets the annualEstimatedIncome.
109 *
110 * @return annualEstimatedIncome
111 */
112 public BigDecimal getAnnualEstimatedIncome() {
113 return annualEstimatedIncome;
114 }
115
116 /**
117 * Sets the annualEstimatedIncome.
118 *
119 * @param annualEstimatedIncome
120 */
121 public void setAnnualEstimatedIncome(BigDecimal annualEstimatedIncome) {
122 this.annualEstimatedIncome = annualEstimatedIncome;
123 }
124
125 /**
126 * Gets the kemid.
127 *
128 * @return kemid
129 */
130 public String getKemid() {
131 return kemid;
132 }
133
134 /**
135 * Sets the kemid.
136 *
137 * @param kemid
138 */
139 public void setKemid(String kemid) {
140 this.kemid = kemid;
141 }
142
143 /**
144 * Gets the nextFYEstimatedIncome.
145 *
146 * @return nextFYEstimatedIncome
147 */
148 public BigDecimal getNextFYEstimatedIncome() {
149 return nextFYEstimatedIncome;
150 }
151
152 /**
153 * Sets the nextFYEstimatedIncome.
154 *
155 * @param nextFYEstimatedIncome
156 */
157 public void setNextFYEstimatedIncome(BigDecimal nextFYEstimatedIncome) {
158 this.nextFYEstimatedIncome = nextFYEstimatedIncome;
159 }
160
161 /**
162 * Gets the remainderOfFYEstimatedIncome.
163 *
164 * @return remainderOfFYEstimatedIncome
165 */
166 public BigDecimal getRemainderOfFYEstimatedIncome() {
167 return remainderOfFYEstimatedIncome;
168 }
169
170 /**
171 * Sets the remainderOfFYEstimatedIncome.
172 *
173 * @param remainderOfFYEstimatedIncome
174 */
175 public void setRemainderOfFYEstimatedIncome(BigDecimal remainderOfFYEstimatedIncome) {
176 this.remainderOfFYEstimatedIncome = remainderOfFYEstimatedIncome;
177 }
178
179 /**
180 * Gets the kemidObj.
181 *
182 * @return kemidObj
183 */
184 public KEMID getKemidObj() {
185 return kemidObj;
186 }
187
188 /**
189 * Sets the kemidObj.
190 *
191 * @param kemidObj
192 */
193 public void setKemidObj(KEMID kemidObj) {
194 this.kemidObj = kemidObj;
195 }
196
197 /**
198 * Gets the Balance Date which is the Current/System Process date
199 *
200 * @return the Balance Date
201 */
202 public Date getBalanceDate() {
203
204 return SpringContext.getBean(KEMService.class).getCurrentDate();
205 }
206
207 }