程序包 org.hibernate
接口 SQLQuery<T>
-
- 所有超级接口:
BasicQueryContract<CommonQueryContract>,CommonQueryContract,javax.persistence.Query,Query<T>,SynchronizeableQuery<T>,javax.persistence.TypedQuery<T>
- 所有已知子接口:
NativeQuery<T>,NativeQueryImplementor<T>
- 所有已知实现类:
NativeQueryImpl
@Deprecated public interface SQLQuery<T> extends Query<T>, SynchronizeableQuery<T>
已过时。(since 5.2) useNativeQueryinstead.Represents a "native sql" query. Allows the user to define certain aspects about its execution, such as:- result-set value mapping (see below)
-
Tables used via
addSynchronizedQuerySpace(java.lang.String),addSynchronizedEntityName(java.lang.String)andaddSynchronizedEntityClass(java.lang.Class). This allows Hibernate to know how to properly deal with auto-flush checking as well as cached query results if the results of the query are being cached.
- If this represents a named sql query, the mapping could be associated with the query as part of its metadata
-
A pre-defined (defined in metadata and named) mapping can be associated with
setResultSetMapping(java.lang.String) -
Defined locally per the various
addEntity(java.lang.String),addRoot(java.lang.String, java.lang.String),addJoin(java.lang.String, java.lang.String),addFetch(java.lang.String, java.lang.String, java.lang.String)andaddScalar(java.lang.String)methods
- 作者:
- Gavin King, Steve Ebersole
-
-
嵌套类概要
嵌套类 修饰符和类型 接口 说明 static interfaceSQLQuery.FetchReturn已过时。Allows access to further control how join fetch returns are mapped back from result sets.static interfaceSQLQuery.ReturnProperty已过时。Allows access to further control how properties within a root or join fetch are mapped back from the result set.static interfaceSQLQuery.RootReturn已过时。Allows access to further control how root returns are mapped back from result sets.
-
方法概要
所有方法 实例方法 抽象方法 已过时的方法 修饰符和类型 方法 说明 SQLQuery<T>addEntity(Class entityType)已过时。Declare a "root" entity, without specifying an alias.SQLQuery<T>addEntity(String entityName)已过时。Declare a "root" entity, without specifying an alias.SQLQuery<T>addEntity(String tableAlias, Class entityType)已过时。Declare a "root" entity.SQLQuery<T>addEntity(String tableAlias, Class entityClass, LockMode lockMode)已过时。Declare a "root" entity, specifying a lock mode.SQLQuery<T>addEntity(String tableAlias, String entityName)已过时。Declare a "root" entity.SQLQuery<T>addEntity(String tableAlias, String entityName, LockMode lockMode)已过时。Declare a "root" entity, specifying a lock mode.SQLQuery.FetchReturnaddFetch(String tableAlias, String ownerTableAlias, String joinPropertyName)已过时。Declare a join fetch result.SQLQuery<T>addJoin(String tableAlias, String path)已过时。Declare a join fetch result.SQLQuery<T>addJoin(String tableAlias, String ownerTableAlias, String joinPropertyName)已过时。Declare a join fetch result.SQLQuery<T>addJoin(String tableAlias, String path, LockMode lockMode)已过时。Declare a join fetch result, specifying a lock mode.NativeQuery<T>addQueryHint(String hint)已过时。Add a DB query hint to the SQL.SQLQuery.RootReturnaddRoot(String tableAlias, Class entityType)已过时。Add a new root return mapping, returning aSQLQuery.RootReturnto allow further definition.SQLQuery.RootReturnaddRoot(String tableAlias, String entityName)已过时。Add a new root return mapping, returning aSQLQuery.RootReturnto allow further definition.SQLQuery<T>addScalar(String columnAlias)已过时。Declare a scalar query result.SQLQuery<T>addScalar(String columnAlias, Type type)已过时。Declare a scalar query result.SQLQuery<T>addSynchronizedEntityClass(Class entityClass)已过时。Adds an entity for (a) auto-flush checking and (b) query result cache invalidation checking.SQLQuery<T>addSynchronizedEntityName(String entityName)已过时。Adds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking.SQLQuery<T>addSynchronizedQuerySpace(String querySpace)已过时。Adds a query space.List<NativeSQLQueryReturn>getQueryReturns()已过时。Retrieve the returns associated with this query.booleanisCallable()已过时。Is this native-SQL query known to be callable?NativeQuery<T>setCacheable(boolean cacheable)已过时。Enable/disable second level query (result) caching for this query.NativeQuery<T>setCacheMode(CacheMode cacheMode)已过时。(Re)set the current CacheMode in effect for this query.NativeQuery<T>setCacheRegion(String cacheRegion)已过时。Set the name of the cache region where query results should be cached (if cached at all).NativeQuery<T>setComment(String comment)已过时。Set the comment for this query.NativeQuery<T>setFetchSize(int fetchSize)已过时。Sets a JDBC fetch size hint for the query.NativeQuery<T>setFlushMode(javax.persistence.FlushModeType flushMode)已过时。NativeQuery<T>setFlushMode(FlushMode flushMode)已过时。(Re)set the current FlushMode in effect for this query.NativeQuery<T>setHibernateFlushMode(FlushMode flushMode)已过时。(Re)set the current FlushMode in effect for this query.NativeQuery<T>setLockMode(String alias, LockMode lockMode)已过时。Set the LockMode to use for specific alias (as defined in the query's FROM clause).NativeQuery<T>setLockOptions(LockOptions lockOptions)已过时。Set the lock options for the query.NativeQuery<T>setParameter(int position, Object val)已过时。Bind a positional query parameter using its inferred Type.NativeQuery<T>setParameter(int position, Object val, Type type)已过时。Bind a value to a JDBC-style query parameter.NativeQuery<T>setParameter(int position, Calendar value, javax.persistence.TemporalType temporalType)已过时。NativeQuery<T>setParameter(int position, Date value, javax.persistence.TemporalType temporalType)已过时。<P> NativeQuery<T>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.NativeQuery<T>setParameter(String name, Object val)已过时。Bind a named query parameter using its inferred Type.NativeQuery<T>setParameter(String name, Object val, Type type)已过时。Bind a named query parameter using the supplied TypeNativeQuery<T>setParameter(String name, Calendar value, javax.persistence.TemporalType temporalType)已过时。NativeQuery<T>setParameter(String name, Date value, javax.persistence.TemporalType temporalType)已过时。<P> NativeQuery<T>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.NativeQuery<T>setParameter(javax.persistence.Parameter<Calendar> param, Calendar value, javax.persistence.TemporalType temporalType)已过时。NativeQuery<T>setParameter(javax.persistence.Parameter<Date> param, Date value, javax.persistence.TemporalType temporalType)已过时。<P> NativeQuery<T>setParameter(javax.persistence.Parameter<P> param, P value)已过时。<P> NativeQuery<T>setParameter(QueryParameter<P> parameter, P val)已过时。Bind a query parameter using its inferred Type.<P> NativeQuery<T>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> NativeQuery<T>setParameter(QueryParameter<P> parameter, P val, Type type)已过时。Bind a query parameter using the supplied TypeNativeQuery<T>setParameterList(String name, Object[] values)已过时。Bind multiple values to a named query parameter.NativeQuery<T>setParameterList(String name, Object[] values, Type type)已过时。Bind multiple values to a named query parameter.NativeQuery<T>setParameterList(String name, Collection values)已过时。Bind multiple values to a named query parameter.NativeQuery<T>setParameterList(String name, Collection values, Type type)已过时。Bind multiple values to a named query parameter.<P> NativeQuery<T>setParameterList(QueryParameter<P> parameter, Collection<P> values)已过时。Bind multiple values to a query parameter using its inferred Type.NativeQuery<T>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.NativeQuery<T>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.NativeQuery<T>setReadOnly(boolean readOnly)已过时。Set the read-only/modifiable mode for entities and proxies loaded by this Query.SQLQuery<T>setResultSetMapping(String name)已过时。Use a predefined named result-set mapping.NativeQuery<T>setTimeout(int timeout)已过时。Set the query timeout in seconds.-
从接口继承的方法 javax.persistence.Query
executeUpdate, getFirstResult, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound, unwrap
-
从接口继承的方法 org.hibernate.Query
determineProperBooleanType, determineProperBooleanType, getCacheMode, getCacheRegion, getComment, getFetchSize, getFlushMode, getHibernateFirstResult, getHibernateFlushMode, getHibernateMaxResults, getLockOptions, getNamedParameters, getParameterMetadata, getQueryOptions, getQueryString, getReturnAliases, getReturnTypes, getTimeout, isCacheable, isReadOnly, iterate, list, scroll, scroll, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBinary, setBinary, setBoolean, setBoolean, setByte, setByte, setCalendar, setCalendar, setCalendarDate, setCalendarDate, setCharacter, setCharacter, setDate, setDate, setDouble, setDouble, setEntity, setEntity, setFirstResult, setFloat, setFloat, setHibernateFirstResult, setHibernateMaxResults, setHint, setInteger, setInteger, setLocale, setLocale, setLockMode, setLong, setLong, setMaxResults, setParameterList, setParameterList, setParameterList, setParameterList, setParameters, setResultTransformer, setSerializable, setSerializable, setShort, setShort, setString, setString, setText, setText, setTime, setTime, setTimestamp, setTimestamp, uniqueResult
-
从接口继承的方法 org.hibernate.SynchronizeableQuery
getSynchronizedQuerySpaces
-
-
-
-
方法详细资料
-
setResultSetMapping
SQLQuery<T> setResultSetMapping(String name)
已过时。Use a predefined named result-set mapping. This might be defined by a<result-set/>element in a Hibernate hbm.xml file or through aSqlResultSetMappingannotation.- 参数:
name- The name of the mapping to use.- 返回:
- this, for method chaining
-
isCallable
boolean isCallable()
已过时。Is this native-SQL query known to be callable?- 返回:
trueif the query is known to be callable;falseotherwise.
-
getQueryReturns
List<NativeSQLQueryReturn> getQueryReturns()
已过时。Retrieve the returns associated with this query.- 返回:
- The return descriptors
-
addScalar
SQLQuery<T> addScalar(String columnAlias)
已过时。Declare a scalar query result. Hibernate will attempt to automatically detect the underlying type. Functions like<return-scalar/>inhbm.xmlorColumnResult- 参数:
columnAlias- The column alias in the result-set to be processed as a scalar result- 返回:
this, for method chaining
-
addScalar
SQLQuery<T> addScalar(String columnAlias, Type type)
已过时。Declare a scalar query result. Functions like<return-scalar/>inhbm.xmlorColumnResult- 参数:
columnAlias- The column alias in the result-set to be processed as a scalar resulttype- The Hibernate type as which to treat the value.- 返回:
this, for method chaining
-
addRoot
SQLQuery.RootReturn addRoot(String tableAlias, String entityName)
已过时。Add a new root return mapping, returning aSQLQuery.RootReturnto allow further definition.- 参数:
tableAlias- The SQL table alias to map to this entityentityName- The name of the entity.- 返回:
- The return config object for further control.
- 从以下版本开始:
- 3.6
-
addRoot
SQLQuery.RootReturn addRoot(String tableAlias, Class entityType)
已过时。Add a new root return mapping, returning aSQLQuery.RootReturnto allow further definition.- 参数:
tableAlias- The SQL table alias to map to this entityentityType- The java type of the entity.- 返回:
- The return config object for further control.
- 从以下版本开始:
- 3.6
-
addEntity
SQLQuery<T> addEntity(String entityName)
已过时。Declare a "root" entity, without specifying an alias. The expectation here is that the table alias is the same as the unqualified entity name UseaddRoot(java.lang.String, java.lang.String)if you need further control of the mapping- 参数:
entityName- The entity name that is the root return of the query.- 返回:
this, for method chaining
-
addEntity
SQLQuery<T> addEntity(String tableAlias, String entityName)
已过时。Declare a "root" entity.- 参数:
tableAlias- The SQL table aliasentityName- The entity name- 返回:
this, for method chaining
-
addEntity
SQLQuery<T> addEntity(String tableAlias, String entityName, LockMode lockMode)
已过时。Declare a "root" entity, specifying a lock mode.- 参数:
tableAlias- The SQL table aliasentityName- The entity namelockMode- The lock mode for this return.- 返回:
this, for method chaining
-
addEntity
SQLQuery<T> addEntity(Class entityType)
已过时。Declare a "root" entity, without specifying an alias. The expectation here is that the table alias is the same as the unqualified entity name- 参数:
entityType- The java type of the entity to add as a root- 返回:
this, for method chaining
-
addEntity
SQLQuery<T> addEntity(String tableAlias, Class entityType)
已过时。Declare a "root" entity.- 参数:
tableAlias- The SQL table aliasentityType- The java type of the entity to add as a root- 返回:
this, for method chaining
-
addEntity
SQLQuery<T> addEntity(String tableAlias, Class entityClass, LockMode lockMode)
已过时。Declare a "root" entity, specifying a lock mode.- 参数:
tableAlias- The SQL table aliasentityClass- The entity ClasslockMode- The lock mode for this return.- 返回:
this, for method chaining
-
addFetch
SQLQuery.FetchReturn addFetch(String tableAlias, String ownerTableAlias, String joinPropertyName)
已过时。Declare a join fetch result.- 参数:
tableAlias- The SQL table alias for the data to be mapped to this fetchownerTableAlias- Identify the table alias of the owner of this association. Should match the alias of a previously added root or fetchjoinPropertyName- The name of the property being join fetched.- 返回:
- The return config object for further control.
- 从以下版本开始:
- 3.6
-
addJoin
SQLQuery<T> addJoin(String tableAlias, String path)
已过时。Declare a join fetch result.- 参数:
tableAlias- The SQL table alias for the data to be mapped to this fetchpath- The association path ([owner-alias].[property-name]).- 返回:
this, for method chaining
-
addJoin
SQLQuery<T> addJoin(String tableAlias, String ownerTableAlias, String joinPropertyName)
已过时。Declare a join fetch result.- 参数:
tableAlias- The SQL table alias for the data to be mapped to this fetchownerTableAlias- Identify the table alias of the owner of this association. Should match the alias of a previously added root or fetchjoinPropertyName- The name of the property being join fetched.- 返回:
this, for method chaining- 从以下版本开始:
- 3.6
-
addJoin
SQLQuery<T> addJoin(String tableAlias, String path, LockMode lockMode)
已过时。Declare a join fetch result, specifying a lock mode.- 参数:
tableAlias- The SQL table alias for the data to be mapped to this fetchpath- The association path ([owner-alias].[property-name]).lockMode- The lock mode for this return.- 返回:
this, for method chaining
-
addSynchronizedQuerySpace
SQLQuery<T> addSynchronizedQuerySpace(String querySpace)
已过时。从接口复制的说明:SynchronizeableQueryAdds a query space.- 指定者:
addSynchronizedQuerySpace在接口中SynchronizeableQuery<T>- 参数:
querySpace- The query space to be auto-flushed for this query.- 返回:
this, for method chaining
-
addSynchronizedEntityName
SQLQuery<T> addSynchronizedEntityName(String entityName) throws MappingException
已过时。从接口复制的说明:SynchronizeableQueryAdds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking. Same asSynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String)for all tables associated with the given entity.- 指定者:
addSynchronizedEntityName在接口中SynchronizeableQuery<T>- 参数:
entityName- The name of the entity upon whose defined query spaces we should additionally synchronize.- 返回:
this, for method chaining- 抛出:
MappingException- Indicates the given name could not be resolved as an entity
-
addSynchronizedEntityClass
SQLQuery<T> addSynchronizedEntityClass(Class entityClass) throws MappingException
已过时。从接口复制的说明:SynchronizeableQueryAdds an entity for (a) auto-flush checking and (b) query result cache invalidation checking. Same asSynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String)for all tables associated with the given entity.- 指定者:
addSynchronizedEntityClass在接口中SynchronizeableQuery<T>- 参数:
entityClass- The class of the entity upon whose defined query spaces we should additionally synchronize.- 返回:
this, for method chaining- 抛出:
MappingException- Indicates the given class could not be resolved as an entity
-
setHibernateFlushMode
NativeQuery<T> setHibernateFlushMode(FlushMode flushMode)
已过时。从接口复制的说明:Query(Re)set the current FlushMode in effect for this query.- 指定者:
setHibernateFlushMode在接口中BasicQueryContract<T>- 指定者:
setHibernateFlushMode在接口中Query<T>- 参数:
flushMode- The new FlushMode to use.- 返回:
this, for method chaining- 另请参阅:
Query.getHibernateFlushMode()
-
setFlushMode
NativeQuery<T> setFlushMode(javax.persistence.FlushModeType flushMode)
已过时。- 指定者:
setFlushMode在接口中javax.persistence.Query- 指定者:
setFlushMode在接口中Query<T>- 指定者:
setFlushMode在接口中javax.persistence.TypedQuery<T>
-
setCacheMode
NativeQuery<T> setCacheMode(CacheMode cacheMode)
已过时。从接口复制的说明:Query(Re)set the current CacheMode in effect for this query.- 指定者:
setCacheMode在接口中BasicQueryContract<T>- 指定者:
setCacheMode在接口中Query<T>- 参数:
cacheMode- The new CacheMode to use.- 返回:
this, for method chaining- 另请参阅:
Query.getCacheMode()
-
setCacheable
NativeQuery<T> setCacheable(boolean cacheable)
已过时。从接口复制的说明:QueryEnable/disable second level query (result) caching for this query.- 指定者:
setCacheable在接口中BasicQueryContract<T>- 指定者:
setCacheable在接口中Query<T>- 参数:
cacheable- Should the query results be cacheable?- 返回:
this, for method chaining- 另请参阅:
Query.isCacheable()
-
setCacheRegion
NativeQuery<T> setCacheRegion(String cacheRegion)
已过时。从接口复制的说明:QuerySet the name of the cache region where query results should be cached (if cached at all).- 指定者:
setCacheRegion在接口中BasicQueryContract<T>- 指定者:
setCacheRegion在接口中Query<T>- 参数:
cacheRegion- the name of a query cache region, ornullto indicate that the default region should be used.- 返回:
this, for method chaining- 另请参阅:
Query.getCacheRegion()
-
setTimeout
NativeQuery<T> setTimeout(int timeout)
已过时。从接口复制的说明:QuerySet 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<T>- 指定者:
setTimeout在接口中Query<T>- 参数:
timeout- the timeout in seconds- 返回:
this, for method chaining- 另请参阅:
Query.getTimeout()
-
setFetchSize
NativeQuery<T> setFetchSize(int fetchSize)
已过时。从接口复制的说明:QuerySets a JDBC fetch size hint for the query.- 指定者:
setFetchSize在接口中BasicQueryContract<T>- 指定者:
setFetchSize在接口中Query<T>- 参数:
fetchSize- the fetch size hint- 返回:
this, for method chaining- 另请参阅:
Query.getFetchSize()
-
setReadOnly
NativeQuery<T> setReadOnly(boolean readOnly)
已过时。从接口复制的说明:QuerySet 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<T>- 指定者:
setReadOnly在接口中Query<T>- 参数:
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.
-
setLockOptions
NativeQuery<T> setLockOptions(LockOptions lockOptions)
已过时。从接口复制的说明:QuerySet the lock options for the query. Specifically only the following are taken into consideration: For alias-specific locking, useQuery.setLockMode(String, LockMode).- 指定者:
setLockOptions在接口中Query<T>- 参数:
lockOptions- The lock options to apply to the query.- 返回:
this, for method chaining- 另请参阅:
Query.getLockOptions()
-
setLockMode
NativeQuery<T> setLockMode(String alias, LockMode lockMode)
已过时。从接口复制的说明:QuerySet 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).- 指定者:
setLockMode在接口中Query<T>- 参数:
alias- a query alias, or"this"for a collection filterlockMode- The lock mode to apply.- 返回:
this, for method chaining- 另请参阅:
Query.getLockOptions()
-
setComment
NativeQuery<T> setComment(String comment)
已过时。从接口复制的说明:QuerySet the comment for this query.- 指定者:
setComment在接口中Query<T>- 参数:
comment- The human-readable comment- 返回:
this, for method chaining- 另请参阅:
Query.getComment()
-
addQueryHint
NativeQuery<T> addQueryHint(String hint)
已过时。从接口复制的说明:QueryAdd 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.- 指定者:
addQueryHint在接口中Query<T>- 参数:
hint- The database specific query hint to add.
-
setParameter
<P> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val)
已过时。从接口复制的说明:QueryBind 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, andQuery.setParameter(QueryParameter, Object, Type)should be used instead- 指定者:
setParameter在接口中Query<T>- 参数:
parameter- The query parameter mementoval- the possibly-null parameter value- 返回:
this, for method chaining
-
setParameter
<P> NativeQuery<T> setParameter(javax.persistence.Parameter<P> param, P value)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>
-
setParameter
NativeQuery<T> setParameter(String name, Object val)
已过时。从接口复制的说明:QueryBind 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, andQuery.setParameter(String, Object, Type)should be used instead- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 参数:
name- the parameter nameval- the (possibly-null) parameter value- 返回:
this, for method chaining
-
setParameter
NativeQuery<T> setParameter(int position, Object val)
已过时。从接口复制的说明:QueryBind 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, andQuery.setParameter(int, Object, Type)should be used instead- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 参数:
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> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val, Type type)
已过时。从接口复制的说明:QueryBind a query parameter using the supplied Type- 指定者:
setParameter在接口中Query<T>- 参数:
parameter- The query parameter mementoval- the possibly-null parameter valuetype- the Hibernate type- 返回:
this, for method chaining
-
setParameter
NativeQuery<T> setParameter(String name, Object val, Type type)
已过时。从接口复制的说明:QueryBind a named query parameter using the supplied Type- 指定者:
setParameter在接口中Query<T>- 参数:
name- the name of the parameterval- the possibly-null parameter valuetype- the Hibernate type- 返回:
this, for method chaining
-
setParameter
NativeQuery<T> setParameter(int position, Object val, Type type)
已过时。从接口复制的说明:QueryBind a value to a JDBC-style query parameter.- 指定者:
setParameter在接口中Query<T>- 参数:
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> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val, javax.persistence.TemporalType temporalType)
已过时。从接口复制的说明:QueryBind a query parameter as some form of date/time using the indicated temporal-type.- 指定者:
setParameter在接口中Query<T>- 参数:
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> NativeQuery<T> setParameter(String name, P val, javax.persistence.TemporalType temporalType)
已过时。从接口复制的说明:QueryBind a named query parameter as some form of date/time using the indicated temporal-type.- 指定者:
setParameter在接口中Query<T>- 参数:
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> NativeQuery<T> setParameter(int position, P val, javax.persistence.TemporalType temporalType)
已过时。从接口复制的说明:QueryBind a positional query parameter as some form of date/time using the indicated temporal-type.- 指定者:
setParameter在接口中Query<T>- 参数:
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> NativeQuery<T> setParameterList(QueryParameter<P> parameter, Collection<P> values)
已过时。从接口复制的说明:QueryBind 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).- 指定者:
setParameterList在接口中Query<T>- 参数:
parameter- the parameter mementovalues- a collection of values to list- 返回:
this, for method chaining
-
setParameterList
NativeQuery<T> setParameterList(String name, Collection values)
已过时。从接口复制的说明:QueryBind 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).- 指定者:
setParameterList在接口中Query<T>- 参数:
name- the name of the parametervalues- a collection of values to list- 返回:
this, for method chaining
-
setParameterList
NativeQuery<T> setParameterList(String name, Collection values, Type type)
已过时。从接口复制的说明:QueryBind 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).- 指定者:
setParameterList在接口中Query<T>- 参数:
name- the name of the parametervalues- a collection of values to listtype- the Hibernate type of the values- 返回:
this, for method chaining
-
setParameterList
NativeQuery<T> setParameterList(String name, Object[] values, Type type)
已过时。从接口复制的说明:QueryBind 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).- 指定者:
setParameterList在接口中Query<T>- 参数:
name- the name of the parametervalues- a collection of values to listtype- the Hibernate type of the values- 返回:
this, for method chaining
-
setParameterList
NativeQuery<T> setParameterList(String name, Object[] values)
已过时。从接口复制的说明:QueryBind 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).- 指定者:
setParameterList在接口中Query<T>- 参数:
name- the name of the parametervalues- a collection of values to list- 返回:
this, for method chaining
-
setProperties
NativeQuery<T> setProperties(Object bean)
已过时。从接口复制的说明:QueryBind 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.- 指定者:
setProperties在接口中Query<T>- 参数:
bean- any JavaBean or POJO- 返回:
this, for method chaining
-
setProperties
NativeQuery<T> setProperties(Map bean)
已过时。从接口复制的说明:QueryBind 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.- 指定者:
setProperties在接口中Query<T>- 参数:
bean- a java.util.Map- 返回:
this, for method chaining
-
setParameter
NativeQuery<T> setParameter(javax.persistence.Parameter<Calendar> param, Calendar value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>
-
setParameter
NativeQuery<T> setParameter(javax.persistence.Parameter<Date> param, Date value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>
-
setParameter
NativeQuery<T> setParameter(String name, Calendar value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>
-
setParameter
NativeQuery<T> setParameter(String name, Date value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>
-
setParameter
NativeQuery<T> setParameter(int position, Calendar value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>
-
setParameter
NativeQuery<T> setParameter(int position, Date value, javax.persistence.TemporalType temporalType)
已过时。- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>
-
setFlushMode
NativeQuery<T> setFlushMode(FlushMode flushMode)
已过时。从接口复制的说明:Query(Re)set the current FlushMode in effect for this query.- 指定者:
setFlushMode在接口中BasicQueryContract<T>- 指定者:
setFlushMode在接口中Query<T>- 参数:
flushMode- The new FlushMode to use.- 返回:
this, for method chaining- 另请参阅:
Query.getHibernateFlushMode()
-
-