01: //$Id: CriteriaQuery.java 6970 2005-05-31 20:24:41Z oneovthafew $
02: package org.hibernate.criterion;
03:
04: import org.hibernate.Criteria;
05: import org.hibernate.HibernateException;
06: import org.hibernate.engine.SessionFactoryImplementor;
07: import org.hibernate.engine.TypedValue;
08: import org.hibernate.type.Type;
09:
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 getColumn(Criteria criteria, String 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 propertyPath)
32: throws HibernateException;
33:
34: /**
35: * Get the names of the columns mapped by a property path
36: */
37: public String[] getColumnsUsingProjection(Criteria criteria,
38: String propertyPath) throws HibernateException;
39:
40: /**
41: * Get the type of a property path
42: */
43: public Type getTypeUsingProjection(Criteria criteria,
44: String propertyPath) throws HibernateException;
45:
46: /**
47: * Get the a typed value for the given property value.
48: */
49: public TypedValue getTypedValue(Criteria criteria,
50: String propertyPath, Object value)
51: throws HibernateException;
52:
53: /**
54: * Get the entity name of an entity
55: */
56: public String getEntityName(Criteria criteria);
57:
58: /**
59: * Get the entity name of an entity, taking into account
60: * the qualifier of the property path
61: */
62: public String getEntityName(Criteria criteria, String propertyPath);
63:
64: /**
65: * Get the root table alias of an entity
66: */
67: public String getSQLAlias(Criteria subcriteria);
68:
69: /**
70: * Get the root table alias of an entity, taking into account
71: * the qualifier of the property path
72: */
73: public String getSQLAlias(Criteria criteria, String propertyPath);
74:
75: /**
76: * Get the property name, given a possibly qualified property name
77: */
78: public String getPropertyName(String propertyName);
79:
80: /**
81: * Get the identifier column names of this entity
82: */
83: public String[] getIdentifierColumns(Criteria subcriteria);
84:
85: /**
86: * Get the identifier type of this entity
87: */
88: public Type getIdentifierType(Criteria subcriteria);
89:
90: public TypedValue getTypedIdentifierValue(Criteria subcriteria,
91: Object value);
92:
93: public String generateSQLAlias();
94: }
|