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 TransactionArchiveSecurity extends PersistableBusinessObjectBase {
039
040 // Composite keys:
041 private String documentNumber;
042 private Integer lineNumber;
043 private String lineTypeCode;
044
045 // Other fields:
046 private String securityId;
047 private String registrationCode;
048 private String etranCode;
049 private BigDecimal unitValue;
050 private BigDecimal unitsHeld;
051 private BigDecimal holdingCost;
052 private BigDecimal longTermGainLoss;
053 private BigDecimal shortTermGainLoss;
054
055 // Referenced objects:
056 protected Security security;
057
058 /**
059 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
060 */
061 @Override
062 protected LinkedHashMap<String, Object> toStringMapper() {
063 LinkedHashMap<String, Object> m = new LinkedHashMap<String, Object>();
064 m.put(EndowPropertyConstants.TRANSACTION_ARCHIVE_DOCUMENT_NUMBER, this.documentNumber);
065 m.put(EndowPropertyConstants.TRANSACTION_ARCHIVE_LINE_NUMBER, this.lineNumber);
066 m.put(EndowPropertyConstants.TRANSACTION_ARCHIVE_LINE_TYPE_CODE, this.lineTypeCode);
067
068 return m;
069 }
070
071 /**
072 * Gets the security attribute.
073 * @return Returns the security.
074 */
075 public Security getSecurity() {
076 return security;
077 }
078
079 /**
080 * Sets the security attribute value.
081 * @param security The security to set.
082 */
083 public void setSecurity(Security security) {
084 this.security = security;
085 }
086
087 /**
088 * Gets the documentNumber attribute.
089 * @return Returns the documentNumber.
090 */
091 public String getDocumentNumber() {
092 return documentNumber;
093 }
094
095 /**
096 * Sets the documentNumber attribute value.
097 * @param documentNumber The documentNumber to set.
098 */
099 public void setDocumentNumber(String documentNumber) {
100 this.documentNumber = documentNumber;
101 }
102
103 /**
104 * Gets the lineNumber attribute.
105 * @return Returns the lineNumber.
106 */
107 public Integer getLineNumber() {
108 return lineNumber;
109 }
110
111 /**
112 * Sets the lineNumber attribute value.
113 * @param lineNumber The lineNumber to set.
114 */
115 public void setLineNumber(Integer lineNumber) {
116 this.lineNumber = lineNumber;
117 }
118
119 /**
120 * Gets the lineTypeCode attribute.
121 * @return Returns the lineTypeCode.
122 */
123 public String getLineTypeCode() {
124 return lineTypeCode;
125 }
126
127 /**
128 * Sets the lineTypeCode attribute value.
129 * @param lineTypeCode The lineTypeCode to set.
130 */
131 public void setLineTypeCode(String lineTypeCode) {
132 this.lineTypeCode = lineTypeCode;
133 }
134
135 /**
136 * Gets the securityId attribute.
137 * @return Returns the securityId.
138 */
139 public String getSecurityId() {
140 return securityId;
141 }
142
143 /**
144 * Sets the securityId attribute value.
145 * @param securityId The securityId to set.
146 */
147 public void setSecurityId(String securityId) {
148 this.securityId = securityId;
149 }
150
151 /**
152 * Gets the registrationCode attribute.
153 * @return Returns the registrationCode.
154 */
155 public String getRegistrationCode() {
156 return registrationCode;
157 }
158
159 /**
160 * Sets the registrationCode attribute value.
161 * @param registrationCode The registrationCode to set.
162 */
163 public void setRegistrationCode(String registrationCode) {
164 this.registrationCode = registrationCode;
165 }
166
167 /**
168 * Gets the entranCode attribute.
169 * @return Returns the entranCode.
170 */
171 public String getEtranCode() {
172 return etranCode;
173 }
174
175 /**
176 * Sets the entranCode attribute value.
177 * @param entranCode The entranCode to set.
178 */
179 public void setEtranCode(String etranCode) {
180 this.etranCode = etranCode;
181 }
182
183 /**
184 * Gets the unitValue attribute.
185 * @return Returns the unitValue.
186 */
187 public BigDecimal getUnitValue() {
188 return unitValue;
189 }
190
191 /**
192 * Sets the unitValue attribute value.
193 * @param unitValue The unitValue to set.
194 */
195 public void setUnitValue(BigDecimal unitValue) {
196 this.unitValue = unitValue;
197 }
198
199 /**
200 * Gets the unitsHeld attribute.
201 * @return Returns the unitsHeld.
202 */
203 public BigDecimal getUnitsHeld() {
204 return unitsHeld;
205 }
206
207 /**
208 * Sets the unitsHeld attribute value.
209 * @param unitsHeld The unitsHeld to set.
210 */
211 public void setUnitsHeld(BigDecimal unitsHeld) {
212 this.unitsHeld = unitsHeld;
213 }
214
215 /**
216 * Gets the holdingCost attribute.
217 * @return Returns the holdingCost.
218 */
219 public BigDecimal getHoldingCost() {
220 return holdingCost;
221 }
222
223 /**
224 * Sets the holdingCost attribute value.
225 * @param holdingCost The holdingCost to set.
226 */
227 public void setHoldingCost(BigDecimal holdingCost) {
228 this.holdingCost = holdingCost;
229 }
230
231 /**
232 * Gets the longTermGainLoss attribute.
233 * @return Returns the longTermGainLoss.
234 */
235 public BigDecimal getLongTermGainLoss() {
236 return longTermGainLoss;
237 }
238
239 /**
240 * Sets the longTermGainLoss attribute value.
241 * @param longTermGainLoss The longTermGainLoss to set.
242 */
243 public void setLongTermGainLoss(BigDecimal longTermGainLoss) {
244 this.longTermGainLoss = longTermGainLoss;
245 }
246
247 /**
248 * Gets the shortTermGainLoss attribute.
249 * @return Returns the shortTermGainLoss.
250 */
251 public BigDecimal getShortTermGainLoss() {
252 return shortTermGainLoss;
253 }
254
255 /**
256 * Sets the shortTermGainLoss attribute value.
257 * @param shortTermGainLoss The shortTermGainLoss to set.
258 */
259 public void setShortTermGainLoss(BigDecimal shortTermGainLoss) {
260 this.shortTermGainLoss = shortTermGainLoss;
261 }
262
263 }