KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: CriteriaQuery.java,v 1.10 2005/05/31 20:24:39 oneovthafew Exp $
2
package org.hibernate.criterion;
3
4 import org.hibernate.Criteria;
5 import org.hibernate.HibernateException;
6 import org.hibernate.engine.SessionFactoryImplementor;
7 import org.hibernate.engine.TypedValue;
8 import org.hibernate.type.Type;
9
10 /**
11  * An instance of <tt>CriteriaQuery</tt> is passed to criterion,
12  * order and projection instances when actually compiling and
13  * executing the query. This interface is not used by application
14  * code.
15  *
16  * @author Gavin King
17  */

18 public interface CriteriaQuery {
19     public SessionFactoryImplementor getFactory();
20     
21     /**
22      * Get the names of the columns mapped by a property path,
23      * ignoring projection aliases
24      */

25     public String JavaDoc getColumn(Criteria criteria, String JavaDoc propertyPath)
26     throws HibernateException;
27     
28     /**
29      * Get the type of a property path, ignoring projection aliases
30      */

31     public Type getType(Criteria criteria, String JavaDoc propertyPath)
32     throws HibernateException;
33
34     /**
35      * Get the names of the columns mapped by a property path
36      */

37     public String JavaDoc[] getColumnsUsingProjection(Criteria criteria, String JavaDoc propertyPath)
38     throws HibernateException;
39     
40     /**
41      * Get the type of a property path
42      */

43     public Type getTypeUsingProjection(Criteria criteria, String JavaDoc propertyPath)
44     throws HibernateException;
45
46     /**
47      * Get the a typed value for the given property value.
48      */

49     public TypedValue getTypedValue(Criteria criteria, String JavaDoc propertyPath, Object JavaDoc value)
50     throws HibernateException;
51     
52     /**
53      * Get the entity name of an entity
54      */

55     public String JavaDoc getEntityName(Criteria criteria);
56     
57     /**
58      * Get the entity name of an entity, taking into account
59      * the qualifier of the property path
60      */

61     public String JavaDoc getEntityName(Criteria criteria, String JavaDoc propertyPath);
62
63     /**
64      * Get the root table alias of an entity
65      */

66     public String JavaDoc getSQLAlias(Criteria subcriteria);
67
68     /**
69      * Get the root table alias of an entity, taking into account
70      * the qualifier of the property path
71      */

72     public String JavaDoc getSQLAlias(Criteria criteria, String JavaDoc propertyPath);
73     
74     /**
75      * Get the property name, given a possibly qualified property name
76      */

77     public String JavaDoc getPropertyName(String JavaDoc propertyName);
78     
79     /**
80      * Get the identifier column names of this entity
81      */

82     public String JavaDoc[] getIdentifierColumns(Criteria subcriteria);
83     
84     /**
85      * Get the identifier type of this entity
86      */

87     public Type getIdentifierType(Criteria subcriteria);
88     
89     public TypedValue getTypedIdentifierValue(Criteria subcriteria, Object JavaDoc value);
90     
91     public String JavaDoc generateSQLAlias();
92 }
Popular Tags