Coverage Report - org.kuali.rice.kns.service.InactivateableFromToService
 
Classes in this File Line Coverage Branch Coverage Complexity
InactivateableFromToService
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2010 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kns.service;
 17  
 
 18  
 import java.util.Date;
 19  
 import java.util.List;
 20  
 import java.util.Map;
 21  
 
 22  
 import org.kuali.rice.kns.bo.InactivateableFromTo;
 23  
 
 24  
 /**
 25  
  * Provides methods for retrieval of business objects implementing InactivateableFromTo and needing effective dating logic
 26  
  * 
 27  
  * @see org.kuali.rice.kns.bo.InactivateableFromTo
 28  
  */
 29  
 public interface InactivateableFromToService {
 30  
 
 31  
         /**
 32  
          * Performs search on given class and criteria and returns only results that active based on the active to/from dates and the current
 33  
          * date
 34  
          * 
 35  
          * @param clazz
 36  
          *            - InactivateableFromTo class to search
 37  
          * @param fieldValues
 38  
          *            - Search key values
 39  
          * @return List of InactivateableFromTo instances that match search criteria and are active
 40  
          */
 41  
         public List<InactivateableFromTo> findMatchingActive(Class<? extends InactivateableFromTo> clazz, Map fieldValues);
 42  
 
 43  
         /**
 44  
          * Performs search on given class and criteria and returns only results that active based on the active to/from dates and the given
 45  
          * active as of date
 46  
          * 
 47  
          * @param clazz
 48  
          *            - InactivateableFromTo class to search
 49  
          * @param fieldValues
 50  
          *            - Search key values
 51  
          * @param activeAsOfDate
 52  
          *            - Date to compare to for determining active status
 53  
          * @return List of InactivateableFromTo instances that match search criteria and are active as of the given date
 54  
          */
 55  
         public List<InactivateableFromTo> findMatchingActiveAsOfDate(Class<? extends InactivateableFromTo> clazz,
 56  
                         Map fieldValues, Date activeAsOfDate);
 57  
 
 58  
         /**
 59  
          * Removes instances from the given list that are inactive based on the current date
 60  
          * 
 61  
          * @param filterList
 62  
          *            - List of InactivateableFromTo instances to filter
 63  
          * @return List of InactivateableFromTo instances from the given list that are active as of the current date
 64  
          */
 65  
         public List<InactivateableFromTo> filterOutNonActive(List<InactivateableFromTo> filterList);
 66  
 
 67  
         /**
 68  
          * Removes instances from the given list that are inactive based on the given date
 69  
          * 
 70  
          * @param filterList
 71  
          *            - List of InactivateableFromTo instances to filter
 72  
          * @param activeAsOfDate
 73  
          *            - Date to compare to for determining active status
 74  
          * @return List of InactivateableFromTo instances from the given list that are active as of the given date
 75  
          */
 76  
         public List<InactivateableFromTo> filterOutNonActive(List<InactivateableFromTo> filterList, Date activeAsOfDate);
 77  
 
 78  
         /**
 79  
          * Performs search on given class and criteria and returns that are active and most current. That is if two records are active the more
 80  
          * current one will be the one with a later active begin date
 81  
          * 
 82  
          * @param clazz
 83  
          *            - InactivateableFromTo class to search
 84  
          * @param fieldValues
 85  
          *            - Search key values
 86  
          * @return List of InactivateableFromTo instances that match search criteria and are current
 87  
          */
 88  
         public List<InactivateableFromTo> findMatchingCurrent(Class<? extends InactivateableFromTo> clazz,
 89  
                         Map fieldValues);
 90  
 
 91  
         /**
 92  
          * Performs search on given class and criteria and returns that are active and most current based on the given date. That is if two
 93  
          * records are active the more current one will be the one with a later active begin date
 94  
          * 
 95  
          * @param clazz
 96  
          *            - InactivateableFromTo class to search
 97  
          * @param fieldValues
 98  
          *            - Search key values
 99  
          * @param currentAsOfDate
 100  
          *            - Date to compare to for determining active and current status
 101  
          * @return List of InactivateableFromTo instances that match search criteria and are current
 102  
          */
 103  
         public List<InactivateableFromTo> findMatchingCurrent(Class<? extends InactivateableFromTo> clazz,
 104  
                         Map fieldValues, Date currentAsOfDate);
 105  
 
 106  
         /**
 107  
          * Removes instances from the given list that are not current based on the current date
 108  
          * 
 109  
          * @param filterList
 110  
          *            - List of InactivateableFromTo instances to filter
 111  
          * @return List of InactivateableFromTo instances from the given list that are current as of the current date
 112  
          */
 113  
         public List<InactivateableFromTo> filterOutNonCurrent(List<InactivateableFromTo> filterList);
 114  
 
 115  
         /**
 116  
          * Removes instances from the given list that are not current based on the given date
 117  
          * 
 118  
          * @param filterList
 119  
          *            - List of InactivateableFromTo instances to filter
 120  
          * @param currentAsOfDate
 121  
          *            - Date to compare to for determining active and current status
 122  
          * @return List of InactivateableFromTo instances from the given list that are current as of the given date
 123  
          */
 124  
         public List<InactivateableFromTo> filterOutNonCurrent(List<InactivateableFromTo> filterList, Date currentAsOfDate);
 125  
 
 126  
 }