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.apache.commons.lang.StringUtils; 021 import org.kuali.kfs.module.endow.EndowPropertyConstants; 022 import org.kuali.kfs.sys.KFSConstants; 023 import org.kuali.rice.kns.bo.Inactivateable; 024 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; 025 026 /** 027 * Business Object for Pooled Fund Control table. 028 */ 029 public class PooledFundControl extends PersistableBusinessObjectBase implements Inactivateable { 030 private String pooledSecurityID; 031 private String pooledFundDescription; 032 private Integer incrementValuationDays; 033 private String fundRegistrationCode; 034 private String fundKEMID; 035 private String fundAssetPurchaseOffsetTranCode; 036 private String fundAssetSaleOffsetTranCode; 037 private String fundSaleGainLossOffsetTranCode; 038 private String fundCashDepositOffsetTranCode; 039 private boolean distributeGainsAndLossesIndicator; 040 private boolean allowFractionalShares; 041 042 private boolean active; 043 044 private Security security; 045 private RegistrationCode registrationCodeObj; 046 private KEMID kemid; 047 private EndowmentTransactionCode assetPurchaseOffsetTranCode; 048 private EndowmentTransactionCode assetSaleOffsetTranCode; 049 private EndowmentTransactionCode saleGainLossOffsetTranCode; 050 private EndowmentTransactionCode cashDepositOffsetTranCode; 051 052 /** 053 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() 054 */ 055 @Override 056 protected LinkedHashMap toStringMapper() { 057 LinkedHashMap m = new LinkedHashMap(); 058 m.put(EndowPropertyConstants.POOL_SECURITY_ID, this.pooledSecurityID); 059 return m; 060 } 061 062 /** 063 * @see org.kuali.rice.kns.bo.Inactivateable#isActive() 064 */ 065 public boolean isActive() { 066 return active; 067 } 068 069 /** 070 * @see org.kuali.rice.kns.bo.Inactivateable#setActive(boolean) 071 */ 072 public void setActive(boolean active) { 073 this.active = active; 074 } 075 076 /** 077 * Gets the pooledSecurityID. 078 * 079 * @return pooledSecurityID 080 */ 081 public String getPooledSecurityID() { 082 return pooledSecurityID; 083 } 084 085 /** 086 * Sets the pooledSecurityID. 087 * 088 * @param pooledSecurityID 089 */ 090 public void setPooledSecurityID(String pooledSecurityID) { 091 this.pooledSecurityID = pooledSecurityID; 092 } 093 094 /** 095 * Gets the pooledFundDescription. 096 * 097 * @return pooledFundDescription 098 */ 099 public String getPooledFundDescription() { 100 return pooledFundDescription; 101 } 102 103 /** 104 * Sets the pooledFundDescription. 105 * 106 * @param pooledFundDescription 107 */ 108 public void setPooledFundDescription(String pooledFundDescription) { 109 this.pooledFundDescription = pooledFundDescription; 110 } 111 112 /** 113 * Gets the incrementValuationDays 114 * 115 * @return incrementValuationDays 116 */ 117 public Integer getIncrementValuationDays() { 118 return incrementValuationDays; 119 } 120 121 /** 122 * Sets the incrementValuationDays 123 * 124 * @param incrementValuationDays 125 */ 126 public void setIncrementValuationDays(Integer incrementValuationDays) { 127 this.incrementValuationDays = incrementValuationDays; 128 } 129 130 /** 131 * Gets the fundRegistrationCode 132 * 133 * @return fundRegistrationCode 134 */ 135 public String getFundRegistrationCode() { 136 return fundRegistrationCode; 137 } 138 139 /** 140 * Sets the fundRegistrationCode 141 * 142 * @param fundRegistrationCode 143 */ 144 public void setFundRegistrationCode(String fundRegistrationCode) { 145 this.fundRegistrationCode = fundRegistrationCode; 146 } 147 148 149 /** 150 * Gets the fundKEMID. 151 * 152 * @return fundKEMID 153 */ 154 public String getFundKEMID() { 155 return fundKEMID; 156 } 157 158 /** 159 * Sets the fundKEMID. 160 * 161 * @param fundKEMID 162 */ 163 public void setFundKEMID(String fundKEMID) { 164 this.fundKEMID = fundKEMID; 165 } 166 167 /** 168 * Gets the fundAssetPurchaseOffsetTranCode 169 * 170 * @return fundAssetPurchaseOffsetTranCode 171 */ 172 public String getFundAssetPurchaseOffsetTranCode() { 173 return fundAssetPurchaseOffsetTranCode; 174 } 175 176 /** 177 * Set the fundAssetPurchaseOffsetTranCode 178 * 179 * @param fundAssetPurchaseOffsetTranCode 180 */ 181 public void setFundAssetPurchaseOffsetTranCode(String fundAssetPurchaseOffsetTranCode) { 182 this.fundAssetPurchaseOffsetTranCode = fundAssetPurchaseOffsetTranCode; 183 } 184 185 /** 186 * Gets the fundAssetSaleOffsetTranCode 187 * 188 * @return fundAssetSaleOffsetTranCode 189 */ 190 public String getFundAssetSaleOffsetTranCode() { 191 return fundAssetSaleOffsetTranCode; 192 } 193 194 /** 195 * Set the fundAssetSaleOffsetTranCode 196 * 197 * @param fundAssetSaleOffsetTranCode 198 */ 199 public void setFundAssetSaleOffsetTranCode(String fundAssetSaleOffsetTranCode) { 200 this.fundAssetSaleOffsetTranCode = fundAssetSaleOffsetTranCode; 201 } 202 203 /** 204 * Gets the fundSaleGainLossOffsetTranCode 205 * 206 * @return fundSaleGainLossOffsetTranCode 207 */ 208 public String getFundSaleGainLossOffsetTranCode() { 209 return fundSaleGainLossOffsetTranCode; 210 } 211 212 /** 213 * Set the fundSaleGainLossOffsetTranCode 214 * 215 * @param fundSaleGainLossOffsetTranCode 216 */ 217 public void setFundSaleGainLossOffsetTranCode(String fundSaleGainLossOffsetTranCode) { 218 this.fundSaleGainLossOffsetTranCode = fundSaleGainLossOffsetTranCode; 219 } 220 221 /** 222 * Gets the fundCashDepositOffsetTranCode 223 * 224 * @return fundCashDepositOffsetTranCode 225 */ 226 public String getFundCashDepositOffsetTranCode() { 227 return fundCashDepositOffsetTranCode; 228 } 229 230 /** 231 * Set the fundCashDepositOffsetTranCode 232 * 233 * @param fundCashDepositOffsetTranCode 234 */ 235 public void setFundCashDepositOffsetTranCode(String fundCashDepositOffsetTranCode) { 236 this.fundCashDepositOffsetTranCode = fundCashDepositOffsetTranCode; 237 } 238 239 /** 240 * Gets the distributeGainsAndLossesIndicator. 241 * 242 * @return distributeGainsAndLossesIndicator 243 */ 244 public boolean isDistributeGainsAndLossesIndicator() { 245 return distributeGainsAndLossesIndicator; 246 } 247 248 /** 249 * Sets the distributeGainsAndLossesIndicator. 250 * 251 * @param distributeGainsAndLossesIndicator 252 */ 253 public void setDistributeGainsAndLossesIndicator(boolean distributeGainsAndLossesIndicator) { 254 this.distributeGainsAndLossesIndicator = distributeGainsAndLossesIndicator; 255 } 256 257 /** 258 * Gets the security object 259 * 260 * @return security 261 */ 262 public Security getSecurity() { 263 return security; 264 } 265 266 /** 267 * Sets the security object 268 * 269 * @param security 270 */ 271 public void setSecurity(Security security) { 272 this.security = security; 273 } 274 275 /** 276 * Gets the registrationCodeObj 277 * 278 * @return registrationCodeObj 279 */ 280 public RegistrationCode getRegistrationCodeObj() { 281 return registrationCodeObj; 282 } 283 284 /** 285 * Sets the registrationCodeObj 286 * 287 * @param registrationCodeObj 288 */ 289 public void setRegistrationCodeObj(RegistrationCode registrationCodeObj) { 290 this.registrationCodeObj = registrationCodeObj; 291 } 292 /** 293 * Gets the kemid object 294 * 295 * @return kemid 296 */ 297 public KEMID getKemid() { 298 return kemid; 299 } 300 301 /** 302 * Sets the kemid object 303 * 304 * @param kemid 305 */ 306 public void setKemid(KEMID kemid) { 307 this.kemid = kemid; 308 } 309 310 /** 311 * Gets the assetPurchaseOffsetTranCode 312 * 313 * @return assetPurchaseOffsetTranCode 314 */ 315 public EndowmentTransactionCode getAssetPurchaseOffsetTranCode() { 316 return assetPurchaseOffsetTranCode; 317 } 318 319 /** 320 * Sets the assetPurchaseOffsetTranCode. 321 * 322 * @param assetPurchaseOffsetTranCode 323 */ 324 public void setAssetPurchaseOffsetTranCode(EndowmentTransactionCode assetPurchaseOffsetTranCode) { 325 this.assetPurchaseOffsetTranCode = assetPurchaseOffsetTranCode; 326 } 327 328 /** 329 * Gets the assetSaleOffsetTranCode 330 * 331 * @return assetSaleOffsetTranCode 332 */ 333 public EndowmentTransactionCode getAssetSaleOffsetTranCode() { 334 return assetSaleOffsetTranCode; 335 } 336 337 /** 338 * Sets the assetSaleOffsetTranCode. 339 * 340 * @param assetSaleOffsetTranCode 341 */ 342 public void setAssetSaleOffsetTranCode(EndowmentTransactionCode assetSaleOffsetTranCode) { 343 this.assetSaleOffsetTranCode = assetSaleOffsetTranCode; 344 } 345 346 /** 347 * Gets the saleGainLossOffsetTranCode 348 * 349 * @return saleGainLossOffsetTranCode 350 */ 351 public EndowmentTransactionCode getSaleGainLossOffsetTranCode() { 352 return saleGainLossOffsetTranCode; 353 } 354 355 /** 356 * Sets the saleGainLossOffsetTranCode. 357 * 358 * @param saleGainLossOffsetTranCode 359 */ 360 public void setSaleGainLossOffsetTranCode(EndowmentTransactionCode saleGainLossOffsetTranCode) { 361 this.saleGainLossOffsetTranCode = saleGainLossOffsetTranCode; 362 } 363 364 /** 365 * Gets the cashDepositOffsetTranCode 366 * 367 * @return cashDepositOffsetTranCode 368 */ 369 public EndowmentTransactionCode getCashDepositOffsetTranCode() { 370 return cashDepositOffsetTranCode; 371 } 372 373 /** 374 * Sets the cashDepositOffsetTranCode. 375 * 376 * @param cashDepositOffsetTranCode 377 */ 378 public void setCashDepositOffsetTranCode(EndowmentTransactionCode cashDepositOffsetTranCode) { 379 this.cashDepositOffsetTranCode = cashDepositOffsetTranCode; 380 } 381 382 /** 383 * Gets pooledSecurityID and pooledFundDescription. 384 * 385 * @return 386 */ 387 public String getPooledSecurityIDAndDescription() { 388 if (StringUtils.isEmpty(pooledSecurityID)) { 389 return KFSConstants.EMPTY_STRING; 390 } 391 else 392 return getPooledSecurityID() + " - " + getPooledFundDescription(); 393 } 394 395 /** 396 * Sets pooledSecurityID and pooledFundDescription. 397 * 398 * @param pooledSecurityIDAndDescription 399 */ 400 public void setPooledSecurityIDAndDescription(String pooledSecurityIDAndDescription) { 401 402 } 403 404 /** 405 * Gets the allowFractionalShares. 406 * 407 * @return allowFractionalShares 408 */ 409 public boolean isAllowFractionalShares() { 410 return allowFractionalShares; 411 } 412 413 /** 414 * Sets the allowFractionalShares. 415 * 416 * @param allowFractionalShares 417 */ 418 public void setAllowFractionalShares(boolean allowFractionalShares) { 419 this.allowFractionalShares = allowFractionalShares; 420 } 421 422 }