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 import java.util.List;
023
024 import org.kuali.kfs.module.endow.EndowConstants;
025 import org.kuali.kfs.module.endow.EndowPropertyConstants;
026 import org.kuali.kfs.module.endow.document.service.KEMService;
027 import org.kuali.kfs.sys.KFSConstants;
028 import org.kuali.kfs.sys.context.SpringContext;
029 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
030 import org.kuali.rice.kns.service.DateTimeService;
031 import org.kuali.rice.kns.service.ParameterService;
032 import org.kuali.rice.kns.util.KualiInteger;
033 import org.kuali.rice.kns.util.TypedArrayList;
034
035 /**
036 * Business Object for Holding Tax Lot table
037 */
038 public class HoldingTaxLotRebalance extends PersistableBusinessObjectBase {
039
040 // Composite keys:
041 private String incomePrincipalIndicator;
042 private String registrationCode;
043 private String securityId;
044 private String kemid;
045
046 // Other fields:
047 private KualiInteger totalLotNumber;
048 private BigDecimal totalUnits;
049 private BigDecimal totalCost;
050
051 // Reference objects:
052 protected IncomePrincipalIndicator incomePrincipal;
053 protected RegistrationCode registration;
054 protected Security security;
055 protected KEMID kemidObj;
056
057 // Collections:
058 protected List<HoldingTaxLot> holdingTaxLots;
059
060 /**
061 * Constructor.
062 */
063 public HoldingTaxLotRebalance()
064 {
065 holdingTaxLots = new TypedArrayList(HoldingTaxLot.class);
066 }
067
068 /**
069 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
070 */
071 @Override
072 protected LinkedHashMap<String, String> toStringMapper() {
073 LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
074 m.put(EndowPropertyConstants.KEMID, this.kemid);
075 m.put(EndowPropertyConstants.HOLDING_TAX_LOT_REBAL_SECURITY_ID, this.securityId);
076 m.put(EndowPropertyConstants.HOLDING_TAX_LOT_REBAL_REGISTRATION_CODE, this.registrationCode);
077 m.put(EndowPropertyConstants.HOLDING_TAX_LOT_REBAL_INCOME_PRINCIPAL_INDICATOR, this.incomePrincipalIndicator);
078
079 return m;
080 }
081
082 /**
083 * Gets the registrationCode attribute.
084 * @return Returns the registrationCode.
085 */
086 public String getRegistrationCode() {
087 return registrationCode;
088 }
089
090 /**
091 * Sets the registrationCode attribute value.
092 * @param registrationCode The registrationCode to set.
093 */
094 public void setRegistrationCode(String registrationCode) {
095 this.registrationCode = registrationCode;
096 }
097
098 /**
099 * Gets the securityId attribute.
100 * @return Returns the securityId.
101 */
102 public String getSecurityId() {
103 return securityId;
104 }
105
106 /**
107 * Sets the securityId attribute value.
108 * @param securityId The securityId to set.
109 */
110 public void setSecurityId(String securityId) {
111 this.securityId = securityId;
112 }
113
114 /**
115 * Gets the kemid attribute.
116 * @return Returns the kemid.
117 */
118 public String getKemid() {
119 return kemid;
120 }
121
122 /**
123 * Sets the kemid attribute value.
124 * @param kemid The kemid to set.
125 */
126 public void setKemid(String kemid) {
127 this.kemid = kemid;
128 }
129
130 /**
131 * Gets the incomePrincipalIndicator attribute.
132 * @return Returns the incomePrincipalIndicator.
133 */
134 public String getIncomePrincipalIndicator() {
135 return incomePrincipalIndicator;
136 }
137
138 /**
139 * Sets the incomePrincipalIndicator attribute value.
140 * @param incomePrincipalIndicator The incomePrincipalIndicator to set.
141 */
142 public void setIncomePrincipalIndicator(String incomePrincipalIndicator) {
143 this.incomePrincipalIndicator = incomePrincipalIndicator;
144 }
145
146 /**
147 * Gets the totalLotNumber attribute.
148 * @return Returns the totalLotNumber.
149 */
150 public KualiInteger getTotalLotNumber() {
151 return totalLotNumber;
152 }
153
154 /**
155 * Sets the totalLotNumber attribute value.
156 * @param totalLotNumber The totalLotNumber to set.
157 */
158 public void setTotalLotNumber(KualiInteger totalLotNumber) {
159 this.totalLotNumber = totalLotNumber;
160 }
161
162 /**
163 * Gets the totalUnits attribute.
164 * @return Returns the totalUnits.
165 */
166 public BigDecimal getTotalUnits() {
167 return totalUnits;
168 }
169
170 /**
171 * Sets the totalUnits attribute value.
172 * @param totalUnits The totalUnits to set.
173 */
174 public void setTotalUnits(BigDecimal totalUnits) {
175 this.totalUnits = totalUnits;
176 }
177
178 /**
179 * Gets the totalCost attribute.
180 * @return Returns the totalCost.
181 */
182 public BigDecimal getTotalCost() {
183 return totalCost;
184 }
185
186 /**
187 * Sets the totalCost attribute value.
188 * @param totalCost The totalCost to set.
189 */
190 public void setTotalCost(BigDecimal totalCost) {
191 this.totalCost = totalCost;
192 }
193
194 /**
195 * Gets the incomePrincipal attribute.
196 * @return Returns the incomePrincipal.
197 */
198 public IncomePrincipalIndicator getIncomePrincipal() {
199 return incomePrincipal;
200 }
201
202 /**
203 * Sets the incomePrincipal attribute value.
204 * @param incomePrincipal The incomePrincipal to set.
205 */
206 public void setIncomePrincipal(IncomePrincipalIndicator incomePrincipal) {
207 this.incomePrincipal = incomePrincipal;
208 }
209
210 /**
211 * Gets the registration attribute.
212 * @return Returns the registration.
213 */
214 public RegistrationCode getRegistration() {
215 return registration;
216 }
217
218 /**
219 * Sets the registration attribute value.
220 * @param registration The registration to set.
221 */
222 public void setRegistration(RegistrationCode registration) {
223 this.registration = registration;
224 }
225
226 /**
227 * Gets the security attribute.
228 * @return Returns the security.
229 */
230 public Security getSecurity() {
231 return security;
232 }
233
234 /**
235 * Sets the security attribute value.
236 * @param security The security to set.
237 */
238 public void setSecurity(Security security) {
239 this.security = security;
240 }
241
242 /**
243 * Gets the kemidObj attribute.
244 * @return Returns the kemidObj.
245 */
246 public KEMID getKemidObj() {
247 return kemidObj;
248 }
249
250 /**
251 * Sets the kemidObj attribute value.
252 * @param kemidObj The kemidObj to set.
253 */
254 public void setKemidObj(KEMID kemidObj) {
255 this.kemidObj = kemidObj;
256 }
257
258 /**
259 * Gets the holdingTaxLots attribute.
260 * @return Returns the holdingTaxLots.
261 */
262 public List<HoldingTaxLot> getHoldingTaxLots() {
263 return holdingTaxLots;
264 }
265
266 /**
267 * Sets the holdingTaxLots attribute value.
268 * @param holdingTaxLots The holdingTaxLots to set.
269 */
270 public void setHoldingTaxLots(List<HoldingTaxLot> holdingTaxLots) {
271 this.holdingTaxLots = holdingTaxLots;
272 }
273 }