KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > Filter


1 // $Id: Filter.java,v 1.3 2005/01/04 23:13:49 steveebersole Exp $
2
package org.hibernate;
3
4 import java.util.Collection JavaDoc;
5
6 /**
7  * Type definition of Filter. Filter defines the user's view into enabled dynamic filters,
8  * allowing them to set filter parameter values.
9  *
10  * @author Steve Ebersole
11  */

12 public interface Filter {
13
14     /**
15      * Set the named parameter's value for this filter.
16      *
17      * @param name The parameter's name.
18      * @param value The value to be applied.
19      * @return This FilterImpl instance (for method chaining).
20      */

21     public Filter setParameter(String JavaDoc name, Object JavaDoc value);
22
23     /**
24      * Set the named parameter's value list for this filter. Used
25      * in conjunction with IN-style filter criteria.
26      *
27      * @param name The parameter's name.
28      * @param values The values to be expanded into an SQL IN list.
29      * @return This FilterImpl instance (for method chaining).
30      */

31     public Filter setParameterList(String JavaDoc name, Collection JavaDoc values);
32
33     /**
34      * Set the named parameter's value list for this filter. Used
35      * in conjunction with IN-style filter criteria.
36      *
37      * @param name The parameter's name.
38      * @param values The values to be expanded into an SQL IN list.
39      * @return This FilterImpl instance (for method chaining).
40      */

41     public Filter setParameterList(String JavaDoc name, Object JavaDoc[] values);
42
43     /**
44      * Get the name of this filter.
45      *
46      * @return This filter's name.
47      */

48     public String JavaDoc getName();
49
50     /**
51      * Perform validation of the filter state. This is used to verify the
52      * state of the filter after its enablement and before its use.
53      *
54      * @throws HibernateException If the state is not currently valid.
55      */

56     public void validate() throws HibernateException;
57 }
58
Popular Tags