KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > criterion > Criterion


1 //$Id: Criterion.java,v 1.9 2005/02/12 07:19:13 steveebersole Exp $
2
package org.hibernate.criterion;
3
4
5 import java.io.Serializable JavaDoc;
6
7 import org.hibernate.Criteria;
8 import org.hibernate.HibernateException;
9 import org.hibernate.engine.TypedValue;
10
11 /**
12  * An object-oriented representation of a query criterion that may be used
13  * as a restriction in a <tt>Criteria</tt> query.
14  * Built-in criterion types are provided by the <tt>Restrictions</tt> factory
15  * class. This interface might be implemented by application classes that
16  * define custom restriction criteria.
17  *
18  * @see Restrictions
19  * @see org.hibernate.Criteria
20  * @author Gavin King
21  */

22 public interface Criterion extends Serializable JavaDoc {
23
24     /**
25      * Render the SQL fragment
26      * @param criteriaQuery
27      * @param alias
28      * @return String
29      * @throws HibernateException
30      */

31     public String JavaDoc toSqlString(Criteria criteria, CriteriaQuery criteriaQuery)
32     throws HibernateException;
33     
34     /**
35      * Return typed values for all parameters in the rendered SQL fragment
36      * @param criteria TODO
37      * @param criteriaQuery
38      * @return TypedValue[]
39      * @throws HibernateException
40      */

41     public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)
42     throws HibernateException;
43
44 }
45
Popular Tags