|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.hibernate.hql.ast.QueryTranslatorImpl
A QueryTranslator that uses an AST based parser.
User: josh
Date: Dec 31, 2003
Time: 7:50:35 AM
| Field Summary |
| Fields inherited from interface org.hibernate.hql.QueryTranslator |
ERROR_CANNOT_DETERMINE_TYPE, ERROR_CANNOT_FETCH_WITH_ITERATE, ERROR_CANNOT_FORMAT_LITERAL, ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR |
| Constructor Summary | |
QueryTranslatorImpl(String query,
Map enabledFilters,
SessionFactoryImplementor factory)
Creates a new AST-based query translator. |
|
| Method Summary | |
void |
compile(Map replacements,
boolean shallow)
Compile a "normal" query. |
void |
compile(String collectionRole,
Map replacements,
boolean shallow)
Compile a filter. |
int |
executeUpdate(QueryParameters queryParameters,
SessionImplementor session)
Perform a bulk update/delete operation given the underlying query defintion. |
String[][] |
getColumnNames()
Returns the column names in the generated SQL. |
Map |
getEnabledFilters()
Returns the filters enabled for this query translator. |
int[] |
getNamedParameterLocs(String name)
Returns the locations of the specified named parameter in the SQL. |
Set |
getQuerySpaces()
Returns the set of query spaces (table names) that the query referrs to. |
String |
getQueryString()
Returns the HQL string processed by the translator. |
String[] |
getReturnAliases()
Returns an array of HQL aliases |
Type[] |
getReturnTypes()
Types of the return values of an iterate() style query. |
String |
getSQLString()
The SQL query string to be called; implemented by all subclasses |
Iterator |
iterate(QueryParameters queryParameters,
SessionImplementor session)
Return the query results as an iterator |
List |
list(SessionImplementor session,
QueryParameters queryParameters)
Perform a list operation given the underlying query definition. |
ScrollableResults |
scroll(QueryParameters queryParameters,
SessionImplementor session)
Return the query results, as an instance of ScrollableResults |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public QueryTranslatorImpl(String query,
Map enabledFilters,
SessionFactoryImplementor factory)
query - The HQL query string.enabledFilters - Any filters currently enabled for the session.factory - The session factory constructing this translator instance.| Method Detail |
public void compile(Map replacements,
boolean shallow)
throws QueryException,
MappingException
compile in interface QueryTranslatorreplacements - Defined query substitutions.shallow - Does this represent a shallow (scalar or entity-id) select?
QueryException - There was a problem parsing the query string.
MappingException - There was a problem querying defined mappings.
public void compile(String collectionRole,
Map replacements,
boolean shallow)
throws QueryException,
MappingException
compile in interface FilterTranslatorcollectionRole - the role name of the collection used as the basis for the filter.replacements - Defined query substitutions.shallow - Does this represent a shallow (scalar or entity-id) select?
QueryException - There was a problem parsing the query string.
MappingException - There was a problem querying defined mappings.public Type[] getReturnTypes()
getReturnTypes in interface QueryTranslatorpublic String[] getReturnAliases()
QueryTranslator
getReturnAliases in interface QueryTranslatorpublic String[][] getColumnNames()
QueryTranslator
getColumnNames in interface QueryTranslatorpublic Set getQuerySpaces()
QueryTranslator
getQuerySpaces in interface QueryTranslator
public List list(SessionImplementor session,
QueryParameters queryParameters)
throws HibernateException
QueryTranslator
list in interface QueryTranslatorsession - The session owning this query.queryParameters - The query bind parameters.
HibernateException
public Iterator iterate(QueryParameters queryParameters,
SessionImplementor session)
throws HibernateException
iterate in interface QueryTranslatorqueryParameters - The query bind parameters.session - The session owning this query.
HibernateException
public ScrollableResults scroll(QueryParameters queryParameters,
SessionImplementor session)
throws HibernateException
scroll in interface QueryTranslatorqueryParameters - The query bind parameters.session - The session owning this query.
HibernateException
public int executeUpdate(QueryParameters queryParameters,
SessionImplementor session)
throws HibernateException
QueryTranslator
executeUpdate in interface QueryTranslatorqueryParameters - The query bind parameters.session - The session owning this query.
HibernateExceptionpublic String getSQLString()
getSQLString in interface QueryTranslatorpublic String getQueryString()
QueryTranslator
getQueryString in interface QueryTranslatorpublic Map getEnabledFilters()
QueryTranslator
getEnabledFilters in interface QueryTranslatorpublic int[] getNamedParameterLocs(String name)
QueryTranslator
getNamedParameterLocs in interface QueryTranslatorname - The name of the named parameter.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||