Example usage for Java org.hibernate Query fields, constructors, methods, implement or subclass
The text is from its open source code.
String | getCacheRegion() Obtain the name of the second level query cache region in which query results will be stored (if they are cached, see the discussion on #isCacheable() for more information). |
Integer | getFetchSize() Obtain the JDBC fetch size hint in effect for this query. |
String[] | getNamedParameters() Return the names of all named parameters of the query. |
String | getQueryString() Get the query string. |
String[] | getReturnAliases() |
Type[] | getReturnTypes() Return the Hibernate types of the query results. |
Iterator | iterate() Return the query results as an Iterator. |
List | list() Return the query results as a List. |
ScrollableResults | scroll(ScrollMode scrollMode) Return the query results as ScrollableResults. |
ScrollableResults | scroll() Return the query results as ScrollableResults. |
Query | setBigDecimal(int position, BigDecimal val) Bind a positional BigDecimal-valued parameter. |
Query | setBigDecimal(String name, BigDecimal val) Bind a named BigDecimal-valued parameter. |
Query | setBigInteger(int position, BigInteger val) Bind a positional BigDecimal-valued parameter. |
Query | setBigInteger(String name, BigInteger val) Bind a named BigInteger-valued parameter. |
Query | setBinary(int position, byte[] val) Bind a positional binary-valued parameter. |
Query | setBinary(String name, byte[] val) Bind a named binary-valued parameter. |
Query | setBoolean(int position, boolean val) Bind a positional boolean-valued parameter. |
Query | setBoolean(String name, boolean val) Bind a named boolean-valued parameter. |
Query | setByte(int position, byte val) Bind a positional byte-valued parameter. |
Query | setByte(String name, byte val) Bind a named byte-valued parameter. |
Query | setCacheable(boolean cacheable) Enable/disable second level query (result) caching for this query. |
Query | setCacheMode(CacheMode cacheMode) (Re)set the current CacheMode in effect for this query. |
Query | setCacheRegion(String cacheRegion) Set the name of the cache region where query results should be cached (if cached at all). |
Query | setCalendar(int position, Calendar val) Bind a positional Calendar-valued parameter using the full Timestamp portion. |
Query | setCalendar(String name, Calendar value) Bind a named Calendar-valued parameter using the full Timestamp. |
Query | setCalendarDate(int position, Calendar val) Bind a positional Calendar-valued parameter using just the Date portion. |
Query | setCalendarDate(String name, Calendar value) Bind a named Calendar-valued parameter using just the Date portion. |
Query | setCharacter(int position, char val) Bind a positional char-valued parameter. |
Query | setCharacter(String name, char val) Bind a named char-valued parameter. |
Query | setComment(String comment) Set the comment for this query. |
Query | setDate(int position, Date val) Bind a positional Date-valued parameter using just the Date portion. |
Query | setDate(String name, Date val) Bind the val (time is truncated) of a given Date object to a named query parameter. |
Query | setDouble(int position, double val) Bind a positional double-valued parameter. |
Query | setDouble(String name, double val) Bind a named double-valued parameter. |
Query | setEntity(int position, Object val) Bind an instance of a mapped persistent class to a JDBC-style query parameter. |
Query | setEntity(String name, Object val) Bind an instance of a mapped persistent class to a named query parameter. |
Query | setFetchSize(int fetchSize) Sets a JDBC fetch size hint for the query. |
Query | setFirstResult(int startPosition) |
Query | setFloat(int position, float val) Bind a positional float-valued parameter. |
Query | setFloat(String name, float val) Bind a named float-valued parameter. |
Query | setFlushMode(FlushMode flushMode) (Re)set the current FlushMode in effect for this query. |
Query | setFlushMode(FlushModeType flushMode) |
Query | setInteger(int position, int val) Bind a positional int-valued parameter. |
Query | setInteger(String name, int val) Bind a named int-valued parameter. |
Query | setLocale(int position, Locale val) Bind a positional Locale-valued parameter. |
Query | setLocale(String name, Locale val) Bind a named Locale-valued parameter. |
Query | setLockMode(String alias, LockMode lockMode) Set the LockMode to use for specific alias (as defined in the query's FROM clause). |
Query | setLockOptions(LockOptions lockOptions) Set the lock options for the query. |
Query | setLong(int position, long val) Bind a positional long-valued parameter. |
Query | setLong(String name, long val) Bind a named long-valued parameter. |
Query | setMaxResults(int maxResult) |
Query | setParameter(QueryParameter Bind a query parameter using its inferred Type. |
Query | setParameter(Parameter |
Query | setParameter(String name, Object val) Bind a named query parameter using its inferred Type. |
Query | setParameter(int position, Object val) Bind a positional query parameter using its inferred Type. |
Query | setParameter(QueryParameter parameter, P val, Type type) Bind a query parameter using the supplied Type |
Query | setParameter(String name, Object val, Type type) Bind a named query parameter using the supplied Type |
Query | setParameter(int position, Object val, Type type) Bind a value to a JDBC-style query parameter. |
Query | setParameter(QueryParameter parameter, P val, TemporalType temporalType) Bind a query parameter as some form of date/time using the indicated temporal-type. |
Query | setParameter(String name, P val, TemporalType temporalType) Bind a named query parameter as some form of date/time using the indicated temporal-type. |
Query | setParameter(int position, P val, TemporalType temporalType) Bind a positional query parameter as some form of date/time using the indicated temporal-type. |
Query | setParameter(Parameter |
Query | setParameter(Parameter |
Query | setParameter(String name, Calendar value, TemporalType temporalType) |
Query | setParameter(String name, Date value, TemporalType temporalType) |
Query | setParameter(int position, Calendar value, TemporalType temporalType) |
Query | setParameter(int position, Date value, TemporalType temporalType) |
Query | setParameterList(QueryParameter parameter, Collection values) Bind multiple values to a query parameter using its inferred Type. |
Query | setParameterList(String name, Collection values) Bind multiple values to a named query parameter. |
Query | setParameterList(int position, Collection values) |
Query | setParameterList(String name, Object[] values) Bind multiple values to a named query parameter. |
Query | setParameterList(int position, Object[] values) |
Query | setParameterList(String name, Collection values, Type type) Bind multiple values to a named query parameter. |
Query | setParameterList(int position, Collection values, Type type) |
Query | setParameterList(String name, Object[] values, Type type) Bind multiple values to a named query parameter. |
Query | setParameterList(int position, Object[] values, Type type) |
Query | setParameters(Object[] values, Type[] types) Bind values and types to positional parameters. |
Query | setProperties(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 heuristics. |
Query | setProperties(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 heuristics. |
Query | setReadOnly(boolean readOnly) Set the read-only/modifiable mode for entities and proxies loaded by this Query. |
Query | setResultTransformer(ResultTransformer transformer) Set a strategy for handling the query results. |
Query | setSerializable(int position, Serializable val) Bind a positional binary-valued parameter using serialization. |
Query | setSerializable(String name, Serializable val) Bind a named binary-valued parameter using serialization. |
Query | setShort(int position, short val) Bind a positional short-valued parameter. |
Query | setShort(String name, short val) Bind a named short-valued parameter. |
Query | setString(int position, String val) Bind a positional String-valued parameter. |
Query | setString(String name, String val) Bind a named String-valued parameter. |
Query | setText(int position, String val) Bind a positional String-valued parameter using streaming. |
Query | setText(String name, String val) Bind a named String-valued parameter using streaming. |
Query | setTime(int position, Date val) Bind a positional Date-valued parameter using just the Time portion. |
Query | setTime(String name, Date val) Bind the time (val is truncated) of a given Date object to a named query parameter. |
Query | setTimeout(int timeout) Set the query timeout in seconds. |
Query | setTimestamp(int position, Date val) Bind a positional Date-valued parameter using the full Timestamp. |
Query | setTimestamp(String name, Date value) Bind the value and the time of a given Date object to a named query parameter. |
R | uniqueResult() Convenience method to return a single instance that matches the query, or null if the query returns no results. |