程序包 org.hibernate
接口 Query<R>
-
- 所有超级接口:
BasicQueryContract<CommonQueryContract>,CommonQueryContract,javax.persistence.Query,javax.persistence.TypedQuery<R>
- 所有已知子接口:
NativeQuery<T>,NativeQueryImplementor<T>,ProcedureCallImplementor<R>,Query<R>,QueryImplementor<R>,SQLQuery<T>
- 所有已知实现类:
AbstractProducedQuery,CollectionFilterImpl,CriteriaQueryTypeQueryAdapter,NativeQueryImpl,ProcedureCallImpl,QueryImpl
@Deprecated public interface Query<R> extends javax.persistence.TypedQuery<R>, CommonQueryContract
已过时。(since 5.2) useQueryinsteadRepresents an HQL/JPQL query or a compiled Criteria query- 作者:
- Gavin King, Steve Ebersole
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 已过时的方法 修饰符和类型 方法 说明 Query<R>addQueryHint(String hint)已过时。Add a DB query hint to the SQL.TypedetermineProperBooleanType(int position, Object value, Type defaultType)已过时。added only to allow default method definition for deprecated methods here.TypedetermineProperBooleanType(String name, Object value, Type defaultType)已过时。added only to allow default method definition for deprecated methods here.CacheModegetCacheMode()已过时。Obtain the CacheMode in effect for this query.StringgetCacheRegion()已过时。Obtain the name of the second level query cache region in which query results will be stored (if they are cached, see the discussion onisCacheable()for more information).StringgetComment()已过时。Obtain the comment currently associated with this query.IntegergetFetchSize()已过时。Obtain the JDBC fetch size hint in effect for this query.javax.persistence.FlushModeTypegetFlushMode()已过时。For users of the Hibernate native APIs, we've had to rename this method as defined by Hibernate historically because the JPA contract defines a method of the same name, but returning the JPAFlushModeTyperather than Hibernate'sFlushMode.default IntegergetHibernateFirstResult()已过时。Query.getFirstResult()should be used instead.FlushModegetHibernateFlushMode()已过时。Obtain the FlushMode in effect for this query.default IntegergetHibernateMaxResults()已过时。Query.getMaxResults()should be used instead.LockOptionsgetLockOptions()已过时。Obtains the LockOptions in effect for this query.String[]getNamedParameters()已过时。(since 5.2) useParameterMetadata.getNamedParameterNames()ParameterMetadatagetParameterMetadata()已过时。Access to information about query parameters.RowSelectiongetQueryOptions()已过时。"QueryOptions" is a better name, I think, than "RowSelection" -> 6.0StringgetQueryString()已过时。Get the query string.String[]getReturnAliases()已过时。(since 5.2) useTupleif you need access to "result variables".Type[]getReturnTypes()已过时。(since 5.2) with no replacement; to be removed in 6.0IntegergetTimeout()已过时。Obtain the query timeout in seconds.booleanisCacheable()已过时。Are the results of this query eligible for second level query caching?booleanisReadOnly()已过时。Should entities and proxies loaded by this Query be put in read-only mode?Iterator<R>iterate()已过时。Return the query results as an Iterator.List<R>list()已过时。Return the query results as a List.ScrollableResultsscroll()已过时。Return the query results as ScrollableResults.ScrollableResultsscroll(ScrollMode scrollMode)已过时。Return the query results as ScrollableResults.default Query<R>setBigDecimal(int position, BigDecimal val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setBigDecimal(String name, BigDecimal val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setBigInteger(int position, BigInteger val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setBigInteger(String name, BigInteger val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setBinary(int position, byte[] val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setBinary(String name, byte[] val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setBoolean(int position, boolean val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setBoolean(String name, boolean val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setByte(int position, byte val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setByte(String name, byte val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadQuery<R>setCacheable(boolean cacheable)已过时。Enable/disable second level query (result) caching for this query.Query<R>setCacheMode(CacheMode cacheMode)已过时。(Re)set the current CacheMode in effect for this query.Query<R>setCacheRegion(String cacheRegion)已过时。Set the name of the cache region where query results should be cached (if cached at all).default Query<R>setCalendar(int position, Calendar val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setCalendar(String name, Calendar value)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setCalendarDate(int position, Calendar val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setCalendarDate(String name, Calendar value)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setCharacter(int position, char val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setCharacter(String name, char val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadQuery<R>setComment(String comment)已过时。Set the comment for this query.default Query<R>setDate(int position, Date val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setDate(String name, Date val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setDouble(int position, double val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setDouble(String name, double val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadQuery<R>setEntity(int position, Object val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadQuery<R>setEntity(String name, Object val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadQuery<R>setFetchSize(int fetchSize)已过时。Sets a JDBC fetch size hint for the query.Query<R>setFirstResult(int startPosition)已过时。default Query<R>setFloat(int position, float val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setFloat(String name, float val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadQuery<R>setFlushMode(javax.persistence.FlushModeType flushMode)已过时。Query<R>setFlushMode(FlushMode flushMode)已过时。(since 5.2) usesetHibernateFlushMode(org.hibernate.FlushMode)insteaddefault QuerysetHibernateFirstResult(int firstRow)已过时。setFirstResult(int)should be used instead.default Query<R>setHibernateFlushMode(FlushMode flushMode)已过时。(Re)set the current FlushMode in effect for this query.default QuerysetHibernateMaxResults(int maxResults)已过时。setMaxResults(int)should be used instead.Query<R>setHint(String hintName, Object value)已过时。default Query<R>setInteger(int position, int val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setInteger(String name, int val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setLocale(int position, Locale val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setLocale(String name, Locale val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadQuery<R>setLockMode(String alias, LockMode lockMode)已过时。Set the LockMode to use for specific alias (as defined in the query's FROM clause).Query<R>setLockMode(javax.persistence.LockModeType lockMode)已过时。Query<R>setLockOptions(LockOptions lockOptions)已过时。Set the lock options for the query.default Query<R>setLong(int position, long val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setLong(String name, long val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadQuery<R>setMaxResults(int maxResult)已过时。Query<R>setParameter(int position, Object val)已过时。Bind a positional query parameter using its inferred Type.Query<R>setParameter(int position, Object val, Type type)已过时。Bind a value to a JDBC-style query parameter.Query<R>setParameter(int position, Calendar value, javax.persistence.TemporalType temporalType)已过时。Query<R>setParameter(int position, Date value, javax.persistence.TemporalType temporalType)已过时。<P> Query<R>setParameter(int position, P val, javax.persistence.TemporalType temporalType)已过时。Bind a positional query parameter as some form of date/time using the indicated temporal-type.Query<R>setParameter(String name, Object val)已过时。Bind a named query parameter using its inferred Type.Query<R>setParameter(String name, Object val, Type type)已过时。Bind a named query parameter using the supplied TypeQuery<R>setParameter(String name, Calendar value, javax.persistence.TemporalType temporalType)已过时。Query<R>setParameter(String name, Date value, javax.persistence.TemporalType temporalType)已过时。<P> Query<R>setParameter(String name, P val, javax.persistence.TemporalType temporalType)已过时。Bind a named query parameter as some form of date/time using the indicated temporal-type.Query<R>setParameter(javax.persistence.Parameter<Calendar> param, Calendar value, javax.persistence.TemporalType temporalType)已过时。Query<R>setParameter(javax.persistence.Parameter<Date> param, Date value, javax.persistence.TemporalType temporalType)已过时。<T> Query<R>setParameter(javax.persistence.Parameter<T> param, T value)已过时。<P> Query<R>setParameter(QueryParameter<P> parameter, P val, javax.persistence.TemporalType temporalType)已过时。Bind a query parameter as some form of date/time using the indicated temporal-type.<P> Query<R>setParameter(QueryParameter<P> parameter, P val, Type type)已过时。Bind a query parameter using the supplied Type<T> Query<R>setParameter(QueryParameter<T> parameter, T val)已过时。Bind a query parameter using its inferred Type.Query<R>setParameterList(int position, Object[] values)已过时。Query<R>setParameterList(int position, Object[] values, Type type)已过时。Query<R>setParameterList(int position, Collection values)已过时。Query<R>setParameterList(int position, Collection values, Type type)已过时。Query<R>setParameterList(String name, Object[] values)已过时。Bind multiple values to a named query parameter.Query<R>setParameterList(String name, Object[] values, Type type)已过时。Bind multiple values to a named query parameter.Query<R>setParameterList(String name, Collection values)已过时。Bind multiple values to a named query parameter.Query<R>setParameterList(String name, Collection values, Type type)已过时。Bind multiple values to a named query parameter.<P> Query<R>setParameterList(QueryParameter<P> parameter, Collection<P> values)已过时。Bind multiple values to a query parameter using its inferred Type.default Query<R>setParameters(Object[] values, Type[] types)已过时。(since 5.2) Bind values individuallyQuery<R>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<R>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<R>setReadOnly(boolean readOnly)已过时。Set the read-only/modifiable mode for entities and proxies loaded by this Query.Query<R>setResultTransformer(ResultTransformer transformer)已过时。(since 5.2)default Query<R>setSerializable(int position, Serializable val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setSerializable(String name, Serializable val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setShort(int position, short val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setShort(String name, short val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setString(int position, String val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setString(String name, String val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setText(int position, String val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setText(String name, String val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setTime(int position, Date val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setTime(String name, Date val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadQuery<R>setTimeout(int timeout)已过时。Set the query timeout in seconds.default Query<R>setTimestamp(int position, Date val)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteaddefault Query<R>setTimestamp(String name, Date value)已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadRuniqueResult()已过时。Convenience method to return a single instance that matches the query, ornullif the query returns no results.
-
-
-
方法详细资料
-
getQueryString
String getQueryString()
已过时。Get the query string.- 返回:
- the query string
-
getQueryOptions
RowSelection getQueryOptions()
已过时。"QueryOptions" is a better name, I think, than "RowSelection" -> 6.0- 返回:
- Return the encapsulation of this query's options, which includes access to firstRow, maxRows, timeout and fetchSize. Important because this gives access to those values in their Integer form rather than the primitive form (int) required by JPA.
-
getHibernateFirstResult
@Deprecated default Integer getHibernateFirstResult()
已过时。Query.getFirstResult()should be used instead.The position of the first query result to be retrieved, previously set bysetFirstResult(int)orsetHibernateFirstResult(int). If the value was not initialized bysetFirstResult(int)orsetHibernateFirstResult(int), thennullis returned, resulting in pagination starting from position 0. IfsetHibernateFirstResult(int)was called with a negative value, then 0 is returned.- 返回:
- the position of the first query result, or
nullif uninitialized. - 另请参阅:
setFirstResult(int),setHibernateFirstResult(int)
-
setHibernateFirstResult
@Deprecated default Query setHibernateFirstResult(int firstRow)
已过时。setFirstResult(int)should be used instead.Set the position of the first query result to be retrieved. A negative value will result in pagination starting from position 0.- 参数:
firstRow- - the position of the first query result- 返回:
this, for method chaining
-
getHibernateMaxResults
@Deprecated default Integer getHibernateMaxResults()
已过时。Query.getMaxResults()should be used instead.The maximum number of query results to be retrieved, previously set bysetMaxResults(int)orsetHibernateMaxResults(int). If the value was not initialized bysetMaxResults(int)orsetHibernateMaxResults(int), thennullis returned IfsetHibernateMaxResults(int)was called with a value less than or equal to 0, the value is considered to be uninitialized, andnullis returned, resulting in no limit on the number of results.
-
setHibernateMaxResults
@Deprecated default Query setHibernateMaxResults(int maxResults)
已过时。setMaxResults(int)should be used instead.Set the maximum number of query results to be retrieved. A value less than or equal to 0 is considered uninitialized, resulting in no limit on the number of results.- 参数:
maxResults- - the maximum number of query results- 返回:
this, for method chaining
-
getHibernateFlushMode
FlushMode getHibernateFlushMode()
已过时。Obtain the FlushMode in effect for this query. By default, the query inherits the FlushMode of the Session from which it originates.- 指定者:
getHibernateFlushMode在接口中BasicQueryContract<R>- 返回:
- The query FlushMode.
- 另请参阅:
FlushMode
-
setHibernateFlushMode
default Query<R> setHibernateFlushMode(FlushMode flushMode)
已过时。(Re)set the current FlushMode in effect for this query.- 指定者:
setHibernateFlushMode在接口中BasicQueryContract<R>- 参数:
flushMode- The new FlushMode to use.- 返回:
this, for method chaining- 另请参阅:
getHibernateFlushMode()
-
setFlushMode
@Deprecated Query<R> setFlushMode(FlushMode flushMode)
已过时。(since 5.2) usesetHibernateFlushMode(org.hibernate.FlushMode)instead(Re)set the current FlushMode in effect for this query.- 指定者:
setFlushMode在接口中BasicQueryContract<R>- 参数:
flushMode- The new FlushMode to use.- 返回:
this, for method chaining- 另请参阅:
getHibernateFlushMode()
-
getFlushMode
javax.persistence.FlushModeType getFlushMode()
已过时。For users of the Hibernate native APIs, we've had to rename this method as defined by Hibernate historically because the JPA contract defines a method of the same name, but returning the JPAFlushModeTyperather than Hibernate'sFlushMode. For the former behavior, useQuery.getHibernateFlushMode()instead.- 指定者:
getFlushMode在接口中javax.persistence.Query- 返回:
- The FlushModeType in effect for this query.
-
getCacheMode
CacheMode getCacheMode()
已过时。Obtain the CacheMode in effect for this query. By default, the query inherits the CacheMode of the Session from which is originates. NOTE: The CacheMode here only effects reading/writing of the query cache, not the entity/collection caches.- 指定者:
getCacheMode在接口中BasicQueryContract<R>- 返回:
- The query CacheMode.
- 另请参阅:
Session.getCacheMode(),CacheMode
-
setCacheMode
Query<R> setCacheMode(CacheMode cacheMode)
已过时。(Re)set the current CacheMode in effect for this query.- 指定者:
setCacheMode在接口中BasicQueryContract<R>- 参数:
cacheMode- The new CacheMode to use.- 返回:
this, for method chaining- 另请参阅:
getCacheMode()
-
isCacheable
boolean isCacheable()
已过时。Are the results of this query eligible for second level query caching? This is different than second level caching of any returned entities and collections. NOTE: the query being "eligible" for caching does not necessarily mean its results will be cached. Second level query caching still has to be enabled on theSessionFactoryfor this to happen. Usually that is controlled by thehibernate.cache.use_query_cacheconfiguration setting.- 指定者:
isCacheable在接口中BasicQueryContract<R>- 返回:
trueif the query results are eligible for caching,falseotherwise.- 另请参阅:
AvailableSettings.USE_QUERY_CACHE
-
setCacheable
Query<R> setCacheable(boolean cacheable)
已过时。Enable/disable second level query (result) caching for this query.- 指定者:
setCacheable在接口中BasicQueryContract<R>- 参数:
cacheable- Should the query results be cacheable?- 返回:
this, for method chaining- 另请参阅:
isCacheable()
-
getCacheRegion
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 onisCacheable()for more information).nullindicates that the default region should be used.- 指定者:
getCacheRegion在接口中BasicQueryContract<R>- 返回:
- The specified cache region name into which query results should be placed;
nullindicates the default region.
-
setCacheRegion
Query<R> setCacheRegion(String cacheRegion)
已过时。Set the name of the cache region where query results should be cached (if cached at all).- 指定者:
setCacheRegion在接口中BasicQueryContract<R>- 参数:
cacheRegion- the name of a query cache region, ornullto indicate that the default region should be used.- 返回:
this, for method chaining- 另请参阅:
getCacheRegion()
-
getTimeout
Integer getTimeout()
已过时。Obtain the query timeout in seconds. This value is eventually passed along to the JDBC query viaStatement.setQueryTimeout(int). Zero indicates no timeout.- 指定者:
getTimeout在接口中BasicQueryContract<R>- 返回:
- The timeout in seconds
- 另请参阅:
Statement.getQueryTimeout(),Statement.setQueryTimeout(int)
-
setTimeout
Query<R> setTimeout(int timeout)
已过时。Set the query timeout in seconds. NOTE it is important to understand that any value set here is eventually passed directly through to the JDBC Statement which expressly disallows negative values. So negative values should be avoided as a general rule.- 指定者:
setTimeout在接口中BasicQueryContract<R>- 参数:
timeout- the timeout in seconds- 返回:
this, for method chaining- 另请参阅:
getTimeout()
-
getFetchSize
Integer getFetchSize()
已过时。Obtain the JDBC fetch size hint in effect for this query. This value is eventually passed along to the JDBC query viaStatement.setFetchSize(int). As defined b y JDBC, this value is a hint to the driver to indicate how many rows to fetch from the database when more rows are needed. NOTE : JDBC expressly defines this value as a hint. It may or may not have any effect on the actual query execution and ResultSet processing depending on the driver.- 指定者:
getFetchSize在接口中BasicQueryContract<R>- 返回:
- The timeout in seconds
- 另请参阅:
Statement.getFetchSize(),Statement.setFetchSize(int)
-
setFetchSize
Query<R> setFetchSize(int fetchSize)
已过时。Sets a JDBC fetch size hint for the query.- 指定者:
setFetchSize在接口中BasicQueryContract<R>- 参数:
fetchSize- the fetch size hint- 返回:
this, for method chaining- 另请参阅:
getFetchSize()
-
isReadOnly
boolean isReadOnly()
已过时。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.- 指定者:
isReadOnly在接口中BasicQueryContract<R>- 返回:
trueif the entities and proxies loaded by the query will be put in read-only mode;falseotherwise (they will be modifiable)- 另请参阅:
setReadOnly(boolean),The read-only/modifiable setting has no impact on entities/proxies returned by the query that existed in the session before the query was executed.
-
setReadOnly
Query<R> setReadOnly(boolean readOnly)
已过时。Set the read-only/modifiable mode for entities and proxies loaded by this Query. This setting overrides the default setting for the persistence context.- 指定者:
setReadOnly在接口中BasicQueryContract<R>- 参数:
readOnly-trueindicates that entities and proxies loaded by the query are to be put in read-only mode;falseindicates that entities and proxies loaded by the query will be put in modifiable mode- 返回:
this, for method chaining- 另请参阅:
To set the default read-only/modifiable setting used for entities and proxies that are loaded into the session:,PersistenceContext.setDefaultReadOnly(boolean),Read-only entities are not dirty-checked and snapshots of persistent state are not maintained. Read-only entities can be modified, but changes are not persisted. When a proxy is initialized, the loaded entity will have the same read-only/modifiable setting as the uninitialized proxy has, regardless of the session's current setting. The read-only/modifiable setting has no impact on entities/proxies returned by the query that existed in the session before the query was executed.
-
getReturnTypes
@Deprecated Type[] getReturnTypes()
已过时。(since 5.2) with no replacement; to be removed in 6.0Return the Hibernate types of the query results.- 指定者:
getReturnTypes在接口中BasicQueryContract<R>- 返回:
- an array of types
-
getLockOptions
LockOptions getLockOptions()
已过时。Obtains the LockOptions in effect for this query.- 返回:
- The LockOptions
- 另请参阅:
LockOptions
-
setLockOptions
Query<R> setLockOptions(LockOptions lockOptions)
已过时。Set the lock options for the query. Specifically only the following are taken into consideration: For alias-specific locking, usesetLockMode(String, LockMode).- 参数:
lockOptions- The lock options to apply to the query.- 返回:
this, for method chaining- 另请参阅:
getLockOptions()
-
setLockMode
Query<R> setLockMode(String alias, LockMode lockMode)
已过时。Set the LockMode to use for specific alias (as defined in the query's FROM clause). The alias-specific lock modes specified here are added to the query's internalLockOptions. The effect of these alias-specific LockModes is somewhat dependent on the driver/database in use. Generally speaking, for maximum portability, this method should only be used to mark that the rows corresponding to the given alias should be included in pessimistic locking (LockMode.PESSIMISTIC_WRITE).- 参数:
alias- a query alias, or"this"for a collection filterlockMode- The lock mode to apply.- 返回:
this, for method chaining- 另请参阅:
getLockOptions()
-
getComment
String getComment()
已过时。Obtain the comment currently associated with this query. Provided SQL commenting is enabled (generally by enabling thehibernate.use_sql_commentsconfig setting), this comment will also be added to the SQL query sent to the database. Often useful for identifying the source of troublesome queries on the database side.- 返回:
- The comment.
-
setComment
Query<R> setComment(String comment)
已过时。Set the comment for this query.- 参数:
comment- The human-readable comment- 返回:
this, for method chaining- 另请参阅:
getComment()
-
addQueryHint
Query<R> addQueryHint(String hint)
已过时。Add a DB query hint to the SQL. These differ from JPA'sQueryHint, which is specific to the JPA implementation and ignores DB vendor-specific hints. Instead, these are intended solely for the vendor-specific hints, such as Oracle's optimizers. Multiple query hints are supported; the Dialect will determine concatenation and placement.- 参数:
hint- The database specific query hint to add.
-
iterate
Iterator<R> iterate()
已过时。Return the query results as an Iterator. If the query contains multiple results per 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.- 返回:
- the result iterator
-
scroll
ScrollableResults scroll()
已过时。Return the query results as ScrollableResults. The scrollability of the returned results depends upon JDBC driver support for scrollable ResultSets.You should call
ScrollableResults.close()after processing the ScrollableResults so that the underlying resources are deallocated right away.- 返回:
- the result iterator
- 另请参阅:
ScrollableResults
-
scroll
ScrollableResults scroll(ScrollMode scrollMode)
已过时。Return the query results as ScrollableResults. The scrollability of the returned results depends upon JDBC driver support for scrollable ResultSets.You should call
ScrollableResults.close()after processing the ScrollableResults so that the underlying resources are deallocated right away.- 参数:
scrollMode- The scroll mode- 返回:
- the result iterator
- 另请参阅:
ScrollableResults,ScrollMode
-
list
List<R> list()
已过时。Return the query results as a List. If the query contains multiple results per row, the results are returned in an instance of Object[].- 返回:
- the result list
-
uniqueResult
R uniqueResult()
已过时。Convenience method to return a single instance that matches the query, ornullif the query returns no results.- 返回:
- the single result or null
- 抛出:
NonUniqueResultException- if there is more than one matching result
-
getParameterMetadata
ParameterMetadata getParameterMetadata()
已过时。Access to information about query parameters.- 返回:
- information about query parameters.
-
getNamedParameters
@Deprecated String[] getNamedParameters()
已过时。(since 5.2) useParameterMetadata.getNamedParameterNames()Return the names of all named parameters of the query.- 返回:
- the parameter names, in no particular order
-
setParameter
<T> Query<R> setParameter(QueryParameter<T> parameter, T val)
已过时。Bind a query parameter using its inferred Type. If the parameter is defined in such a way that the Type cannot be inferred from its usage context then use of this form of binding is not allowed, andsetParameter(QueryParameter, Object, Type)should be used instead- 参数:
parameter- The query parameter mementoval- the possibly-null parameter value- 返回:
this, for method chaining
-
setParameter
<T> Query<R> setParameter(javax.persistence.Parameter<T> param, T value)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中javax.persistence.TypedQuery<R>
-
setParameter
Query<R> setParameter(String name, Object val)
已过时。Bind a named query parameter using its inferred Type. If the parameter is defined in such a way that the Type cannot be inferred from its usage context then use of this form of binding is not allowed, andsetParameter(String, Object, Type)should be used instead- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中javax.persistence.TypedQuery<R>- 参数:
name- the parameter nameval- the (possibly-null) parameter value- 返回:
this, for method chaining
-
setParameter
Query<R> setParameter(int position, Object val)
已过时。Bind a positional query parameter using its inferred Type. If the parameter is defined in such a way that the Type cannot be inferred from its usage context then use of this form of binding is not allowed, andsetParameter(int, Object, Type)should be used instead- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中javax.persistence.TypedQuery<R>- 参数:
position- the position of the parameter in the query string, numbered from 0.val- the possibly-null parameter value- 返回:
this, for method chaining
-
setParameter
<P> Query<R> setParameter(QueryParameter<P> parameter, P val, Type type)
已过时。Bind a query parameter using the supplied Type- 参数:
parameter- The query parameter mementoval- the possibly-null parameter valuetype- the Hibernate type- 返回:
this, for method chaining
-
setParameter
Query<R> setParameter(String name, Object val, Type type)
已过时。Bind a named query parameter using the supplied Type- 参数:
name- the name of the parameterval- the possibly-null parameter valuetype- the Hibernate type- 返回:
this, for method chaining
-
setParameter
Query<R> setParameter(int position, Object val, Type type)
已过时。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 valuetype- the Hibernate type- 返回:
this, for method chaining
-
setParameter
<P> Query<R> setParameter(QueryParameter<P> parameter, P val, javax.persistence.TemporalType temporalType)
已过时。Bind a query parameter as some form of date/time using the indicated temporal-type.- 参数:
parameter- The query parameter mementoval- the possibly-null parameter valuetemporalType- the temporal-type to use in binding the date/time- 返回:
this, for method chaining
-
setParameter
<P> Query<R> setParameter(String name, P val, javax.persistence.TemporalType temporalType)
已过时。Bind a named query parameter as some form of date/time using the indicated temporal-type.- 参数:
name- the parameter nameval- the possibly-null parameter valuetemporalType- the temporal-type to use in binding the date/time- 返回:
this, for method chaining
-
setParameter
<P> Query<R> setParameter(int position, P val, javax.persistence.TemporalType temporalType)
已过时。Bind a positional query parameter as some form of date/time using the indicated temporal-type.- 参数:
position- the position of the parameter in the query string, numbered from 0.val- the possibly-null parameter valuetemporalType- the temporal-type to use in binding the date/time- 返回:
this, for method chaining
-
setParameterList
<P> Query<R> setParameterList(QueryParameter<P> parameter, Collection<P> values)
已过时。Bind multiple values to a query parameter using its inferred Type. The Hibernate type of the parameter values 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).- 参数:
parameter- the parameter mementovalues- a collection of values to list- 返回:
this, for method chaining
-
setParameterList
Query<R> setParameterList(String name, Collection values)
已过时。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 parametervalues- a collection of values to list- 返回:
this, for method chaining
-
setParameterList
Query<R> setParameterList(int position, Collection values)
已过时。
-
setParameterList
Query<R> setParameterList(String name, Collection values, 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).- 参数:
name- the name of the parametervalues- a collection of values to listtype- the Hibernate type of the values- 返回:
this, for method chaining
-
setParameterList
Query<R> setParameterList(int position, Collection values, Type type)
已过时。
-
setParameterList
Query<R> setParameterList(String name, Object[] values, 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).- 参数:
name- the name of the parametervalues- a collection of values to listtype- the Hibernate type of the values- 返回:
this, for method chaining
-
setParameterList
Query<R> setParameterList(String name, Object[] values)
已过时。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 parametervalues- a collection of values to list- 返回:
this, for method chaining
-
setProperties
Query<R> 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.- 参数:
bean- any JavaBean or POJO- 返回:
this, for method chaining
-
setProperties
Query<R> 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.- 参数:
bean- a java.util.Map- 返回:
this, for method chaining
-
setMaxResults
Query<R> setMaxResults(int maxResult)
已过时。- 指定者:
setMaxResults在接口中javax.persistence.Query- 指定者:
setMaxResults在接口中javax.persistence.TypedQuery<R>
-
setFirstResult
Query<R> setFirstResult(int startPosition)
已过时。- 指定者:
setFirstResult在接口中javax.persistence.Query- 指定者:
setFirstResult在接口中javax.persistence.TypedQuery<R>
-
setHint
Query<R> setHint(String hintName, Object value)
已过时。- 指定者:
setHint在接口中javax.persistence.Query- 指定者:
setHint在接口中javax.persistence.TypedQuery<R>
-
setParameter
Query<R> setParameter(javax.persistence.Parameter<Calendar> param, Calendar value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中javax.persistence.TypedQuery<R>
-
setParameter
Query<R> setParameter(javax.persistence.Parameter<Date> param, Date value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中javax.persistence.TypedQuery<R>
-
setParameter
Query<R> setParameter(String name, Calendar value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中javax.persistence.TypedQuery<R>
-
setParameter
Query<R> setParameter(String name, Date value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中javax.persistence.TypedQuery<R>
-
setParameter
Query<R> setParameter(int position, Calendar value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中javax.persistence.TypedQuery<R>
-
setParameter
Query<R> setParameter(int position, Date value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中javax.persistence.TypedQuery<R>
-
setFlushMode
Query<R> setFlushMode(javax.persistence.FlushModeType flushMode)
已过时。- 指定者:
setFlushMode在接口中javax.persistence.Query- 指定者:
setFlushMode在接口中javax.persistence.TypedQuery<R>
-
setLockMode
Query<R> setLockMode(javax.persistence.LockModeType lockMode)
已过时。- 指定者:
setLockMode在接口中javax.persistence.Query- 指定者:
setLockMode在接口中javax.persistence.TypedQuery<R>
-
setString
@Deprecated default Query<R> setString(int position, String val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional String-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setCharacter
@Deprecated default Query<R> setCharacter(int position, char val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional char-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setBoolean
@Deprecated default Query<R> setBoolean(int position, boolean val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional boolean-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setByte
@Deprecated default Query<R> setByte(int position, byte val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional byte-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setShort
@Deprecated default Query<R> setShort(int position, short val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional short-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setInteger
@Deprecated default Query<R> setInteger(int position, int val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional int-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setLong
@Deprecated default Query<R> setLong(int position, long val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional long-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setFloat
@Deprecated default Query<R> setFloat(int position, float val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional float-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setDouble
@Deprecated default Query<R> setDouble(int position, double val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional double-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setBinary
@Deprecated default Query<R> setBinary(int position, byte[] val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional binary-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setText
@Deprecated default Query<R> setText(int position, String val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional String-valued parameter using streaming.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setSerializable
@Deprecated default Query<R> setSerializable(int position, Serializable val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional binary-valued parameter using serialization.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setLocale
@Deprecated default Query<R> setLocale(int position, Locale val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional Locale-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setBigDecimal
@Deprecated default Query<R> setBigDecimal(int position, BigDecimal val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional BigDecimal-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setBigInteger
@Deprecated default Query<R> setBigInteger(int position, BigInteger val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional BigDecimal-valued parameter.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setDate
@Deprecated default Query<R> setDate(int position, Date val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional Date-valued parameter using just the Date portion.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setTime
@Deprecated default Query<R> setTime(int position, Date val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional Date-valued parameter using just the Time portion.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setTimestamp
@Deprecated default Query<R> setTimestamp(int position, Date val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional Date-valued parameter using the full Timestamp.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setCalendar
@Deprecated default Query<R> setCalendar(int position, Calendar val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional Calendar-valued parameter using the full Timestamp portion.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setCalendarDate
@Deprecated default Query<R> setCalendarDate(int position, Calendar val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a positional Calendar-valued parameter using just the Date portion.- 参数:
position- The parameter positionval- The bind value- 返回:
this, for method chaining
-
setString
@Deprecated default Query<R> setString(String name, String val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named String-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setCharacter
@Deprecated default Query<R> setCharacter(String name, char val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named char-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setBoolean
@Deprecated default Query<R> setBoolean(String name, boolean val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named boolean-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setByte
@Deprecated default Query<R> setByte(String name, byte val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named byte-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setShort
@Deprecated default Query<R> setShort(String name, short val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named short-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setInteger
@Deprecated default Query<R> setInteger(String name, int val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named int-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setLong
@Deprecated default Query<R> setLong(String name, long val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named long-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setFloat
@Deprecated default Query<R> setFloat(String name, float val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named float-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setDouble
@Deprecated default Query<R> setDouble(String name, double val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named double-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setBinary
@Deprecated default Query<R> setBinary(String name, byte[] val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named binary-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setText
@Deprecated default Query<R> setText(String name, String val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named String-valued parameter using streaming.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setSerializable
@Deprecated default Query<R> setSerializable(String name, Serializable val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named binary-valued parameter using serialization.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setLocale
@Deprecated default Query<R> setLocale(String name, Locale val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named Locale-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setBigDecimal
@Deprecated default Query<R> setBigDecimal(String name, BigDecimal val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named BigDecimal-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setBigInteger
@Deprecated default Query<R> setBigInteger(String name, BigInteger val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named BigInteger-valued parameter.- 参数:
name- The parameter nameval- The bind value- 返回:
this, for method chaining
-
setDate
@Deprecated default Query<R> setDate(String name, Date val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind the val (time is truncated) of a given Date object to a named query parameter.- 参数:
name- The name of the parameterval- The val object- 返回:
this, for method chaining
-
setTime
@Deprecated default Query<R> setTime(String name, Date val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind the time (val is truncated) of a given Date object to a named query parameter.- 参数:
name- The name of the parameterval- The val object- 返回:
this, for method chaining
-
setTimestamp
@Deprecated default Query<R> setTimestamp(String name, Date value)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind the value and the time of a given Date object to a named query parameter.- 参数:
name- The name of the parametervalue- The value object- 返回:
this, for method chaining
-
setCalendar
@Deprecated default Query<R> setCalendar(String name, Calendar value)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named Calendar-valued parameter using the full Timestamp.- 参数:
name- The parameter namevalue- The bind value- 返回:
this, for method chaining
-
setCalendarDate
@Deprecated default Query<R> setCalendarDate(String name, Calendar value)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind a named Calendar-valued parameter using just the Date portion.- 参数:
name- The parameter namevalue- The bind value- 返回:
this, for method chaining
-
setEntity
@Deprecated Query<R> setEntity(int position, Object val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind an instance of a mapped persistent class to a JDBC-style query parameter. UsesetParameter(int, Object)for null values.- 参数:
position- the position of the parameter in the query string, numbered from 0.val- a non-null instance of a persistent class- 返回:
this, for method chaining
-
setEntity
@Deprecated Query<R> setEntity(String name, Object val)
已过时。(since 5.2) usesetParameter(int, Object)orsetParameter(int, Object, Type)insteadBind an instance of a mapped persistent class to a named query parameter. UsesetParameter(String, Object)for null values.- 参数:
name- the name of the parameterval- a non-null instance of a persistent class- 返回:
this, for method chaining
-
determineProperBooleanType
@Deprecated Type determineProperBooleanType(int position, Object value, Type defaultType)
已过时。added only to allow default method definition for deprecated methods here.
-
determineProperBooleanType
@Deprecated Type determineProperBooleanType(String name, Object value, Type defaultType)
已过时。added only to allow default method definition for deprecated methods here.
-
setResultTransformer
@Deprecated Query<R> setResultTransformer(ResultTransformer transformer)
已过时。(since 5.2)Set a strategy for handling the query results. This can be used to change "shape" of the query result.- 参数:
transformer- The transformer to apply- 返回:
- this (for method chaining)
-
getReturnAliases
@Deprecated String[] getReturnAliases()
已过时。(since 5.2) useTupleif you need access to "result variables".
-
setParameters
@Deprecated default Query<R> setParameters(Object[] values, Type[] types)
已过时。(since 5.2) Bind values individuallyBind values and types to positional parameters. Allows binding more than one at a time; no real performance impact. The number of elements in each array should match. That is, element number-0 in types array corresponds to element-0 in the values array, etc,- 参数:
types- The typesvalues- The values- 返回:
this, for method chaining
-
-