01: /*
02: * Copyright 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.kfs.dao;
17:
18: import java.util.Collection;
19:
20: import org.kuali.core.bo.KualiCode;
21: import org.springframework.dao.DataAccessException;
22:
23: /**
24: * This interface defines the Accounting Code DAO...
25: */
26:
27: public interface KualiCodeDao {
28:
29: /**
30: * @param className - the name of the object being used, either KualiCodeBase or a subclass
31: * @param code - the short/abbreviated code of the code/name pair to search on
32: * @return KualiCodeBase - the populated KualiCodeBase object
33: */
34: public KualiCode getByCode(Class queryClass, String code);
35:
36: public KualiCode getSystemCode(Class clazz, String code);
37:
38: /**
39: * @param className - the name of the object being used, either KualiCodeBase or a subclass
40: * @param name - the long name code of the code/name pair to search on
41: * @return KualiCodeBase - the populated KualiCodeBase object
42: */
43: public KualiCode getByName(Class queryClass, String name);
44:
45: /**
46: * @param kualiCode - a populated KualiCodeBase object to be saved
47: */
48: public void save(KualiCode kualiCode) throws DataAccessException;
49:
50: /**
51: * Deletes the object-record passed in.
52: *
53: * @param kualiCode
54: */
55: public void delete(KualiCode kualiCode);
56:
57: /**
58: * This method retrieves all active objects that extend KualiCode, by class name.
59: *
60: * @param className The class name of the object type to retrieve.
61: * @return
62: */
63: public Collection getAllActive(Class queryClass);
64:
65: /**
66: * This method retrieves all objects that extend KualiCode, by class name.
67: *
68: * @param className The class name of the object type to retrieve.
69: * @return
70: */
71: public Collection getAll(Class queryClass);
72:
73: }
|