Package org.hibernate.loader.custom.sql
Class SQLCustomQuery
java.lang.Object
org.hibernate.loader.custom.sql.SQLCustomQuery
- All Implemented Interfaces:
CustomQuery
Implements Hibernate's built-in support for native SQL queries.
This support is built on top of the notion of "custom queries"...
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSQLCustomQuery(String sqlQuery, NativeSQLQueryReturn[] queryReturns, Collection additionalQuerySpaces, SessionFactoryImplementor factory) -
Method Summary
Modifier and TypeMethodDescriptionA collection ofdescriptorsdescribing the JDBC result set to be expected and how to map this result set.A map representing positions within the suppliedqueryto which we need to bind named parameters.Any query spaces to apply to the query execution.getSQL()The SQL query string to be performed.
-
Field Details
-
log
-
-
Constructor Details
-
SQLCustomQuery
public SQLCustomQuery(String sqlQuery, NativeSQLQueryReturn[] queryReturns, Collection additionalQuerySpaces, SessionFactoryImplementor factory) throws HibernateException - Throws:
HibernateException
-
-
Method Details
-
getSQL
Description copied from interface:CustomQueryThe SQL query string to be performed.- Specified by:
getSQLin interfaceCustomQuery- Returns:
- The SQL statement string.
-
getQuerySpaces
Description copied from interface:CustomQueryAny query spaces to apply to the query execution. Query spaces are used in Hibernate's auto-flushing mechanism to determine which entities need to be checked for pending changes.- Specified by:
getQuerySpacesin interfaceCustomQuery- Returns:
- The query spaces
-
getNamedParameterBindPoints
Description copied from interface:CustomQueryA map representing positions within the suppliedqueryto which we need to bind named parameters. Optional, may return null if no named parameters. The structure of the returned map (if one) as follows:- The keys into the map are the named parameter names
- The corresponding value is either an
Integerif the parameter occurs only once in the query; or a List of Integers if the parameter occurs more than once
- Specified by:
getNamedParameterBindPointsin interfaceCustomQuery
-
getCustomQueryReturns
Description copied from interface:CustomQueryA collection ofdescriptorsdescribing the JDBC result set to be expected and how to map this result set.- Specified by:
getCustomQueryReturnsin interfaceCustomQuery- Returns:
- List of return descriptors.
-