类 NativeQueryImpl<T>
- java.lang.Object
-
- org.hibernate.query.internal.AbstractProducedQuery<T>
-
- org.hibernate.query.internal.NativeQueryImpl<T>
-
- 所有已实现的接口:
javax.persistence.Query,javax.persistence.TypedQuery<T>,BasicQueryContract<CommonQueryContract>,Query<T>,CommonQueryContract,NativeQuery<T>,Query<T>,NativeQueryImplementor<T>,QueryImplementor<T>,SQLQuery<T>,SynchronizeableQuery<T>
public class NativeQueryImpl<T> extends AbstractProducedQuery<T> implements NativeQueryImplementor<T>
- 作者:
- Steve Ebersole
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 org.hibernate.SQLQuery
SQLQuery.FetchReturn, SQLQuery.ReturnProperty, SQLQuery.RootReturn
-
-
构造器概要
构造器 构造器 说明 NativeQueryImpl(String sqlString, boolean callable, SharedSessionContractImplementor session, ParameterMetadata sqlParameterMetadata)NativeQueryImpl(NamedSQLQueryDefinition queryDef, SharedSessionContractImplementor session, ParameterMetadata parameterMetadata)Constructs a NativeQueryImpl given a sql query defined in the mappings.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 NativeQueryImplementor<T>addEntity(Class entityType)Declare a "root" entity, without specifying an alias.NativeQueryImplementor<T>addEntity(String entityName)Declare a "root" entity, without specifying an alias.NativeQueryImplementor<T>addEntity(String tableAlias, Class entityClass)Declare a "root" entity.NativeQueryImplementor<T>addEntity(String tableAlias, Class entityClass, LockMode lockMode)Declare a "root" entity, specifying a lock mode.NativeQueryImplementor<T>addEntity(String tableAlias, String entityName)Declare a "root" entity.NativeQueryImplementor<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.NativeQueryImplementor<T>addJoin(String tableAlias, String path)Declare a join fetch result.NativeQueryImplementor<T>addJoin(String tableAlias, String ownerTableAlias, String joinPropertyName)Declare a join fetch result.NativeQueryImplementor<T>addJoin(String tableAlias, String path, LockMode lockMode)Declare a join fetch result, specifying a lock mode.NativeQueryImplementor<T>addQueryHint(String hint)Add a DB query hint to the SQL.protected voidaddQuerySpaces(Serializable... spaces)protected voidaddQuerySpaces(String... spaces)protected voidaddReturnBuilder(NativeQueryReturnBuilder builder)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.NativeQueryImplementor<T>addScalar(String columnAlias)Declare a scalar query result.NativeQueryImplementor<T>addScalar(String columnAlias, Type type)Declare a scalar query result.NativeQueryImplementor<T>addSynchronizedEntityClass(Class entityClass)Adds an entity for (a) auto-flush checking and (b) query result cache invalidation checking.NativeQueryImplementor<T>addSynchronizedEntityName(String entityName)Adds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking.NativeQueryImplementor<T>addSynchronizedQuerySpace(String querySpace)Adds a query space.protected voidapplyEntityGraphQueryHint(EntityGraphQueryHint hint)Used from HEM code as a (hopefully temporary) means to apply a custom query plan in regards to a JPA entity graph.Query<T>applyGraph(RootGraph graph, GraphSemantic semantic)Apply the given graph using the given semanticprotected booleanapplyNativeQueryLockMode(Object value)protected voidbeforeQuery()protected voidcollectHints(Map<String,Object> hints)protected intdoExecuteUpdate()protected List<T>doList()protected ScrollableResultsImplementordoScroll(ScrollMode scrollMode)protected QueryParameterBindingsgetQueryParameterBindings()QueryParametersgetQueryParameters()List<NativeSQLQueryReturn>getQueryReturns()Retrieve the returns associated with this query.StringgetQueryString()Get the query string.String[]getReturnAliases()Type[]getReturnTypes()Return the Hibernate types of the query results.Collection<String>getSynchronizedQuerySpaces()Obtain the list of query spaces the query is synchronized on.booleanisCallable()Is this native-SQL query known to be callable?protected booleanisNativeQuery()Is the query represented here a native (SQL) query?Iterator<T>iterate()Return the query results as an Iterator.NativeQueryImplementor<T>setCacheable(boolean cacheable)Enable/disable second level query (result) caching for this query.NativeQueryImplementor<T>setCacheMode(CacheMode cacheMode)(Re)set the current CacheMode in effect for this query.NativeQueryImplementor<T>setCacheRegion(String cacheRegion)Set the name of the cache region where query results should be cached (if cached at all).NativeQueryImplementorsetCollectionKey(Serializable key)NativeQueryImplementor<T>setComment(String comment)Set the comment for this query.NativeQueryImplementor<T>setEntity(int position, Object val)Bind an instance of a mapped persistent class to a JDBC-style query parameter.NativeQueryImplementor<T>setEntity(String name, Object val)Bind an instance of a mapped persistent class to a named query parameter.NativeQueryImplementor<T>setFetchSize(int fetchSize)Sets a JDBC fetch size hint for the query.NativeQueryImplementor<T>setFirstResult(int startPosition)NativeQueryImplementor<T>setFlushMode(javax.persistence.FlushModeType flushModeType)NativeQueryImplementor<T>setFlushMode(FlushMode flushMode)(Re)set the current FlushMode in effect for this query.NativeQueryImplementor<T>setHibernateFlushMode(FlushMode flushMode)(Re)set the current FlushMode in effect for this query.NativeQueryImplementor<T>setHint(String hintName, Object value)NativeQueryImplementor<T>setLockMode(String alias, LockMode lockMode)Set the LockMode to use for specific alias (as defined in the query's FROM clause).NativeQueryImplementor<T>setLockMode(javax.persistence.LockModeType lockModeType)NativeQueryImplementor<T>setLockOptions(LockOptions lockOptions)Set the lock options for the query.NativeQueryImplementor<T>setMaxResults(int maxResult)NativeQueryImplementor<T>setParameter(int position, Object value)Bind a positional query parameter using its inferred Type.NativeQueryImplementor<T>setParameter(int position, Object value, javax.persistence.TemporalType temporalType)Bind a positional query parameter as some form of date/time using the indicated temporal-type.NativeQueryImplementor<T>setParameter(int position, Object value, Type type)Bind a value to a JDBC-style query parameter.NativeQueryImplementor<T>setParameter(int position, Instant value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(int position, LocalDateTime value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(int position, OffsetDateTime value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(int position, ZonedDateTime value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(int position, Calendar value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(int position, Date value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(String name, Object value)Bind a named query parameter using its inferred Type.NativeQueryImplementor<T>setParameter(String name, Object value, javax.persistence.TemporalType temporalType)Bind a named query parameter as some form of date/time using the indicated temporal-type.NativeQueryImplementor<T>setParameter(String name, Object value, Type type)Bind a named query parameter using the supplied TypeNativeQueryImplementor<T>setParameter(String name, Instant value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(String name, LocalDateTime value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(String name, OffsetDateTime value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(String name, ZonedDateTime value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(String name, Calendar value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(String name, Date value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(javax.persistence.Parameter<Instant> param, Instant value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(javax.persistence.Parameter<LocalDateTime> param, LocalDateTime value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(javax.persistence.Parameter<OffsetDateTime> param, OffsetDateTime value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(javax.persistence.Parameter<ZonedDateTime> param, ZonedDateTime value, javax.persistence.TemporalType temporalType)<P> NativeQueryImplementor<T>setParameter(javax.persistence.Parameter<P> parameter, P value)NativeQueryImplementor<T>setParameter(javax.persistence.Parameter param, Calendar value, javax.persistence.TemporalType temporalType)NativeQueryImplementor<T>setParameter(javax.persistence.Parameter param, Date value, javax.persistence.TemporalType temporalType)<P> NativeQueryImplementor<T>setParameter(QueryParameter<P> parameter, P value, javax.persistence.TemporalType temporalType)Bind a query parameter as some form of date/time using the indicated temporal-type.NativeQueryImplementor<T>setParameter(QueryParameter parameter, Object value)Bind a query parameter using its inferred Type.NativeQueryImplementor<T>setParameter(QueryParameter parameter, Object value, Type type)Bind a query parameter using the supplied TypeNativeQueryImplementor<T>setParameterList(String name, Object[] values)Bind multiple values to a named query parameter.NativeQueryImplementor<T>setParameterList(String name, Object[] values, Type type)Bind multiple values to a named query parameter.NativeQueryImplementor<T>setParameterList(String name, Collection values)Bind multiple values to a named query parameter.NativeQueryImplementor<T>setParameterList(String name, Collection values, Type type)Bind multiple values to a named query parameter.NativeQueryImplementor<T>setParameterList(QueryParameter parameter, Collection values)Bind multiple values to a query parameter using its inferred Type.NativeQueryImplementor<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.NativeQueryImplementor<T>setProperties(Map map)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.NativeQueryImplementor<T>setReadOnly(boolean readOnly)Set the read-only/modifiable mode for entities and proxies loaded by this Query.NativeQuerysetResultSetMapping(String name)Use a predefined named result-set mapping.NativeQueryImplementor<T>setResultTransformer(ResultTransformer transformer)Set a strategy for handling the query results.NativeQueryImplementor<T>setTimeout(int timeout)Set the query timeout in seconds.-
从类继承的方法 org.hibernate.query.internal.AbstractProducedQuery
afterQuery, applyAliasSpecificLockModeHint, applyCacheableHint, applyCacheModeHint, applyCacheRegionHint, applyCommentHint, applyFetchSizeHint, applyFlushModeHint, applyFollowOnLockingHint, applyHibernateLockModeHint, applyJpaCacheRetrieveMode, applyJpaCacheStoreMode, applyLockModeTypeHint, applyLockTimeoutHint, applyPassDistinctThrough, applyReadOnlyHint, applyTimeoutHint, canApplyAliasSpecificLockModeHints, collectBaselineHints, determineProperBooleanType, determineProperBooleanType, determineType, doIterate, executeUpdate, getCacheMode, getCacheRegion, getComment, getExceptionConverter, getFetchSize, getFirstResult, getFlushMode, getHibernateFlushMode, getHints, getLockMode, getLockOptions, getMaxResults, getNamedParameterMap, getNamedParameters, getParameter, getParameter, getParameter, getParameter, getParameterMetadata, getParameters, getParameterValue, getParameterValue, getParameterValue, getPositionalParameterTypes, getPositionalParameterValues, getProducer, getQueryOptions, getSingleResult, getSupportedHints, getTimeout, handleUnrecognizedHint, isBound, isCacheable, isReadOnly, list, makeQueryParametersForExecution, putIfNotNull, putIfNotNull, resolveEntityName, scroll, scroll, setOptionalEntityName, setOptionalId, setOptionalObject, setParameterList, setParameterList, setParameterList, setParameterList, stream, uniqueElement, uniqueResult, uniqueResultOptional, unwrap
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 javax.persistence.Query
executeUpdate, getFirstResult, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound, unwrap
-
从接口继承的方法 org.hibernate.Query
determineProperBooleanType, determineProperBooleanType, getFlushMode, getHibernateFirstResult, getHibernateMaxResults, getNamedParameters, getQueryOptions, getTimeout, isCacheable, isReadOnly, setHibernateFirstResult, setHibernateMaxResults, setParameterList, setParameterList, setParameterList, setParameterList
-
从接口继承的方法 org.hibernate.query.Query
applyFetchGraph, applyLoadGraph, getCacheMode, getCacheRegion, getComment, getFetchSize, getHibernateFlushMode, getLockOptions, getParameterMetadata, getResultList, getResultStream, getSingleResult, list, scroll, scroll, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBinary, setBinary, setBoolean, setBoolean, setByte, setByte, setCalendar, setCalendar, setCalendarDate, setCalendarDate, setCharacter, setCharacter, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInteger, setInteger, setLocale, setLocale, setLong, setLong, setParameters, setSerializable, setSerializable, setShort, setShort, setString, setString, setText, setText, setTime, setTime, setTimestamp, setTimestamp, stream, uniqueResult, uniqueResultOptional
-
从接口继承的方法 org.hibernate.query.spi.QueryImplementor
getProducer, setOptionalEntityName, setOptionalId, setOptionalObject
-
-
-
-
构造器详细资料
-
NativeQueryImpl
public NativeQueryImpl(NamedSQLQueryDefinition queryDef, SharedSessionContractImplementor session, ParameterMetadata parameterMetadata)
Constructs a NativeQueryImpl given a sql query defined in the mappings.- 参数:
queryDef- The representation of the defined. session- The session to which this NativeQuery belongs.parameterMetadata- Metadata about parameters found in the query.
-
NativeQueryImpl
public NativeQueryImpl(String sqlString, boolean callable, SharedSessionContractImplementor session, ParameterMetadata sqlParameterMetadata)
-
-
方法详细资料
-
getQueryParameterBindings
protected QueryParameterBindings getQueryParameterBindings()
- 指定者:
getQueryParameterBindings在类中AbstractProducedQuery<T>
-
setResultSetMapping
public NativeQuery setResultSetMapping(String name)
从接口复制的说明:SQLQueryUse a predefined named result-set mapping. This might be defined by a<result-set/>element in a Hibernate hbm.xml file or through aSqlResultSetMappingannotation.- 指定者:
setResultSetMapping在接口中NativeQuery<T>- 指定者:
setResultSetMapping在接口中SQLQuery<T>- 参数:
name- The name of the mapping to use.- 返回:
- this, for method chaining
-
getQueryString
public String getQueryString()
从接口复制的说明:QueryGet the query string.- 指定者:
getQueryString在接口中Query<T>- 指定者:
getQueryString在接口中Query<T>- 返回:
- the query string
-
isCallable
public boolean isCallable()
从接口复制的说明:SQLQueryIs this native-SQL query known to be callable?- 指定者:
isCallable在接口中NativeQuery<T>- 指定者:
isCallable在接口中SQLQuery<T>- 覆盖:
isCallable在类中AbstractProducedQuery<T>- 返回:
trueif the query is known to be callable;falseotherwise.
-
getQueryReturns
public List<NativeSQLQueryReturn> getQueryReturns()
从接口复制的说明:SQLQueryRetrieve the returns associated with this query.- 指定者:
getQueryReturns在接口中SQLQuery<T>- 返回:
- The return descriptors
-
doList
protected List<T> doList()
- 覆盖:
doList在类中AbstractProducedQuery<T>
-
getQueryParameters
public QueryParameters getQueryParameters()
- 覆盖:
getQueryParameters在类中AbstractProducedQuery<T>
-
doScroll
protected ScrollableResultsImplementor doScroll(ScrollMode scrollMode)
- 覆盖:
doScroll在类中AbstractProducedQuery<T>
-
beforeQuery
protected void beforeQuery()
- 覆盖:
beforeQuery在类中AbstractProducedQuery<T>
-
iterate
public Iterator<T> iterate()
从接口复制的说明:QueryReturn 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.
-
doExecuteUpdate
protected int doExecuteUpdate()
- 覆盖:
doExecuteUpdate在类中AbstractProducedQuery<T>
-
setCollectionKey
public NativeQueryImplementor setCollectionKey(Serializable key)
- 指定者:
setCollectionKey在接口中NativeQueryImplementor<T>
-
addScalar
public NativeQueryImplementor<T> addScalar(String columnAlias)
从接口复制的说明:SQLQueryDeclare a scalar query result. Hibernate will attempt to automatically detect the underlying type. Functions like<return-scalar/>inhbm.xmlorColumnResult- 指定者:
addScalar在接口中NativeQuery<T>- 指定者:
addScalar在接口中NativeQueryImplementor<T>- 指定者:
addScalar在接口中SQLQuery<T>- 参数:
columnAlias- The column alias in the result-set to be processed as a scalar result- 返回:
this, for method chaining
-
addScalar
public NativeQueryImplementor<T> addScalar(String columnAlias, Type type)
从接口复制的说明:SQLQueryDeclare a scalar query result. Functions like<return-scalar/>inhbm.xmlorColumnResult- 指定者:
addScalar在接口中NativeQuery<T>- 指定者:
addScalar在接口中NativeQueryImplementor<T>- 指定者:
addScalar在接口中SQLQuery<T>- 参数:
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
-
addReturnBuilder
protected void addReturnBuilder(NativeQueryReturnBuilder builder)
-
addRoot
public SQLQuery.RootReturn addRoot(String tableAlias, String entityName)
从接口复制的说明:SQLQueryAdd a new root return mapping, returning aSQLQuery.RootReturnto allow further definition.- 指定者:
addRoot在接口中NativeQuery<T>- 指定者:
addRoot在接口中NativeQueryImplementor<T>- 指定者:
addRoot在接口中SQLQuery<T>- 参数:
tableAlias- The SQL table alias to map to this entityentityName- The name of the entity.- 返回:
- The return config object for further control.
-
addRoot
public SQLQuery.RootReturn addRoot(String tableAlias, Class entityType)
从接口复制的说明:SQLQueryAdd a new root return mapping, returning aSQLQuery.RootReturnto allow further definition.
-
addEntity
public NativeQueryImplementor<T> addEntity(String entityName)
从接口复制的说明:SQLQueryDeclare a "root" entity, without specifying an alias. The expectation here is that the table alias is the same as the unqualified entity name UseSQLQuery.addRoot(java.lang.String, java.lang.String)if you need further control of the mapping- 指定者:
addEntity在接口中NativeQuery<T>- 指定者:
addEntity在接口中NativeQueryImplementor<T>- 指定者:
addEntity在接口中SQLQuery<T>- 参数:
entityName- The entity name that is the root return of the query.- 返回:
this, for method chaining
-
addEntity
public NativeQueryImplementor<T> addEntity(String tableAlias, String entityName)
从接口复制的说明:SQLQueryDeclare a "root" entity.- 指定者:
addEntity在接口中NativeQuery<T>- 指定者:
addEntity在接口中NativeQueryImplementor<T>- 指定者:
addEntity在接口中SQLQuery<T>- 参数:
tableAlias- The SQL table aliasentityName- The entity name- 返回:
this, for method chaining
-
addEntity
public NativeQueryImplementor<T> addEntity(String tableAlias, String entityName, LockMode lockMode)
从接口复制的说明:SQLQueryDeclare a "root" entity, specifying a lock mode.- 指定者:
addEntity在接口中NativeQuery<T>- 指定者:
addEntity在接口中NativeQueryImplementor<T>- 指定者:
addEntity在接口中SQLQuery<T>- 参数:
tableAlias- The SQL table aliasentityName- The entity namelockMode- The lock mode for this return.- 返回:
this, for method chaining
-
addEntity
public NativeQueryImplementor<T> addEntity(Class entityType)
从接口复制的说明:SQLQueryDeclare a "root" entity, without specifying an alias. The expectation here is that the table alias is the same as the unqualified entity name- 指定者:
addEntity在接口中NativeQuery<T>- 指定者:
addEntity在接口中NativeQueryImplementor<T>- 指定者:
addEntity在接口中SQLQuery<T>- 参数:
entityType- The java type of the entity to add as a root- 返回:
this, for method chaining
-
addEntity
public NativeQueryImplementor<T> addEntity(String tableAlias, Class entityClass)
从接口复制的说明:SQLQueryDeclare a "root" entity.- 指定者:
addEntity在接口中NativeQuery<T>- 指定者:
addEntity在接口中NativeQueryImplementor<T>- 指定者:
addEntity在接口中SQLQuery<T>- 参数:
tableAlias- The SQL table aliasentityClass- The java type of the entity to add as a root- 返回:
this, for method chaining
-
addEntity
public NativeQueryImplementor<T> addEntity(String tableAlias, Class entityClass, LockMode lockMode)
从接口复制的说明:SQLQueryDeclare a "root" entity, specifying a lock mode.- 指定者:
addEntity在接口中NativeQuery<T>- 指定者:
addEntity在接口中NativeQueryImplementor<T>- 指定者:
addEntity在接口中SQLQuery<T>- 参数:
tableAlias- The SQL table aliasentityClass- The entity ClasslockMode- The lock mode for this return.- 返回:
this, for method chaining
-
addFetch
public SQLQuery.FetchReturn addFetch(String tableAlias, String ownerTableAlias, String joinPropertyName)
从接口复制的说明:SQLQueryDeclare a join fetch result.- 指定者:
addFetch在接口中NativeQuery<T>- 指定者:
addFetch在接口中SQLQuery<T>- 参数:
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.
-
addJoin
public NativeQueryImplementor<T> addJoin(String tableAlias, String path)
从接口复制的说明:SQLQueryDeclare a join fetch result.- 指定者:
addJoin在接口中NativeQuery<T>- 指定者:
addJoin在接口中NativeQueryImplementor<T>- 指定者:
addJoin在接口中SQLQuery<T>- 参数:
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
public NativeQueryImplementor<T> addJoin(String tableAlias, String ownerTableAlias, String joinPropertyName)
从接口复制的说明:SQLQueryDeclare a join fetch result.- 指定者:
addJoin在接口中NativeQuery<T>- 指定者:
addJoin在接口中NativeQueryImplementor<T>- 指定者:
addJoin在接口中SQLQuery<T>- 参数:
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
-
addJoin
public NativeQueryImplementor<T> addJoin(String tableAlias, String path, LockMode lockMode)
从接口复制的说明:SQLQueryDeclare a join fetch result, specifying a lock mode.- 指定者:
addJoin在接口中NativeQuery<T>- 指定者:
addJoin在接口中NativeQueryImplementor<T>- 指定者:
addJoin在接口中SQLQuery<T>- 参数:
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
-
getReturnAliases
public String[] getReturnAliases()
- 指定者:
getReturnAliases在接口中Query<T>
-
getReturnTypes
public Type[] getReturnTypes()
从接口复制的说明:QueryReturn the Hibernate types of the query results.- 指定者:
getReturnTypes在接口中BasicQueryContract<T>- 指定者:
getReturnTypes在接口中Query<T>- 返回:
- an array of types
-
setEntity
public NativeQueryImplementor<T> setEntity(int position, Object val)
从接口复制的说明:QueryBind an instance of a mapped persistent class to a JDBC-style query parameter. UseQuery.setParameter(int, Object)for null values.
-
setEntity
public NativeQueryImplementor<T> setEntity(String name, Object val)
从接口复制的说明:QueryBind an instance of a mapped persistent class to a named query parameter. UseQuery.setParameter(String, Object)for null values.
-
getSynchronizedQuerySpaces
public Collection<String> getSynchronizedQuerySpaces()
从接口复制的说明:SynchronizeableQueryObtain the list of query spaces the query is synchronized on.- 指定者:
getSynchronizedQuerySpaces在接口中SynchronizeableQuery<T>- 返回:
- The list of query spaces upon which the query is synchronized.
-
addSynchronizedQuerySpace
public NativeQueryImplementor<T> addSynchronizedQuerySpace(String querySpace)
从接口复制的说明:SynchronizeableQueryAdds a query space.- 指定者:
addSynchronizedQuerySpace在接口中NativeQuery<T>- 指定者:
addSynchronizedQuerySpace在接口中NativeQueryImplementor<T>- 指定者:
addSynchronizedQuerySpace在接口中SQLQuery<T>- 指定者:
addSynchronizedQuerySpace在接口中SynchronizeableQuery<T>- 参数:
querySpace- The query space to be auto-flushed for this query.- 返回:
this, for method chaining
-
addQuerySpaces
protected void addQuerySpaces(String... spaces)
-
addQuerySpaces
protected void addQuerySpaces(Serializable... spaces)
-
addSynchronizedEntityName
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
addSynchronizedEntityName在接口中NativeQueryImplementor<T>- 指定者:
addSynchronizedEntityName在接口中SQLQuery<T>- 指定者:
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
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
addSynchronizedEntityClass在接口中NativeQueryImplementor<T>- 指定者:
addSynchronizedEntityClass在接口中SQLQuery<T>- 指定者:
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
-
isNativeQuery
protected boolean isNativeQuery()
从类复制的说明:AbstractProducedQueryIs the query represented here a native (SQL) query?- 指定者:
isNativeQuery在类中AbstractProducedQuery<T>- 返回:
trueif it is a native query;falseotherwise
-
setHibernateFlushMode
public NativeQueryImplementor<T> setHibernateFlushMode(FlushMode flushMode)
从接口复制的说明:Query(Re)set the current FlushMode in effect for this query.- 指定者:
setHibernateFlushMode在接口中BasicQueryContract<T>- 指定者:
setHibernateFlushMode在接口中NativeQuery<T>- 指定者:
setHibernateFlushMode在接口中NativeQueryImplementor<T>- 指定者:
setHibernateFlushMode在接口中Query<T>- 指定者:
setHibernateFlushMode在接口中Query<T>- 指定者:
setHibernateFlushMode在接口中SQLQuery<T>- 覆盖:
setHibernateFlushMode在类中AbstractProducedQuery<T>- 参数:
flushMode- The new FlushMode to use.- 返回:
this, for method chaining- 另请参阅:
Query.getHibernateFlushMode()
-
setFlushMode
public NativeQueryImplementor<T> setFlushMode(FlushMode flushMode)
从接口复制的说明:Query(Re)set the current FlushMode in effect for this query.- 指定者:
setFlushMode在接口中BasicQueryContract<T>- 指定者:
setFlushMode在接口中NativeQuery<T>- 指定者:
setFlushMode在接口中NativeQueryImplementor<T>- 指定者:
setFlushMode在接口中Query<T>- 指定者:
setFlushMode在接口中Query<T>- 指定者:
setFlushMode在接口中SQLQuery<T>- 覆盖:
setFlushMode在类中AbstractProducedQuery<T>- 参数:
flushMode- The new FlushMode to use.- 返回:
this, for method chaining- 另请参阅:
Query.getHibernateFlushMode()
-
setFlushMode
public NativeQueryImplementor<T> setFlushMode(javax.persistence.FlushModeType flushModeType)
- 指定者:
setFlushMode在接口中NativeQuery<T>- 指定者:
setFlushMode在接口中javax.persistence.Query- 指定者:
setFlushMode在接口中Query<T>- 指定者:
setFlushMode在接口中Query<T>- 指定者:
setFlushMode在接口中SQLQuery<T>- 指定者:
setFlushMode在接口中javax.persistence.TypedQuery<T>- 覆盖:
setFlushMode在类中AbstractProducedQuery<T>
-
setCacheMode
public NativeQueryImplementor<T> setCacheMode(CacheMode cacheMode)
从接口复制的说明:Query(Re)set the current CacheMode in effect for this query.- 指定者:
setCacheMode在接口中BasicQueryContract<T>- 指定者:
setCacheMode在接口中NativeQuery<T>- 指定者:
setCacheMode在接口中NativeQueryImplementor<T>- 指定者:
setCacheMode在接口中Query<T>- 指定者:
setCacheMode在接口中Query<T>- 指定者:
setCacheMode在接口中SQLQuery<T>- 覆盖:
setCacheMode在类中AbstractProducedQuery<T>- 参数:
cacheMode- The new CacheMode to use.- 返回:
this, for method chaining- 另请参阅:
Query.getCacheMode()
-
setCacheable
public NativeQueryImplementor<T> setCacheable(boolean cacheable)
从接口复制的说明:QueryEnable/disable second level query (result) caching for this query.- 指定者:
setCacheable在接口中BasicQueryContract<T>- 指定者:
setCacheable在接口中NativeQuery<T>- 指定者:
setCacheable在接口中NativeQueryImplementor<T>- 指定者:
setCacheable在接口中Query<T>- 指定者:
setCacheable在接口中Query<T>- 指定者:
setCacheable在接口中SQLQuery<T>- 覆盖:
setCacheable在类中AbstractProducedQuery<T>- 参数:
cacheable- Should the query results be cacheable?- 返回:
this, for method chaining- 另请参阅:
Query.isCacheable()
-
setCacheRegion
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
setCacheRegion在接口中NativeQueryImplementor<T>- 指定者:
setCacheRegion在接口中Query<T>- 指定者:
setCacheRegion在接口中Query<T>- 指定者:
setCacheRegion在接口中SQLQuery<T>- 覆盖:
setCacheRegion在类中AbstractProducedQuery<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
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
setTimeout在接口中NativeQueryImplementor<T>- 指定者:
setTimeout在接口中Query<T>- 指定者:
setTimeout在接口中Query<T>- 指定者:
setTimeout在接口中SQLQuery<T>- 覆盖:
setTimeout在类中AbstractProducedQuery<T>- 参数:
timeout- the timeout in seconds- 返回:
this, for method chaining- 另请参阅:
Query.getTimeout()
-
setFetchSize
public NativeQueryImplementor<T> setFetchSize(int fetchSize)
从接口复制的说明:QuerySets a JDBC fetch size hint for the query.- 指定者:
setFetchSize在接口中BasicQueryContract<T>- 指定者:
setFetchSize在接口中NativeQuery<T>- 指定者:
setFetchSize在接口中NativeQueryImplementor<T>- 指定者:
setFetchSize在接口中Query<T>- 指定者:
setFetchSize在接口中Query<T>- 指定者:
setFetchSize在接口中SQLQuery<T>- 覆盖:
setFetchSize在类中AbstractProducedQuery<T>- 参数:
fetchSize- the fetch size hint- 返回:
this, for method chaining- 另请参阅:
Query.getFetchSize()
-
setReadOnly
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
setReadOnly在接口中NativeQueryImplementor<T>- 指定者:
setReadOnly在接口中Query<T>- 指定者:
setReadOnly在接口中Query<T>- 指定者:
setReadOnly在接口中SQLQuery<T>- 覆盖:
setReadOnly在类中AbstractProducedQuery<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
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
setLockOptions在接口中NativeQueryImplementor<T>- 指定者:
setLockOptions在接口中Query<T>- 指定者:
setLockOptions在接口中Query<T>- 指定者:
setLockOptions在接口中SQLQuery<T>- 覆盖:
setLockOptions在类中AbstractProducedQuery<T>- 参数:
lockOptions- The lock options to apply to the query.- 返回:
this, for method chaining- 另请参阅:
Query.getLockOptions()
-
setLockMode
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
setLockMode在接口中NativeQueryImplementor<T>- 指定者:
setLockMode在接口中Query<T>- 指定者:
setLockMode在接口中Query<T>- 指定者:
setLockMode在接口中SQLQuery<T>- 覆盖:
setLockMode在类中AbstractProducedQuery<T>- 参数:
alias- a query alias, or"this"for a collection filterlockMode- The lock mode to apply.- 返回:
this, for method chaining- 另请参阅:
Query.getLockOptions()
-
setLockMode
public NativeQueryImplementor<T> setLockMode(javax.persistence.LockModeType lockModeType)
- 指定者:
setLockMode在接口中NativeQuery<T>- 指定者:
setLockMode在接口中javax.persistence.Query- 指定者:
setLockMode在接口中Query<T>- 指定者:
setLockMode在接口中Query<T>- 指定者:
setLockMode在接口中javax.persistence.TypedQuery<T>- 覆盖:
setLockMode在类中AbstractProducedQuery<T>
-
setComment
public NativeQueryImplementor<T> setComment(String comment)
从接口复制的说明:QuerySet the comment for this query.- 指定者:
setComment在接口中NativeQuery<T>- 指定者:
setComment在接口中NativeQueryImplementor<T>- 指定者:
setComment在接口中Query<T>- 指定者:
setComment在接口中Query<T>- 指定者:
setComment在接口中SQLQuery<T>- 覆盖:
setComment在类中AbstractProducedQuery<T>- 参数:
comment- The human-readable comment- 返回:
this, for method chaining- 另请参阅:
Query.getComment()
-
addQueryHint
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
addQueryHint在接口中NativeQueryImplementor<T>- 指定者:
addQueryHint在接口中Query<T>- 指定者:
addQueryHint在接口中Query<T>- 指定者:
addQueryHint在接口中SQLQuery<T>- 覆盖:
addQueryHint在类中AbstractProducedQuery<T>- 参数:
hint- The database specific query hint to add.
-
collectHints
protected void collectHints(Map<String,Object> hints)
- 覆盖:
collectHints在类中AbstractProducedQuery<T>
-
applyNativeQueryLockMode
protected boolean applyNativeQueryLockMode(Object value)
-
setParameter
public NativeQueryImplementor<T> setParameter(QueryParameter parameter, Object value)
从接口复制的说明: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在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>- 参数:
parameter- The query parameter mementovalue- the possibly-null parameter value- 返回:
this, for method chaining
-
setParameter
public <P> NativeQueryImplementor<T> setParameter(javax.persistence.Parameter<P> parameter, P value)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(String name, Object value)
从接口复制的说明: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在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>- 参数:
name- the parameter namevalue- the (possibly-null) parameter value- 返回:
this, for method chaining
-
setParameter
public NativeQueryImplementor<T> setParameter(int position, Object value)
从接口复制的说明: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在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>- 参数:
position- the position of the parameter in the query string, numbered from 0.value- the possibly-null parameter value- 返回:
this, for method chaining
-
setParameter
public NativeQueryImplementor<T> setParameter(QueryParameter parameter, Object value, Type type)
从接口复制的说明:QueryBind a query parameter using the supplied Type- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>- 参数:
parameter- The query parameter mementovalue- the possibly-null parameter valuetype- the Hibernate type- 返回:
this, for method chaining
-
setParameter
public NativeQueryImplementor<T> setParameter(String name, Object value, Type type)
从接口复制的说明:QueryBind a named query parameter using the supplied Type- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>- 参数:
name- the name of the parametervalue- the possibly-null parameter valuetype- the Hibernate type- 返回:
this, for method chaining
-
setParameter
public NativeQueryImplementor<T> setParameter(int position, Object value, Type type)
从接口复制的说明:QueryBind a value to a JDBC-style query parameter.- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>- 参数:
position- the position of the parameter in the query string, numbered from 0.value- the possibly-null parameter valuetype- the Hibernate type- 返回:
this, for method chaining
-
setParameter
public <P> NativeQueryImplementor<T> setParameter(QueryParameter<P> parameter, P value, javax.persistence.TemporalType temporalType)
从接口复制的说明:QueryBind a query parameter as some form of date/time using the indicated temporal-type.- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>- 参数:
parameter- The query parameter mementovalue- the possibly-null parameter valuetemporalType- the temporal-type to use in binding the date/time- 返回:
this, for method chaining
-
setParameter
public NativeQueryImplementor<T> setParameter(String name, Object value, javax.persistence.TemporalType temporalType)
从接口复制的说明:QueryBind a named query parameter as some form of date/time using the indicated temporal-type.- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>- 参数:
name- the parameter namevalue- the possibly-null parameter valuetemporalType- the temporal-type to use in binding the date/time- 返回:
this, for method chaining
-
setParameter
public NativeQueryImplementor<T> setParameter(int position, Object value, javax.persistence.TemporalType temporalType)
从接口复制的说明:QueryBind a positional query parameter as some form of date/time using the indicated temporal-type.- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>- 参数:
position- the position of the parameter in the query string, numbered from 0.value- the possibly-null parameter valuetemporalType- the temporal-type to use in binding the date/time- 返回:
this, for method chaining
-
setParameter
public NativeQueryImplementor<T> setParameter(javax.persistence.Parameter<Instant> param, Instant value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(javax.persistence.Parameter<LocalDateTime> param, LocalDateTime value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(javax.persistence.Parameter<ZonedDateTime> param, ZonedDateTime value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(javax.persistence.Parameter<OffsetDateTime> param, OffsetDateTime value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(String name, Instant value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(String name, LocalDateTime value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(String name, ZonedDateTime value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(String name, OffsetDateTime value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(int position, Instant value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(int position, LocalDateTime value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(int position, ZonedDateTime value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(int position, OffsetDateTime value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中Query<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameterList
public NativeQueryImplementor<T> setParameterList(QueryParameter parameter, Collection 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在接口中NativeQuery<T>- 指定者:
setParameterList在接口中NativeQueryImplementor<T>- 指定者:
setParameterList在接口中Query<T>- 指定者:
setParameterList在接口中Query<T>- 指定者:
setParameterList在接口中SQLQuery<T>- 覆盖:
setParameterList在类中AbstractProducedQuery<T>- 参数:
parameter- the parameter mementovalues- a collection of values to list- 返回:
this, for method chaining
-
setParameterList
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
setParameterList在接口中NativeQueryImplementor<T>- 指定者:
setParameterList在接口中Query<T>- 指定者:
setParameterList在接口中Query<T>- 指定者:
setParameterList在接口中SQLQuery<T>- 覆盖:
setParameterList在类中AbstractProducedQuery<T>- 参数:
name- the name of the parametervalues- a collection of values to list- 返回:
this, for method chaining
-
setParameterList
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
setParameterList在接口中NativeQueryImplementor<T>- 指定者:
setParameterList在接口中Query<T>- 指定者:
setParameterList在接口中Query<T>- 指定者:
setParameterList在接口中SQLQuery<T>- 覆盖:
setParameterList在类中AbstractProducedQuery<T>- 参数:
name- the name of the parametervalues- a collection of values to listtype- the Hibernate type of the values- 返回:
this, for method chaining
-
setParameterList
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
setParameterList在接口中NativeQueryImplementor<T>- 指定者:
setParameterList在接口中Query<T>- 指定者:
setParameterList在接口中Query<T>- 指定者:
setParameterList在接口中SQLQuery<T>- 覆盖:
setParameterList在类中AbstractProducedQuery<T>- 参数:
name- the name of the parametervalues- a collection of values to listtype- the Hibernate type of the values- 返回:
this, for method chaining
-
setParameterList
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
setParameterList在接口中NativeQueryImplementor<T>- 指定者:
setParameterList在接口中Query<T>- 指定者:
setParameterList在接口中Query<T>- 指定者:
setParameterList在接口中SQLQuery<T>- 覆盖:
setParameterList在类中AbstractProducedQuery<T>- 参数:
name- the name of the parametervalues- a collection of values to list- 返回:
this, for method chaining
-
setParameter
public NativeQueryImplementor<T> setParameter(javax.persistence.Parameter param, Calendar value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(javax.persistence.Parameter param, Date value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(String name, Calendar value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(String name, Date value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(int position, Calendar value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setParameter
public NativeQueryImplementor<T> setParameter(int position, Date value, javax.persistence.TemporalType temporalType)
- 指定者:
setParameter在接口中NativeQuery<T>- 指定者:
setParameter在接口中NativeQueryImplementor<T>- 指定者:
setParameter在接口中javax.persistence.Query- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中Query<T>- 指定者:
setParameter在接口中SQLQuery<T>- 指定者:
setParameter在接口中javax.persistence.TypedQuery<T>- 覆盖:
setParameter在类中AbstractProducedQuery<T>
-
setResultTransformer
public NativeQueryImplementor<T> setResultTransformer(ResultTransformer transformer)
从接口复制的说明:QuerySet a strategy for handling the query results. This can be used to change "shape" of the query result.- 指定者:
setResultTransformer在接口中Query<T>- 指定者:
setResultTransformer在接口中Query<T>- 覆盖:
setResultTransformer在类中AbstractProducedQuery<T>- 参数:
transformer- The transformer to apply- 返回:
- this (for method chaining)
-
setProperties
public NativeQueryImplementor<T> setProperties(Map map)
从接口复制的说明: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在接口中NativeQuery<T>- 指定者:
setProperties在接口中NativeQueryImplementor<T>- 指定者:
setProperties在接口中Query<T>- 指定者:
setProperties在接口中Query<T>- 指定者:
setProperties在接口中SQLQuery<T>- 覆盖:
setProperties在类中AbstractProducedQuery<T>- 参数:
map- a java.util.Map- 返回:
this, for method chaining
-
setProperties
public NativeQueryImplementor<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在接口中NativeQuery<T>- 指定者:
setProperties在接口中NativeQueryImplementor<T>- 指定者:
setProperties在接口中Query<T>- 指定者:
setProperties在接口中Query<T>- 指定者:
setProperties在接口中SQLQuery<T>- 覆盖:
setProperties在类中AbstractProducedQuery<T>- 参数:
bean- any JavaBean or POJO- 返回:
this, for method chaining
-
setMaxResults
public NativeQueryImplementor<T> setMaxResults(int maxResult)
- 指定者:
setMaxResults在接口中NativeQuery<T>- 指定者:
setMaxResults在接口中javax.persistence.Query- 指定者:
setMaxResults在接口中Query<T>- 指定者:
setMaxResults在接口中Query<T>- 指定者:
setMaxResults在接口中javax.persistence.TypedQuery<T>- 覆盖:
setMaxResults在类中AbstractProducedQuery<T>
-
setFirstResult
public NativeQueryImplementor<T> setFirstResult(int startPosition)
- 指定者:
setFirstResult在接口中NativeQuery<T>- 指定者:
setFirstResult在接口中javax.persistence.Query- 指定者:
setFirstResult在接口中Query<T>- 指定者:
setFirstResult在接口中Query<T>- 指定者:
setFirstResult在接口中javax.persistence.TypedQuery<T>- 覆盖:
setFirstResult在类中AbstractProducedQuery<T>
-
setHint
public NativeQueryImplementor<T> setHint(String hintName, Object value)
-
applyGraph
public Query<T> applyGraph(RootGraph graph, GraphSemantic semantic)
从接口复制的说明:QueryApply the given graph using the given semantic- 指定者:
applyGraph在接口中Query<T>- 覆盖:
applyGraph在类中AbstractProducedQuery<T>- 参数:
graph- The graph the apply.semantic- The semantic to use when applying the graph- 返回:
- this - for method chaining
-
applyEntityGraphQueryHint
protected void applyEntityGraphQueryHint(EntityGraphQueryHint hint)
从类复制的说明:AbstractProducedQueryUsed from HEM code as a (hopefully temporary) means to apply a custom query plan in regards to a JPA entity graph.- 覆盖:
applyEntityGraphQueryHint在类中AbstractProducedQuery<T>- 参数:
hint- The entity graph hint object
-
-