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.dataaccess;
017
018 import java.math.BigDecimal;
019 import java.util.List;
020
021 import org.kuali.kfs.module.endow.businessobject.FeeMethod;
022 import org.kuali.kfs.module.endow.businessobject.HoldingHistory;
023 import org.kuali.rice.kns.util.KualiInteger;
024
025 public interface HoldingHistoryDao {
026
027 /**
028 * Calculates the total Holding Units based on FEE_BAL_TYP_CD = AU OR MU
029 * @param feeMethod feeMethod object
030 * @return totalHoldingUnits
031 */
032 public BigDecimal getHoldingHistoryTotalHoldingUnits(FeeMethod feeMethod);
033
034 /**
035 * Calculates the total Holding market value based on FEE_BAL_TYP_CD = AMV OR MMV
036 * @param feeMethod feeMethod object
037 * @return totalHoldingMarketValue
038 */
039 public BigDecimal getHoldingHistoryTotalHoldingMarketValue(FeeMethod feeMethod);
040
041 /**
042 * Gets HoldingHistory
043 *
044 * @param kemid
045 * @param medId
046 * @return
047 */
048 public List<HoldingHistory> getHoldingHistory(String kemid, KualiInteger medId);
049
050 /**
051 * Gets HoldingHistory records
052 *
053 * @param kemid
054 * @return List<HoldingHistory>
055 */
056 public List<HoldingHistory> getHoldingHistoryByKemid(String kemid);
057
058 /**
059 * Gets the sum of the given attribute
060 *
061 * @param kemid
062 * @param medId
063 * @param securityId
064 * @param ipInd
065 * @param attributeName
066 * @return
067 */
068 public BigDecimal getSumOfHoldginHistoryAttribute(String attributeName, String kemid, KualiInteger medId, String securityId, String ipInd);
069
070 /**
071 * Gets a list of HoldingHistory by kemid, medId, ipInd and with units > 0
072 *
073 * @param kemid
074 * @param monthEndId
075 * @param ipInd
076 * @return
077 */
078 public List<HoldingHistory> getHoldingHistoryByKemidIdAndMonthEndIdAndIpInd(String kemid, KualiInteger monthEndId, String ipInd);
079 }