java.lang.Object | |
↳ | org.hibernate.impl.AbstractQueryImpl |
Known Direct Subclasses |
Known Indirect Subclasses |
Abstract implementation of the Query interface.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameterMetadata | |||||||||||
session |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an array representing all named parameter names encountered
during (intial) parsing of the query.
| |||||||||||
Get the query string.
| |||||||||||
Return the HQL select clause aliases (if any)
| |||||||||||
Return the Hibernate types of the query result set.
| |||||||||||
Does this query contain named parameters?
| |||||||||||
Should entities and proxies loaded by this Query be put in read-only mode? If the
read-only/modifiable setting was not initialized, then the default
read-only/modifiable setting for the persistence context is returned instead.
| |||||||||||
Override the current session cache mode, just for
this query.
| |||||||||||
Set the name of the cache region.
| |||||||||||
Enable caching of this query result set.
| |||||||||||
Add a comment to the generated SQL.
| |||||||||||
Bind an instance of a mapped persistent class to a JDBC-style query parameter.
| |||||||||||
Bind an instance of a mapped persistent class to a named query parameter.
| |||||||||||
Set a fetch size for the underlying JDBC query.
| |||||||||||
Set the first row to retrieve.
| |||||||||||
Override the current session flush mode, just for
this query.
| |||||||||||
Set the maximum number of rows to retrieve.
| |||||||||||
Bind a value to a JDBC-style query parameter.
| |||||||||||
Bind a value to a JDBC-style query parameter.
| |||||||||||
Bind a value to a named query parameter.
| |||||||||||
Bind a value to a named query parameter.
| |||||||||||
Bind multiple values to a named query parameter.
| |||||||||||
Bind multiple values to a named query parameter.
| |||||||||||
Bind multiple values to a named query parameter.
| |||||||||||
Bind multiple values to a named query parameter.
| |||||||||||
Bind values and types to positional parameters.
| |||||||||||
Bind the property values of the given bean to named parameters of the query,
matching property names with parameter names and mapping property types to
Hibernate types using hueristics.
| |||||||||||
Bind the values of the given Map for each named parameters of the query,
matching key names with parameter names and mapping value types to
Hibernate types using hueristics.
| |||||||||||
Set the read-only/modifiable mode for entities and proxies
loaded by this Query.
| |||||||||||
Set a strategy for handling the query results.
| |||||||||||
Set a timeout for the underlying JDBC query.
| |||||||||||
Convenience method to return a single instance that matches
the query, or null if the query returns no results.
| |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Warning: adds new parameters to the argument by side-effect, as well as
mutating the query string!
| |||||||||||
Retreive the value map for any named parameter lists (i.e., for
auto-expansion) bound to this query.
| |||||||||||
Returns a shallow copy of the named parameter value map.
| |||||||||||
Retreives the list of parameter
type s bound to this query for
ordinal parameters. | |||||||||||
Retreives the list of parameter values bound to this query for
ordinal parameters.
| |||||||||||
Perform parameter validation.
| |||||||||||
Perform parameter validation.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.hibernate.Query
|
Returns an array representing all named parameter names encountered during (intial) parsing of the query.
Note initial here means different things depending on whether this is a native-sql query or an HQL/filter query. For native-sql, a precursory inspection of the query string is performed specifically to locate defined parameters. For HQL/filter queries, this is the information returned from the query-translator. This distinction holds true for all parameter metadata exposed here.HibernateException |
---|
Return the HQL select clause aliases (if any)
HibernateException |
---|
Return the Hibernate types of the query result set.
HibernateException |
---|
Does this query contain named parameters?
Should entities and proxies loaded by this Query be put in read-only mode? If the read-only/modifiable setting was not initialized, then the default read-only/modifiable setting for the persistence context is returned instead.
Override the current session cache mode, just for this query.
Set the name of the cache region.
cacheRegion | the name of a query cache region, or null for the default query cache |
---|
Enable caching of this query result set.
cacheable | Should the query results be cacheable? |
---|
Add a comment to the generated SQL.
comment | a human-readable string |
---|
Bind an instance of a mapped persistent class to a JDBC-style query parameter.
position | the position of the parameter in the query string, numbered from 0. |
---|---|
val | a non-null instance of a persistent class |
Bind an instance of a mapped persistent class to a named query parameter.
name | the name of the parameter |
---|---|
val | a non-null instance of a persistent class |
Set a fetch size for the underlying JDBC query.
fetchSize | the fetch size |
---|
Set the first row to retrieve. If not set, rows will be retrieved beginnning from row 0.
firstResult | a row number, numbered from 0 |
---|
Override the current session flush mode, just for this query.
Set the maximum number of rows to retrieve. If not set, there is no limit to the number of rows retrieved.
maxResults | the maximum number of rows |
---|
Bind a value to a JDBC-style query parameter.
position | the position of the parameter in the query string, numbered from 0. |
---|---|
val | the possibly-null parameter value |
type | the Hibernate type |
Bind a value to a JDBC-style query parameter. The Hibernate type of the parameter is first detected via the usage/position in the query and if not sufficient secondly guessed from the class of the given object.
position | the position of the parameter in the query string, numbered from 0. |
---|---|
val | the non-null parameter value |
HibernateException |
---|
Bind a value to a named query parameter.
name | the name of the parameter |
---|---|
val | the possibly-null parameter value |
type | the Hibernate type |
Bind a value to a named query parameter. The Hibernate type of the parameter is first detected via the usage/position in the query and if not sufficient secondly guessed from the class of the given object.
name | the name of the parameter |
---|---|
val | the non-null parameter value |
HibernateException |
---|
Bind multiple values to a named query parameter. The Hibernate type of the parameter is first detected via the usage/position in the query and if not sufficient secondly guessed from the class of the first object in the collection. This is useful for binding a list of values to an expression such as foo.bar in (:value_list).
name | the name of the parameter |
---|---|
vals | a collection of values to list |
HibernateException |
---|
Bind multiple values to a named query parameter. The Hibernate type of the parameter is first detected via the usage/position in the query and if not sufficient secondly guessed from the class of the first object in the array. This is useful for binding a list of values to an expression such as foo.bar in (:value_list).
name | the name of the parameter |
---|---|
vals | a collection of values to list |
HibernateException |
---|
Bind multiple values to a named query parameter. This is useful for binding a list of values to an expression such as foo.bar in (:value_list).
name | the name of the parameter |
---|---|
vals | a collection of values to list |
type | the Hibernate type of the values |
HibernateException |
---|
Bind multiple values to a named query parameter. This is useful for binding a list of values to an expression such as foo.bar in (:value_list).
name | the name of the parameter |
---|---|
vals | a collection of values to list |
type | the Hibernate type of the values |
HibernateException |
---|
Bind values and types to positional parameters.
Bind the property values of the given bean to named parameters of the query, matching property names with parameter names and mapping property types to Hibernate types using hueristics.
bean | any JavaBean or POJO |
---|
HibernateException |
---|
Bind the values of the given Map for each named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using hueristics.
map | a java.util.Map |
---|
HibernateException |
---|
Set the read-only/modifiable mode for entities and proxies loaded by this Query. This setting overrides the default setting for the persistence context.
readOnly | true, entities and proxies loaded by the query will be put in read-only mode false, entities and proxies loaded by the query will be put in modifiable mode |
---|
Set a strategy for handling the query results. This can be used to change "shape" of the query result.
transformer | The transformer to apply |
---|
Set a timeout for the underlying JDBC query.
timeout | the timeout in seconds |
---|
Convenience method to return a single instance that matches the query, or null if the query returns no results.
HibernateException |
---|
Warning: adds new parameters to the argument by side-effect, as well as mutating the query string!
Retreive the value map for any named parameter lists (i.e., for auto-expansion) bound to this query.
Returns a shallow copy of the named parameter value map.
Retreives the list of parameter type
s bound to this query for
ordinal parameters.
Retreives the list of parameter values bound to this query for ordinal parameters.
Perform parameter validation. Used prior to executing the encapsulated query.
reserveFirstParameter | if true, the first ? will not be verified since its needed for e.g. callable statements returning a out parameter |
---|
HibernateException |
---|
Perform parameter validation. Used prior to executing the encapsulated query.
QueryException |
---|