001/**
002 * Copyright 2005-2016 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 * Defines business logic methods that support the Lookup framework
023 * 
024 * @author Kuali Rice Team (rice.collab@kuali.org)
025 */
026public interface LookupService {
027
028    /**
029     * Returns a collection of objects based on the given search parameters.
030     * Will not limit results, so the returned Collection could be huge.
031     *                                                         o
032     * @param example
033     * @param formProps
034     * @return
035     */
036    public <T extends Object> Collection<T> findCollectionBySearchUnbounded(Class<T> example,
037            Map<String, String> formProps);
038
039    /**
040     * Returns a collection of objects based on the given search parameters.
041     * 
042     * @return Collection returned from the search
043     */
044    public <T extends Object> Collection<T> findCollectionBySearch(Class<T> example, Map<String, String> formProps);
045
046    public <T extends Object> Collection<T> findCollectionBySearchHelper(Class<T> example,
047            Map<String, String> formProperties, boolean unbounded);
048
049    /**
050     * Retrieves a Object based on the search criteria, which should uniquely
051     * identify a record.
052     * 
053     * @return Object returned from the search
054     */
055    public <T extends Object> T findObjectBySearch(Class<T> example, Map<String, String> formProps);
056
057    public boolean allPrimaryKeyValuesPresentAndNotWildcard(Class<?> boClass, Map<String, String> formProps);
058}