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.service;
017    
018    import java.util.Collection;
019    
020    import org.kuali.kfs.module.endow.businessobject.AutomatedCashInvestmentModel;
021    import org.kuali.kfs.module.endow.businessobject.KEMID;
022    
023    public interface KEMIDService {
024    
025        /**
026         * Gets a KEMID by primary key.
027         * @param kemid
028         * @return a KEMID
029         */
030        public KEMID getByPrimaryKey(String kemid);
031        
032        /**
033         * Validate if a KEMID is a true endowment (or permanently restricted endowment).
034         * If the Type Code for a KEMID has a Principal Restriction Code (END_TYP_T: TYP_PRIN_RESTR_CD) where the Permanent Indicator for the Restriction code (END_TYP_RESTR_CD_T:PERM) is Yes, then the KEMID is a true or permanently restricted endowment.  
035         * A true endowment or Permanently restricted endowment is one in which the principal funds cannot be expended.   
036         * @param kemid
037         * @return true or false
038         */
039        public boolean isTrueEndowment(String kemid);
040        
041        /**
042         * Gets all the KEMIDs matching the specified cash sweep id.
043         * 
044         * @param cashSweepId
045         * @return Collection of KEMID
046         */
047        public Collection<KEMID> getByCashSweepId(Integer cashSweepId);
048        
049        /**
050         * Gets all the KEMIDs matching the specified ACI principle id. 
051         *
052         * @param aciPrincipleId
053         * @return Collection of KEMID
054         */
055        public Collection<KEMID> getByPrincipleAciId(Integer aciPrincipleId);
056        
057        /**
058         * Gets all the KEMIDs matching the specified ACI income id.
059         * 
060         * @param aciIncomeId
061         * @return Collection of KEMID
062         */
063        public Collection<KEMID> getByIncomeAciId(Integer aciIncomeId);
064        
065        /**
066         * Retrieves all kemId records where closed indicator = 'N'
067         */
068        public abstract Collection<KEMID> getAllKemIdWithClosedIndicatorNo();
069    }