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.util.LinkedHashMap; 019 020 import org.kuali.rice.kns.bo.TransientBusinessObjectBase; 021 import org.kuali.rice.kns.util.KualiDecimal; 022 023 public class TransactionDocumentTotalReportLine extends TransactionDocumentForReportLineBase { 024 025 protected int totalNumberOfTransactionLines = 0;; 026 027 public TransactionDocumentTotalReportLine() { 028 this("", "", ""); 029 } 030 031 public TransactionDocumentTotalReportLine(String documentType, String documentId, String securityId) { 032 this.documentType = documentType; 033 this.documentId = documentId; 034 this.securityId = securityId; 035 } 036 037 /** 038 * Gets the totalNumberOfTransactionLines attribute. 039 * @return Returns the totalNumberOfTransactionLines. 040 */ 041 public Integer getTotalNumberOfTransactionLines() { 042 return totalNumberOfTransactionLines; 043 } 044 045 /** 046 * Sets the totalNumberOfTransactionLines attribute value. 047 * @param totalNumberOfTransactionLines The totalNumberOfTransactionLines to set. 048 */ 049 public void setTotalNumberOfTransactionLines(int totalNumberOfTransactionLines) { 050 this.totalNumberOfTransactionLines = totalNumberOfTransactionLines; 051 } 052 053 /** 054 * Adds a income amount to the current income total 055 * @param incomeAmount the income amount to add to the income total 056 */ 057 public void addIncomeAmount(KualiDecimal incomeAmount) { 058 this.incomeAmount = this.incomeAmount.add(incomeAmount); 059 this.totalNumberOfTransactionLines++; 060 061 } 062 063 /** 064 * Adds a principal amount to the current principal total 065 * @param principalAmount the principal amount to add to the principal total 066 */ 067 public void addPrincipalAmount(KualiDecimal principalAmount) { 068 this.principalAmount = this.principalAmount.add(principalAmount); 069 this.totalNumberOfTransactionLines++; 070 } 071 }