FileDocCategorySizeDatePackage
QueryTranslator.javaAPI DocHibernate 3.2.54926Fri Jan 27 16:40:32 GMT 2006org.hibernate.hql

QueryTranslator

public interface QueryTranslator
Defines the constract of an HQL->SQL translator.
author
josh

Fields Summary
public static final String
ERROR_CANNOT_FETCH_WITH_ITERATE
public static final String
ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR
public static final String
ERROR_CANNOT_DETERMINE_TYPE
public static final String
ERROR_CANNOT_FORMAT_LITERAL
Constructors Summary
Methods Summary
public java.util.ListcollectSqlStrings()

public voidcompile(java.util.Map replacements, boolean shallow)
Compile a "normal" query. This method may be called multiple times. Subsequent invocations are no-ops.

param
replacements Defined query substitutions.
param
shallow Does this represent a shallow (scalar or entity-id) select?
throws
QueryException There was a problem parsing the query string.
throws
MappingException There was a problem querying defined mappings.

public booleancontainsCollectionFetches()
Does the translated query contain collection fetches?

return
tru if the query does contain collection fetched; false otherwise.

public intexecuteUpdate(org.hibernate.engine.QueryParameters queryParameters, org.hibernate.engine.SessionImplementor session)
Perform a bulk update/delete operation given the underlying query defintion.

param
queryParameters The query bind parameters.
param
session The session owning this query.
return
The number of entities updated or deleted.
throws
HibernateException

public java.lang.String[][]getColumnNames()
Returns the column names in the generated SQL.

return
the column names in the generated SQL.

public java.util.MapgetEnabledFilters()
Returns the filters enabled for this query translator.

return
Filters enabled for this query execution.

public ParameterTranslationsgetParameterTranslations()
Return information about any parameters encountered during translation.

return
The parameter information.

public java.lang.StringgetQueryIdentifier()
Retrieve the query identifier for this translator. The query identifier is used in stats collection.

return
the identifier

public java.util.SetgetQuerySpaces()
Returns the set of query spaces (table names) that the query referrs to.

return
A set of query spaces (table names).

public java.lang.StringgetQueryString()
Returns the HQL string processed by the translator.

return
the HQL string processed by the translator.

public java.lang.String[]getReturnAliases()
Returns an array of HQL aliases

public org.hibernate.type.Type[]getReturnTypes()
Returns an array of Types represented in the query result.

return
Query return types.

public java.lang.StringgetSQLString()
Returns the SQL string generated by the translator.

return
the SQL string generated by the translator.

public booleanisManipulationStatement()

public java.util.Iteratoriterate(org.hibernate.engine.QueryParameters queryParameters, org.hibernate.event.EventSource session)
Perform an iterate operation given the underlying query defintion.

param
queryParameters The query bind parameters.
param
session The session owning this query.
return
An iterator over the query results.
throws
HibernateException

public java.util.Listlist(org.hibernate.engine.SessionImplementor session, org.hibernate.engine.QueryParameters queryParameters)
Perform a list operation given the underlying query definition.

param
session The session owning this query.
param
queryParameters The query bind parameters.
return
The query list results.
throws
HibernateException

public org.hibernate.ScrollableResultsscroll(org.hibernate.engine.QueryParameters queryParameters, org.hibernate.engine.SessionImplementor session)
Perform a scroll operation given the underlying query defintion.

param
queryParameters The query bind parameters.
param
session The session owning this query.
return
The ScrollableResults wrapper around the query results.
throws
HibernateException

public voidvalidateScrollability()
Validate the scrollability of the translated query.

throws
HibernateException