Defines the constract of an HQL->SQL translator.
ERROR_CANNOT_DETERMINE_TYPE
public static final String ERROR_CANNOT_DETERMINE_TYPE
ERROR_CANNOT_FETCH_WITH_ITERATE
public static final String ERROR_CANNOT_FETCH_WITH_ITERATE
ERROR_CANNOT_FORMAT_LITERAL
public static final String ERROR_CANNOT_FORMAT_LITERAL
ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR
public static final String ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR
collectSqlStrings
public List collectSqlStrings()
compile
public void compile(Map replacements,
boolean shallow)
throws QueryException,
MappingException
Compile a "normal" query. This method may be called multiple
times. Subsequent invocations are no-ops.
replacements
- Defined query substitutions.shallow
- Does this represent a shallow (scalar or entity-id) select?
containsCollectionFetches
public boolean containsCollectionFetches()
Does the translated query contain collection fetches?
- tru if the query does contain collection fetched;
false otherwise.
executeUpdate
public int executeUpdate(QueryParameters queryParameters,
SessionImplementor session)
throws HibernateException
Perform a bulk update/delete operation given the underlying query defintion.
queryParameters
- The query bind parameters.session
- The session owning this query.
- The number of entities updated or deleted.
getColumnNames
public String[][] getColumnNames()
Returns the column names in the generated SQL.
- the column names in the generated SQL.
getEnabledFilters
public Map getEnabledFilters()
Returns the filters enabled for this query translator.
- Filters enabled for this query execution.
getParameterTranslations
public ParameterTranslations getParameterTranslations()
Return information about any parameters encountered during
translation.
- The parameter information.
getQueryIdentifier
public String getQueryIdentifier()
Retrieve the query identifier for this translator. The query identifier is
used in stats collection.
getQuerySpaces
public Set getQuerySpaces()
Returns the set of query spaces (table names) that the query referrs to.
- A set of query spaces (table names).
getQueryString
public String getQueryString()
Returns the HQL string processed by the translator.
- the HQL string processed by the translator.
getReturnAliases
public String[] getReturnAliases()
Returns an array of HQL aliases
getReturnTypes
public Type[] getReturnTypes()
Returns an array of Types represented in the query result.
getSQLString
public String getSQLString()
Returns the SQL string generated by the translator.
- the SQL string generated by the translator.
isManipulationStatement
public boolean isManipulationStatement()
iterate
public Iterator iterate(QueryParameters queryParameters,
EventSource session)
throws HibernateException
Perform an iterate operation given the underlying query defintion.
queryParameters
- The query bind parameters.session
- The session owning this query.
- An iterator over the query results.
list
public List list(SessionImplementor session,
QueryParameters queryParameters)
throws HibernateException
Perform a list operation given the underlying query definition.
session
- The session owning this query.queryParameters
- The query bind parameters.
validateScrollability
public void validateScrollability()
throws HibernateException
Validate the scrollability of the translated query.