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.util.LinkedHashMap;
020 import java.util.List;
021
022 import org.kuali.kfs.module.endow.EndowPropertyConstants;
023 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
024 import org.kuali.rice.kns.util.KualiDecimal;
025 import org.kuali.rice.kns.util.TypedArrayList;
026
027 /**
028 * This is the generic class which contains all the elements on a typical Endowment Transaction Line.
029 */
030 public abstract class EndowmentTransactionLineBase extends PersistableBusinessObjectBase implements EndowmentTransactionLine {
031
032 private String documentNumber;
033 private String transactionLineTypeCode;
034 private Integer transactionLineNumber;
035 private String kemid;
036 private String etranCode;
037 private String transactionLineDescription;
038 private String transactionIPIndicatorCode;
039 private KualiDecimal transactionAmount;
040 private boolean corpusIndicator;
041 private KualiDecimal transactionUnits;
042 private boolean linePosted;
043 private BigDecimal unitAdjustmentAmount;
044
045 private KEMID kemidObj;
046 private EndowmentTransactionCode etranCodeObj;
047 private IncomePrincipalIndicator incomePrincipalIndicator;
048
049 private List<EndowmentTransactionTaxLotLine> taxLotLines;
050
051 /**
052 * Constructs a EndowmentTransactionLineBase.java.
053 */
054 public EndowmentTransactionLineBase() {
055 setTransactionAmount(KualiDecimal.ZERO);
056 setTransactionUnits(KualiDecimal.ZERO);
057
058 kemidObj = new KEMID();
059 etranCodeObj = new EndowmentTransactionCode();
060 incomePrincipalIndicator = new IncomePrincipalIndicator();
061
062 taxLotLines = new TypedArrayList(EndowmentTransactionTaxLotLine.class);
063 }
064
065 /**
066 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
067 */
068 @Override
069 protected LinkedHashMap toStringMapper() {
070 LinkedHashMap m = new LinkedHashMap();
071 m.put(EndowPropertyConstants.TRANSACTION_LINE_DOCUMENT_NUMBER, this.documentNumber);
072 m.put(EndowPropertyConstants.TRANSACTION_LINE_TYPE_CODE, this.transactionLineTypeCode);
073 m.put(EndowPropertyConstants.TRANSACTION_LINE_NUMBER, this.transactionLineNumber);
074 return m;
075 }
076
077 /**
078 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getDocumentNumber()
079 */
080 public String getDocumentNumber() {
081 return documentNumber;
082 }
083
084 /**
085 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setDocumentNumber(java.lang.String)
086 */
087 public void setDocumentNumber(String documentNumber) {
088 this.documentNumber = documentNumber;
089 }
090
091
092 /**
093 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getTransactionLineTypeCode()
094 */
095 public String getTransactionLineTypeCode() {
096 return transactionLineTypeCode;
097 }
098
099 /**
100 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setTransactionLineTypeCode(java.lang.String)
101 */
102 public void setTransactionLineTypeCode(String transactionLineTypeCode) {
103 this.transactionLineTypeCode = transactionLineTypeCode;
104 }
105
106
107 /**
108 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getTransactionLineNumber()
109 */
110 public Integer getTransactionLineNumber() {
111 return transactionLineNumber;
112 }
113
114
115 /**
116 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setTransactionLineNumber(java.lang.Integer)
117 */
118 public void setTransactionLineNumber(Integer transactionLineNumber) {
119 this.transactionLineNumber = transactionLineNumber;
120 }
121
122 /**
123 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getKemid()
124 */
125 public String getKemid() {
126 return kemid;
127 }
128
129 /**
130 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setKemid(java.lang.String)
131 */
132 public void setKemid(String kemid) {
133 this.kemid = kemid;
134 }
135
136 /**
137 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getEtranCode()
138 */
139 public String getEtranCode() {
140 return etranCode;
141 }
142
143 /**
144 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setEtranCode(java.lang.String)
145 */
146 public void setEtranCode(String etranCode) {
147 this.etranCode = etranCode;
148 }
149
150 /**
151 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getTransactionLineDescription()
152 */
153 public String getTransactionLineDescription() {
154 return transactionLineDescription;
155 }
156
157 /**
158 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setTransactionLineDescription(java.lang.String)
159 */
160 public void setTransactionLineDescription(String transactionLineDescription) {
161 this.transactionLineDescription = transactionLineDescription;
162 }
163
164 /**
165 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getTransactionAmount()
166 */
167 public KualiDecimal getTransactionAmount() {
168 return transactionAmount;
169 }
170
171 /**
172 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setTransactionAmount(org.kuali.rice.kns.util.KualiDecimal)
173 */
174 public void setTransactionAmount(KualiDecimal transactionAmount) {
175 this.transactionAmount = transactionAmount;
176 }
177
178 /**
179 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getCorpusIndicator()
180 */
181 public boolean getCorpusIndicator() {
182 return corpusIndicator;
183 }
184
185 /**
186 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setCorpusIndicator(boolean)
187 */
188 public void setCorpusIndicator(boolean corpusIndicator) {
189 this.corpusIndicator = corpusIndicator;
190 }
191
192 /**
193 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getTransactionUnits()
194 */
195 public KualiDecimal getTransactionUnits() {
196 return transactionUnits;
197 }
198
199 /**
200 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setTransactionUnits(org.kuali.rice.kns.util.KualiDecimal)
201 */
202 public void setTransactionUnits(KualiDecimal transactionUnits) {
203 this.transactionUnits = transactionUnits;
204 }
205
206 /**
207 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#isLinePosted()
208 */
209 public boolean isLinePosted() {
210 return linePosted;
211 }
212
213 /**
214 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setLinePosted(boolean)
215 */
216 public void setLinePosted(boolean linePosted) {
217 this.linePosted = linePosted;
218 }
219
220 /**
221 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getTransactionIPIndicatorCode()
222 */
223 public String getTransactionIPIndicatorCode() {
224 return transactionIPIndicatorCode;
225 }
226
227 /**
228 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setTransactionIPIndicatorCode(java.lang.String)
229 */
230 public void setTransactionIPIndicatorCode(String transactionIPIndicatorCode) {
231 this.transactionIPIndicatorCode = transactionIPIndicatorCode;
232 }
233
234 /**
235 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getIncomePrincipalIndicator()
236 */
237 public IncomePrincipalIndicator getIncomePrincipalIndicator() {
238 return incomePrincipalIndicator;
239 }
240
241 /**
242 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setIncomePrincipalIndicator(org.kuali.kfs.module.endow.businessobject.IncomePrincipalIndicator)
243 */
244 public void setIncomePrincipalIndicator(IncomePrincipalIndicator incomePrincipalIndicator) {
245 this.incomePrincipalIndicator = incomePrincipalIndicator;
246 }
247
248 /**
249 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getKemidObj()
250 */
251 public KEMID getKemidObj() {
252 return kemidObj;
253 }
254
255 /**
256 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setKemidObj(org.kuali.kfs.module.endow.businessobject.KEMID)
257 */
258 public void setKemidObj(KEMID kemidObj) {
259 this.kemidObj = kemidObj;
260 }
261
262 /**
263 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getEtranCodeObj()
264 */
265 public EndowmentTransactionCode getEtranCodeObj() {
266 return etranCodeObj;
267 }
268
269 /**
270 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setEtranCodeObj(org.kuali.kfs.module.endow.businessobject.EndowmentTransactionCode)
271 */
272 public void setEtranCodeObj(EndowmentTransactionCode etranCodeObj) {
273 this.etranCodeObj = etranCodeObj;
274 }
275
276 /**
277 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#getTaxLotLines()
278 */
279 public List<EndowmentTransactionTaxLotLine> getTaxLotLines() {
280 return taxLotLines;
281 }
282
283 /**
284 * @see org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine#setTaxLotLines(java.util.List)
285 */
286 public void setTaxLotLines(List<EndowmentTransactionTaxLotLine> taxLotLines) {
287 this.taxLotLines = taxLotLines;
288 }
289
290 /**
291 * Gets unitAdjustmentAmount
292 *
293 * @return unitAdjustmentAmount
294 */
295 public BigDecimal getUnitAdjustmentAmount() {
296 return unitAdjustmentAmount;
297 }
298
299 /**
300 * sets unitAdjustmentAmount
301 */
302 public void setUnitAdjustmentAmount(BigDecimal unitAdjustmentAmount) {
303 this.unitAdjustmentAmount = unitAdjustmentAmount;
304 }
305 }