001/** 002 * Copyright 2005-2018 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 */ 016package org.kuali.rice.krad.service; 017 018import java.util.Collection; 019import java.util.Map; 020 021 022/** 023 * This class provides collection retrievals to populate key value pairs of business objects. 024 * 025 * 026 */ 027@Deprecated 028public interface KeyValuesService { 029 030 /** 031 * Retrieves a collection of business objects populated with data, such that each record in the database populates a new object 032 * instance. This will only retrieve business objects by class type. 033 * 034 * @param clazz 035 * @return 036 */ 037 public <T> Collection<T> findAll(Class<T> clazz); 038 039 /** 040 * Retrieves a collection of business objects populated with data, such that each record in the database populates a new object 041 * instance. This will only retrieve business objects by class type. Performs a sort on the result collection on the given sort 042 * field. 043 * 044 * @param clazz 045 * @param sortField - name of the field in the class to sort results by 046 * @param sortAscending - boolean indicating whether to sort ascending or descending 047 * @return 048 */ 049 public <T> Collection<T> findAllOrderBy(Class<T> clazz, String sortField, boolean sortAscending); 050 051 /** 052 * This method retrieves a collection of business objects populated with data, such that each record in the database populates a 053 * new object instance. This will retrieve business objects by class type and also by criteria passed in as key-value pairs, 054 * specifically attribute name and its expected value. 055 * 056 * @param clazz 057 * @param fieldValues 058 * @return 059 */ 060 public <T> Collection<T> findMatching(Class<T> clazz, Map<String, Object> fieldValues); 061 062 /** 063 * Retrieves a collection of business objects populated with data, such that each record in the database populates a new object 064 * instance. This will only retrieve business objects by class type. 065 * 066 * @param clazz 067 * @return 068 */ 069 public <T> Collection<T> findAllInactive(Class<T> clazz); 070 071}