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.math.BigInteger;
020    import java.sql.Date;
021    import java.util.LinkedHashMap;
022    
023    import org.kuali.kfs.module.endow.EndowPropertyConstants;
024    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
025    
026    /**
027     * This class provides an implementation for the Tax Lot Lines in the Endowment transactional documents.
028     */
029    public class EndowmentTransactionTaxLotLine extends PersistableBusinessObjectBase {
030        // private KualiInteger lineNumber;
031        private String documentNumber;
032        private Integer documentLineNumber;
033        private String documentLineTypeCode;
034        private Integer transactionHoldingLotNumber;
035        private String kemid;
036        private String securityID;
037        private String registrationCode;
038        private String ipIndicator;
039        private BigDecimal lotUnits;
040        private BigDecimal lotHoldingCost;
041        private BigDecimal lotLongTermGainLoss;
042        private BigDecimal lotShortTermGainLoss;
043        private Date lotAcquiredDate;
044        private boolean newLotIndicator;
045    
046        private EndowmentTransactionLine transactionLine;
047        private KEMID kemidObjRef;
048        private Security security;
049        private RegistrationCode registrationCodeObjRef;
050        private IncomePrincipalIndicator ipIndicatorObjRef;
051    
052        /**
053         * Constructs a EndowmentTransactionTaxLotLine.java.
054         */
055        public EndowmentTransactionTaxLotLine()
056        {
057            lotUnits             = new BigDecimal(BigInteger.ZERO, 4);
058            lotHoldingCost       = new BigDecimal(BigInteger.ZERO, 2);
059            lotLongTermGainLoss  = new BigDecimal(BigInteger.ZERO, 2);
060            lotShortTermGainLoss = new BigDecimal(BigInteger.ZERO, 2);
061        }
062        
063        /**
064         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
065         */
066        @Override
067        protected LinkedHashMap toStringMapper() {
068            LinkedHashMap m = new LinkedHashMap();
069            m.put(EndowPropertyConstants.TRANSACTION_LINE_DOCUMENT_NUMBER, this.documentNumber);
070            m.put(EndowPropertyConstants.TRANSACTION_LINE_TYPE_CODE, this.documentLineTypeCode);
071            m.put(EndowPropertyConstants.TRANSACTION_LINE_NUMBER, this.documentLineNumber);
072            m.put(EndowPropertyConstants.TRANSACTION_HOLDING_LOT_NUMBER, this.transactionHoldingLotNumber);
073            return m;
074    
075        }
076    
077        /**
078         * Gets the lineNumber.
079         * 
080         * @return lineNumber
081         */
082        /*
083         * public KualiInteger getLineNumber() { return lineNumber; }
084         */
085        /**
086         * Sets the lineNumber.
087         * 
088         * @param lineNumber
089         */
090        /*
091         * public void setLineNumber(KualiInteger lineNumber) { this.lineNumber = lineNumber; }
092         */
093        /**
094         * Gets the documentNumber.
095         * 
096         * @return documentNumber
097         */
098        public String getDocumentNumber() {
099            return documentNumber;
100        }
101    
102        /**
103         * Sets the documentNumber.
104         * 
105         * @param documentNumber
106         */
107        public void setDocumentNumber(String documentNumber) {
108            this.documentNumber = documentNumber;
109        }
110    
111        /**
112         * Gets the documentLineNumber.
113         * 
114         * @return documentLineNumber
115         */
116        public Integer getDocumentLineNumber() {
117            return documentLineNumber;
118        }
119    
120        /**
121         * Sets the documentLineNumber.
122         * 
123         * @param documentLineNumber
124         */
125        public void setDocumentLineNumber(Integer documentLineNumber) {
126            this.documentLineNumber = documentLineNumber;
127        }
128    
129        /**
130         * Gets the documentLineTypeCode.
131         * 
132         * @return documentLineTypeCode
133         */
134        public String getDocumentLineTypeCode() {
135            return documentLineTypeCode;
136        }
137    
138        /**
139         * Sets the documentLineTypeCode.
140         * 
141         * @param documentLineTypeCode
142         */
143        public void setDocumentLineTypeCode(String documentLineTypeCode) {
144            this.documentLineTypeCode = documentLineTypeCode;
145        }
146    
147        /**
148         * Gets the transactionHoldingLotNumber.
149         * 
150         * @return transactionHoldingLotNumber
151         */
152        public Integer getTransactionHoldingLotNumber() {
153            return transactionHoldingLotNumber;
154        }
155    
156        /**
157         * Sets the transactionHoldingLotNumber.
158         * 
159         * @param transactionHoldingLotNumber
160         */
161        public void setTransactionHoldingLotNumber(Integer transactionHoldingLotNumber) {
162            this.transactionHoldingLotNumber = transactionHoldingLotNumber;
163        }
164    
165        /**
166         * Gets the lotUnits.
167         * 
168         * @return lotUnits
169         */
170        public BigDecimal getLotUnits() {
171            return lotUnits;
172        }
173    
174        /**
175         * Sets the lotUnits.
176         * 
177         * @param lotUnits
178         */
179        public void setLotUnits(BigDecimal lotUnits) {
180            this.lotUnits = lotUnits;
181        }
182    
183        /**
184         * Gets the lotHoldingCost.
185         * 
186         * @return lotHoldingCost
187         */
188        public BigDecimal getLotHoldingCost() {
189            return lotHoldingCost;
190        }
191    
192        /**
193         * Sets the lotHoldingCost.
194         * 
195         * @param lotHoldingCost
196         */
197        public void setLotHoldingCost(BigDecimal lotHoldingCost) {
198            this.lotHoldingCost = lotHoldingCost;
199        }
200    
201        /**
202         * Gets the lotLongTermGainLoss.
203         * 
204         * @return lotLongTermGainLoss
205         */
206        public BigDecimal getLotLongTermGainLoss() {
207            return lotLongTermGainLoss;
208        }
209    
210        /**
211         * Sets the lotLongTermGainLoss.
212         * 
213         * @param lotLongTermGainLoss
214         */
215        public void setLotLongTermGainLoss(BigDecimal lotLongTermGainLoss) {
216            this.lotLongTermGainLoss = lotLongTermGainLoss;
217        }
218    
219        /**
220         * Gets the lotShortTermGainLoss.
221         * 
222         * @return lotShortTermGainLoss
223         */
224        public BigDecimal getLotShortTermGainLoss() {
225            return lotShortTermGainLoss;
226        }
227    
228        /**
229         * Sets the lotShortTermGainLoss.
230         * 
231         * @param lotShortTermGainLoss
232         */
233        public void setLotShortTermGainLoss(BigDecimal lotShortTermGainLoss) {
234            this.lotShortTermGainLoss = lotShortTermGainLoss;
235        }
236    
237        /**
238         * Gets the transactionLine.
239         * 
240         * @return transactionLine
241         */
242        public EndowmentTransactionLine getTransactionLine() {
243            return transactionLine;
244        }
245    
246        /**
247         * Sets the transactionLine.
248         * 
249         * @param transactionLine
250         */
251        public void setTransactionLine(EndowmentTransactionLine transactionLine) {
252            this.transactionLine = transactionLine;
253        }
254    
255        /**
256         * Gets the lotAcquiredDate.
257         * 
258         * @return lotAcquiredDate
259         */
260        public Date getLotAcquiredDate() {
261            return lotAcquiredDate;
262        }
263    
264        /**
265         * Sets the lotAcquiredDate.
266         * 
267         * @param lotAcquiredDate
268         */
269        public void setLotAcquiredDate(Date lotAcquiredDate) {
270            this.lotAcquiredDate = lotAcquiredDate;
271        }
272    
273        /**
274         * Gets the kemid.
275         * 
276         * @return kemid
277         */
278        public String getKemid() {
279            return kemid;
280        }
281    
282        /**
283         * Sets the kemid.
284         * 
285         * @param kemid
286         */
287        public void setKemid(String kemid) {
288            this.kemid = kemid;
289        }
290    
291        /**
292         * Gets the securityID.
293         * 
294         * @return securityID
295         */
296        public String getSecurityID() {
297            return securityID;
298        }
299    
300        /**
301         * Sets the securityID.
302         * 
303         * @param securityID
304         */
305        public void setSecurityID(String securityID) {
306            this.securityID = securityID;
307        }
308    
309        /**
310         * Gets the registrationCode.
311         * 
312         * @return registrationCode
313         */
314        public String getRegistrationCode() {
315            return registrationCode;
316        }
317    
318        /**
319         * Sets the registrationCode.
320         * 
321         * @param registrationCode
322         */
323        public void setRegistrationCode(String registrationCode) {
324            this.registrationCode = registrationCode;
325        }
326    
327        /**
328         * Gets the ipIndicator.
329         * 
330         * @return ipIndicator
331         */
332        public String getIpIndicator() {
333            return ipIndicator;
334        }
335    
336        /**
337         * Sets the ipIndicator.
338         * 
339         * @param ipIndicator
340         */
341        public void setIpIndicator(String ipIndicator) {
342            this.ipIndicator = ipIndicator;
343        }
344    
345        /**
346         * Gets the newLotIndicator attribute. 
347         * @return Returns the newLotIndicator.
348         */
349        public boolean isNewLotIndicator() {
350            return newLotIndicator;
351        }
352    
353        /**
354         * Sets the newLotIndicator.
355         * 
356         * @param newLotIndicator
357         */
358        public void setNewLotIndicator (boolean newLotIndicator){
359            this.newLotIndicator = newLotIndicator;
360        }
361    
362        /**
363         * Gets the kemidObjRef.
364         * 
365         * @return kemidObjRef
366         */
367        public KEMID getKemidObjRef() {
368            return kemidObjRef;
369        }
370    
371        /**
372         * Sets the kemidObjRef.
373         * 
374         * @param kemidObjRef
375         */
376        public void setKemidObjRef(KEMID kemidObjRef) {
377            this.kemidObjRef = kemidObjRef;
378        }
379    
380        /**
381         * Gets the security.
382         * 
383         * @return security
384         */
385        public Security getSecurity() {
386            return security;
387        }
388    
389        /**
390         * Sets the security.
391         * 
392         * @param security
393         */
394        public void setSecurity(Security security) {
395            this.security = security;
396        }
397    
398        /**
399         * Gets the registrationCodeObjRef.
400         * 
401         * @return registrationCodeObjRef
402         */
403        public RegistrationCode getRegistrationCodeObjRef() {
404            return registrationCodeObjRef;
405        }
406    
407        /**
408         * Sets the registrationCodeObjRef.
409         * 
410         * @param registrationCodeObjRef
411         */
412        public void setRegistrationCodeObjRef(RegistrationCode registrationCodeObjRef) {
413            this.registrationCodeObjRef = registrationCodeObjRef;
414        }
415    
416        /**
417         * Gets the ipIndicatorObjRef.
418         * 
419         * @return ipIndicatorObjRef
420         */
421        public IncomePrincipalIndicator getIpIndicatorObjRef() {
422            return ipIndicatorObjRef;
423        }
424    
425        /**
426         * Sets the ipIndicatorObjRef.
427         * 
428         * @param ipIndicatorObjRef
429         */
430        public void setIpIndicatorObjRef(IncomePrincipalIndicator ipIndicatorObjRef) {
431            this.ipIndicatorObjRef = ipIndicatorObjRef;
432        }
433    }
434