01: /*
02: * Copyright 2005-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.core.dao;
17:
18: import java.util.Collection;
19: import java.util.Map;
20:
21: import org.apache.ojb.broker.query.Criteria;
22:
23: /**
24: * This interface defines basic methods that Lookup Dao's must provide
25: *
26: *
27: */
28: public interface LookupDao {
29: public Collection findCollectionBySearchHelper(Class example,
30: Map formProps, boolean unbounded,
31: boolean usePrimaryKeyValuesOnly);
32:
33: public Collection findCollectionBySearchHelper(Class example,
34: Map formProps, boolean unbounded,
35: boolean usePrimaryKeyValuesOnly, Object additionalCriteria);
36:
37: public Collection findCollectionBySearchHelperWithUniversalUserJoin(
38: Class example, Map nonUniversalUserSearchCriteria,
39: Map universalUserSearchCriteria, boolean unbounded,
40: boolean usePrimaryKeyValuesOnly);
41:
42: /**
43: * Retrieves a Object based on the search criteria, which should uniquely identify a record.
44: *
45: * @return Object returned from the search
46: */
47: public Object findObjectByMap(Object example, Map formProps);
48:
49: /**
50: * Returns a count of objects based on the given search parameters.
51: *
52: * @return Long returned from the search
53: */
54: public Long findCountByMap(Object example, Map formProps);
55:
56: /**
57: * Create OJB criteria based on business object, search field and value
58: *
59: * @return true if the criteria is created successfully; otherwise, return false
60: */
61: public boolean createCriteria(Object example, String searchValue,
62: String propertyName, Criteria criteria);
63:
64: /**
65: * Create OJB criteria based on business object, search field and value
66: *
67: * @return true if the criteria is created successfully; otherwise, return false
68: */
69: public boolean createCriteria(Object example, String searchValue,
70: String propertyName, boolean caseInsensitive,
71: Criteria criteria);
72: }
|