Methods Summary |
---|
public int | executeUpdate()Execute the update or delete statement.
The semantics are compliant with the ejb3 Query.executeUpdate()
method.
|
public java.lang.String[] | getNamedParameters()Return the names of all named parameters of the query.
|
public java.lang.String | getQueryString()Get the query string.
|
public java.lang.String[] | getReturnAliases()Return the HQL select clause aliases (if any)
|
public org.hibernate.type.Type[] | getReturnTypes()Return the Hibernate types of the query result set.
|
public java.util.Iterator | iterate()Return the query results as an Iterator. If the query
contains multiple results pre row, the results are returned in
an instance of Object[].
Entities returned as results are initialized on demand. The first
SQL query returns identifiers only.
|
public java.util.List | list()Return the query results as a List. If the query contains
multiple results pre row, the results are returned in an instance
of Object[].
|
public ScrollableResults | scroll()Return the query results as ScrollableResults. The
scrollability of the returned results depends upon JDBC driver
support for scrollable ResultSets.
|
public ScrollableResults | scroll(ScrollMode scrollMode)Return the query results as ScrollableResults. The
scrollability of the returned results depends upon JDBC driver
support for scrollable ResultSets.
|
public org.hibernate.Query | setBigDecimal(int position, java.math.BigDecimal number)
|
public org.hibernate.Query | setBigDecimal(java.lang.String name, java.math.BigDecimal number)
|
public org.hibernate.Query | setBigInteger(int position, java.math.BigInteger number)
|
public org.hibernate.Query | setBigInteger(java.lang.String name, java.math.BigInteger number)
|
public org.hibernate.Query | setBinary(int position, byte[] val)
|
public org.hibernate.Query | setBinary(java.lang.String name, byte[] val)
|
public org.hibernate.Query | setBoolean(int position, boolean val)
|
public org.hibernate.Query | setBoolean(java.lang.String name, boolean val)
|
public org.hibernate.Query | setByte(int position, byte val)
|
public org.hibernate.Query | setByte(java.lang.String name, byte val)
|
public org.hibernate.Query | setCacheMode(CacheMode cacheMode)Override the current session cache mode, just for
this query.
|
public org.hibernate.Query | setCacheRegion(java.lang.String cacheRegion)Set the name of the cache region.
|
public org.hibernate.Query | setCacheable(boolean cacheable)Enable caching of this query result set.
|
public org.hibernate.Query | setCalendar(int position, java.util.Calendar calendar)
|
public org.hibernate.Query | setCalendar(java.lang.String name, java.util.Calendar calendar)
|
public org.hibernate.Query | setCalendarDate(int position, java.util.Calendar calendar)
|
public org.hibernate.Query | setCalendarDate(java.lang.String name, java.util.Calendar calendar)
|
public org.hibernate.Query | setCharacter(int position, char val)
|
public org.hibernate.Query | setCharacter(java.lang.String name, char val)
|
public org.hibernate.Query | setComment(java.lang.String comment)Add a comment to the generated SQL.
|
public org.hibernate.Query | setDate(int position, java.util.Date date)
|
public org.hibernate.Query | setDate(java.lang.String name, java.util.Date date)
|
public org.hibernate.Query | setDouble(int position, double val)
|
public org.hibernate.Query | setDouble(java.lang.String name, double val)
|
public org.hibernate.Query | setEntity(int position, java.lang.Object val)Bind an instance of a mapped persistent class to a JDBC-style query parameter.
|
public org.hibernate.Query | setEntity(java.lang.String name, java.lang.Object val)Bind an instance of a mapped persistent class to a named query parameter.
|
public org.hibernate.Query | setFetchSize(int fetchSize)Set a fetch size for the underlying JDBC query.
|
public org.hibernate.Query | setFirstResult(int firstResult)Set the first row to retrieve. If not set, rows will be
retrieved beginnning from row 0.
|
public org.hibernate.Query | setFloat(int position, float val)
|
public org.hibernate.Query | setFloat(java.lang.String name, float val)
|
public org.hibernate.Query | setFlushMode(FlushMode flushMode)Override the current session flush mode, just for
this query.
|
public org.hibernate.Query | setInteger(int position, int val)
|
public org.hibernate.Query | setInteger(java.lang.String name, int val)
|
public org.hibernate.Query | setLocale(int position, java.util.Locale locale)
|
public org.hibernate.Query | setLocale(java.lang.String name, java.util.Locale locale)
|
public org.hibernate.Query | setLockMode(java.lang.String alias, LockMode lockMode)Set the lockmode for the objects idententified by the
given alias that appears in the FROM clause.
|
public org.hibernate.Query | setLong(int position, long val)
|
public org.hibernate.Query | setLong(java.lang.String name, long val)
|
public org.hibernate.Query | setMaxResults(int maxResults)Set the maximum number of rows to retrieve. If not set,
there is no limit to the number of rows retrieved.
|
public org.hibernate.Query | setParameter(int position, java.lang.Object val, org.hibernate.type.Type type)Bind a value to a JDBC-style query parameter.
|
public org.hibernate.Query | setParameter(java.lang.String name, java.lang.Object val, org.hibernate.type.Type type)Bind a value to a named query parameter.
|
public org.hibernate.Query | setParameter(int position, java.lang.Object val)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.
|
public org.hibernate.Query | setParameter(java.lang.String name, java.lang.Object val)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.
|
public org.hibernate.Query | setParameterList(java.lang.String name, java.util.Collection vals, org.hibernate.type.Type type)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).
|
public org.hibernate.Query | setParameterList(java.lang.String name, java.util.Collection vals)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).
|
public org.hibernate.Query | setParameterList(java.lang.String name, java.lang.Object[] vals, org.hibernate.type.Type type)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).
|
public org.hibernate.Query | setParameterList(java.lang.String name, java.lang.Object[] vals)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).
|
public org.hibernate.Query | setParameters(java.lang.Object[] values, org.hibernate.type.Type[] types)Bind values and types to positional parameters.
|
public org.hibernate.Query | setProperties(java.lang.Object bean)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.
|
public org.hibernate.Query | setProperties(java.util.Map bean)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.
|
public org.hibernate.Query | setReadOnly(boolean readOnly)Entities retrieved by this query will be loaded in
a read-only mode where Hibernate will never dirty-check
them or make changes persistent.
|
public org.hibernate.Query | setResultTransformer(org.hibernate.transform.ResultTransformer transformer)Set a strategy for handling the query results. This can be used to change
"shape" of the query result.
|
public org.hibernate.Query | setSerializable(int position, java.io.Serializable val)
|
public org.hibernate.Query | setSerializable(java.lang.String name, java.io.Serializable val)
|
public org.hibernate.Query | setShort(int position, short val)
|
public org.hibernate.Query | setShort(java.lang.String name, short val)
|
public org.hibernate.Query | setString(int position, java.lang.String val)
|
public org.hibernate.Query | setString(java.lang.String name, java.lang.String val)
|
public org.hibernate.Query | setText(int position, java.lang.String val)
|
public org.hibernate.Query | setText(java.lang.String name, java.lang.String val)
|
public org.hibernate.Query | setTime(int position, java.util.Date date)
|
public org.hibernate.Query | setTime(java.lang.String name, java.util.Date date)
|
public org.hibernate.Query | setTimeout(int timeout)Set a timeout for the underlying JDBC query.
|
public org.hibernate.Query | setTimestamp(int position, java.util.Date date)
|
public org.hibernate.Query | setTimestamp(java.lang.String name, java.util.Date date)
|
public java.lang.Object | uniqueResult()Convenience method to return a single instance that matches
the query, or null if the query returns no results.
|