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.document; 017 018 import java.math.BigDecimal; 019 020 import org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO; 021 import org.kuali.rice.kns.util.KualiInteger; 022 023 import org.kuali.kfs.sys.document.Correctable; 024 import org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase; 025 import org.kuali.rice.kns.document.Copyable; 026 import org.kuali.kfs.module.endow.businessobject.Security; 027 import org.kuali.kfs.module.endow.businessobject.SecurityValuationMethod; 028 import org.kuali.kfs.module.endow.businessobject.MonthEndDate; 029 030 /** 031 * This is the transactional document that is used to record a modification to the 032 * market value of a record or group of records in the holding history table 033 */ 034 public class HoldingHistoryValueAdjustmentDocument extends FinancialSystemTransactionalDocumentBase implements Copyable { 035 036 protected String securityId; 037 protected KualiInteger holdingMonthEndDate; 038 protected BigDecimal securityUnitValue; 039 protected BigDecimal securityMarketValue; 040 protected boolean transactionPosted; 041 042 protected Security security; 043 protected SecurityValuationMethod securityValuation; 044 protected MonthEndDate monthEndDate; 045 046 public HoldingHistoryValueAdjustmentDocument() { 047 super(); 048 } 049 050 /** 051 * This method will get securityId 052 * @return securityId 053 */ 054 public String getSecurityId() { 055 return securityId; 056 } 057 058 /** 059 * This method will set securityId 060 * @param securityId 061 */ 062 public void setSecurityId(String securityId) { 063 this.securityId = securityId; 064 } 065 066 /** 067 * This method will get holdingMonthEndDate 068 * @return holdingMonthEndDate 069 */ 070 public KualiInteger getHoldingMonthEndDate() { 071 return holdingMonthEndDate; 072 } 073 074 /** 075 * This method will set holdingMonthEndDate 076 * @param holdingMonthEndDate 077 */ 078 public void setHoldingMonthEndDate(KualiInteger holdingMonthEndDate) { 079 this.holdingMonthEndDate = holdingMonthEndDate; 080 } 081 082 /** 083 * This method will get securityUnitValue 084 * @return securityUnitValue 085 */ 086 public BigDecimal getSecurityUnitValue() { 087 return securityUnitValue; 088 } 089 090 /** 091 * This method will set securityUnitValue 092 * @param securityUnitValue 093 */ 094 public void setSecurityUnitValue(BigDecimal securityUnitValue) { 095 this.securityUnitValue = securityUnitValue; 096 } 097 098 /** 099 * This method will get securityMarketValue 100 * @return securityMarketValue 101 */ 102 public BigDecimal getSecurityMarketValue() { 103 return securityMarketValue; 104 } 105 106 /** 107 * This method will set securityMarketValue 108 * @param securityMarketValue 109 */ 110 public void setSecurityMarketValue(BigDecimal securityMarketValue) { 111 this.securityMarketValue = securityMarketValue; 112 } 113 114 /** 115 * Get TransactionPosted 116 * @return transactionPosted 117 */ 118 public boolean isTransactionPosted() { 119 return transactionPosted; 120 } 121 122 /** 123 * Set TransactionPosted 124 * @param transactionPosted 125 */ 126 public void setTransactionPosted(boolean transactionPosted) { 127 this.transactionPosted = transactionPosted; 128 } 129 130 /** 131 * This method will get security 132 * @return security 133 */ 134 public Security getSecurity() { 135 return security; 136 } 137 138 /** 139 * This method will set security 140 * @param security 141 */ 142 public void setSecurity(Security security) { 143 this.security = security; 144 } 145 146 /** 147 * This method will get securityValuation 148 * @return securityValuation 149 */ 150 public SecurityValuationMethod getSecurityValuation() { 151 return securityValuation; 152 } 153 154 /** 155 * This method will set securityValuation 156 * @param securityValuation 157 */ 158 public void setSecurityValuation(SecurityValuationMethod securityValuation) { 159 this.securityValuation = securityValuation; 160 } 161 162 /** 163 * This method will get monthEndDate 164 * @return monthEndDate 165 */ 166 public MonthEndDate getMonthEndDate() { 167 return monthEndDate; 168 } 169 170 /** 171 * This method will set monthEndDate 172 * @param monthEndDate 173 */ 174 public void setMonthEndDate(MonthEndDate monthEndDate) { 175 this.monthEndDate = monthEndDate; 176 } 177 178 /** 179 * When document is processed or in the final status, do nothing specific. 180 * 181 * @see org.kuali.kfs.module.endow.document.EndowmentTransactionalDocumentBase#doRouteStatusChange() 182 */ 183 @Override 184 public void doRouteStatusChange(DocumentRouteStatusChangeDTO statusChangeEvent){ 185 //override the action defined in EndowmentTransactionalDocumentBase. 186 //since we don't need to post any transaction from this document type to 187 //the endowment transaction archive tables 188 } 189 }