1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.oness.common.model.dao;
17
18 import java.util.Collection;
19 import java.util.List;
20
21 import net.sf.oness.common.model.bo.AuditableBusinessObject;
22 import net.sf.oness.common.model.util.PaginatedList;
23
24 /***
25 * Interface to be implemented by Data Access Objects with finder operations
26 *
27 * @author Carlos Sanchez
28 * @version $Revision: 1.9 $
29 */
30 public interface FinderDao {
31
32 /***
33 * Find a List of objects by their identifiers. This should return only the
34 * specified entity, not the associated ones.
35 *
36 * @param ids
37 * collection of identifiers
38 * @return the values with that ids
39 */
40 public List findById(Collection ids);
41
42 /***
43 * Find objects with properties matching those of value. This should not
44 * return the associated entities. Properties whose value is null and
45 * Collections are ignored.
46 *
47 * @param value
48 * parameters to filter on
49 * @param firstElement
50 * the first result, numbered from 0
51 * @param maxElements
52 * the maximum number of results
53 * @return
54 */
55 public PaginatedList find(AuditableBusinessObject value, int firstElement,
56 int maxElements);
57
58 /***
59 * Return all persistent instances
60 *
61 * @return List of objects
62 */
63 public List findAll();
64
65 }