Class NativeQueryImpl<R>
- java.lang.Object
-
- org.hibernate.query.spi.AbstractCommonQueryContract
-
- org.hibernate.query.spi.AbstractSelectionQuery<R>
-
- org.hibernate.query.spi.AbstractQuery<R>
-
- org.hibernate.query.sql.internal.NativeQueryImpl<R>
-
- All Implemented Interfaces:
Query
,TypedQuery<R>
,CommonQueryContract
,ResultSetMappingResolutionContext
,MutationQuery
,NameableQuery
,NativeQuery<R>
,Query<R>
,SelectionQuery<R>
,DomainQueryExecutionContext
,QueryImplementor<R>
,NativeQueryImplementor<R>
,SynchronizeableQuery
public class NativeQueryImpl<R> extends AbstractQuery<R> implements NativeQueryImplementor<R>, DomainQueryExecutionContext, ResultSetMappingResolutionContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.query.NativeQuery
NativeQuery.CollectionReturn, NativeQuery.FetchReturn, NativeQuery.InstantiationResultNode<J>, NativeQuery.ResultNode, NativeQuery.ReturnableResultNode, NativeQuery.ReturnProperty, NativeQuery.RootReturn
-
-
Field Summary
-
Fields inherited from class org.hibernate.query.spi.AbstractQuery
log
-
Fields inherited from class org.hibernate.query.spi.AbstractSelectionQuery
CRITERIA_HQL_STRING
-
-
Constructor Summary
Constructors Constructor Description NativeQueryImpl(String sqlString, SharedSessionContractImplementor session)
NativeQueryImpl(String sqlString, NamedResultSetMappingMemento resultSetMappingMemento, AbstractSharedSessionContract session)
NativeQueryImpl(NamedNativeQueryMemento memento, Class<R> resultJavaType, SharedSessionContractImplementor session)
Constructs a NativeQueryImpl given a sql query defined in the mappings.NativeQueryImpl(NamedNativeQueryMemento memento, String resultSetMappingName, SharedSessionContractImplementor session)
Constructs a NativeQueryImpl given a sql query defined in the mappings.NativeQueryImpl(NamedNativeQueryMemento memento, Supplier<ResultSetMapping> resultSetMappingCreator, org.hibernate.query.sql.internal.NativeQueryImpl.ResultSetMappingHandler resultSetMappingHandler, SharedSessionContractImplementor session)
NativeQueryImpl(NamedNativeQueryMemento memento, SharedSessionContractImplementor session)
Constructs a NativeQueryImpl given a sql query defined in the mappings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description NativeQueryImplementor<R>
addAttributeResult(String columnAlias, SingularAttribute attribute)
Defines a result based on a specified attribute.NativeQueryImplementor<R>
addAttributeResult(String columnAlias, Class entityJavaType, String attributePath)
Defines a result based on a specified attribute.NativeQueryImplementor<R>
addAttributeResult(String columnAlias, String entityName, String attributePath)
Defines a result based on a specified attribute.NativeQueryImplementor<R>
addEntity(Class entityType)
Declare a "root" entity, without specifying an alias.NativeQueryImplementor<R>
addEntity(Class<R> entityType, LockMode lockMode)
NativeQueryImplementor<R>
addEntity(String entityName)
Declare a "root" entity, without specifying an alias.NativeQueryImplementor<R>
addEntity(String tableAlias, Class entityClass)
Declare a "root" entity.NativeQueryImplementor<R>
addEntity(String tableAlias, Class entityClass, LockMode lockMode)
Declare a "root" entity, specifying a lock mode.NativeQueryImplementor<R>
addEntity(String tableAlias, String entityName)
Declare a "root" entity.NativeQueryImplementor<R>
addEntity(String tableAlias, String entityName, LockMode lockMode)
Declare a "root" entity, specifying a lock mode.NativeQuery.FetchReturn
addFetch(String tableAlias, String ownerTableAlias, String joinPropertyName)
Declare a join fetch result.<J> NativeQuery.InstantiationResultNode<J>
addInstantiation(Class<J> targetJavaType)
NativeQueryImplementor<R>
addJoin(String tableAlias, String path)
Declare a join fetch result.NativeQueryImplementor<R>
addJoin(String tableAlias, String ownerTableAlias, String joinPropertyName)
Declare a join fetch result.NativeQueryImplementor<R>
addJoin(String tableAlias, String path, LockMode lockMode)
Declare a join fetch result, specifying a lock mode.NativeQueryImplementor<R>
addQueryHint(String hint)
Add a database query hint to the SQL query.protected void
addQuerySpaces(Serializable... spaces)
protected void
addQuerySpaces(String... spaces)
void
addResultTypeClass(Class<?> resultClass)
DynamicResultBuilderEntityStandard
addRoot(String tableAlias, Class entityType)
Add a new root return mapping, returning aNativeQuery.RootReturn
to allow further definition.DynamicResultBuilderEntityStandard
addRoot(String tableAlias, String entityName)
Add a new root return mapping, returning aNativeQuery.RootReturn
to allow further definition.NativeQueryImplementor<R>
addScalar(int position, Class<?> type)
NativeQueryImplementor<R>
addScalar(String columnAlias)
Declare a scalar query result.NativeQueryImplementor<R>
addScalar(String columnAlias, Class javaType)
Declare a scalar query result using the specified result type.<C> NativeQueryImplementor<R>
addScalar(String columnAlias, Class<C> jdbcJavaType, AttributeConverter<?,C> converter)
Declare a scalar query result with an explicit conversion.<C> NativeQueryImplementor<R>
addScalar(String columnAlias, Class<C> relationalJavaType, Class<? extends AttributeConverter<?,C>> converter)
Declare a scalar query result with an explicit conversion.<O,J>
NativeQueryImplementor<R>addScalar(String columnAlias, Class<O> domainJavaType, Class<J> jdbcJavaType, AttributeConverter<O,J> converter)
Declare a scalar query result with an explicit conversion.<O,J>
NativeQueryImplementor<R>addScalar(String columnAlias, Class<O> domainJavaType, Class<J> jdbcJavaType, Class<? extends AttributeConverter<O,J>> converterJavaType)
Declare a scalar query result with an explicit conversion.NativeQueryImplementor<R>
addScalar(String columnAlias, BasicDomainType type)
Declare a scalar query result.NativeQuery<R>
addScalar(String columnAlias, BasicTypeReference type)
Declare a scalar query result.NativeQueryImplementor<R>
addSynchronizedEntityClass(Class entityClass)
Add all query spaces associated with the entity with the given type.NativeQueryImplementor<R>
addSynchronizedEntityName(String entityName)
Add all query spaces associated with the entity with the given names.NativeQueryImplementor<R>
addSynchronizedQuerySpace(String querySpace)
Add a query space.protected void
applyEntityGraphHint(String hintName, Object value)
protected void
applyGraph(String graphString, GraphSemantic graphSemantic)
Query<R>
applyGraph(RootGraph graph, GraphSemantic semantic)
Apply the given graph using the given semanticprotected void
applyGraph(RootGraphImplementor<?> entityGraph, GraphSemantic graphSemantic)
protected void
applyOptions(NamedNativeQueryMemento memento)
protected void
applySynchronizeSpace(Object value)
protected void
applySynchronizeSpacesHint(Object value)
protected void
collectHints(Map<String,Object> hints)
static int
determineBindValueMaxCount(boolean paddingEnabled, int inExprLimit, int bindValueCount)
protected int
doExecuteUpdate()
protected List<R>
doList()
protected ScrollableResultsImplementor<R>
doScroll(ScrollMode scrollMode)
protected String
expandParameterLists()
protected NonSelectInterpretationsKey
generateNonSelectInterpretationsKey()
Callback
getCallback()
The callback referenceLockModeType
getLockMode()
Get the rootLockModeType
for the queryQueryParameterBindings
getParameterBindings()
ParameterMetadataImplementor
getParameterMetadata()
Access to information about query parameters.List<ParameterOccurrence>
getParameterOccurrences()
MutableQueryOptions
getQueryOptions()
Get the execution options for thisQuery
.QueryParameterBindings
getQueryParameterBindings()
The domain parameter bindingsString
getQueryString()
The query as a string, ornull
in the case of a criteria query.Collection<String>
getSynchronizedQuerySpaces()
Obtain the list of query spaces this query is synchronized with.boolean
hasCallbackActions()
Boolean
isSelectQuery()
Best guess whether this is a select query.protected void
prepareForExecution()
protected NativeQueryImplementor<R>
registerBuilder(ResultBuilder builder)
protected SelectQueryPlan<R>
resolveSelectQueryPlan()
NativeQueryImplementor<R>
setCacheable(boolean cacheable)
Enable/disable second level query (result) caching for this query.NativeQueryImplementor<R>
setCacheMode(CacheMode cacheMode)
Set the currentCacheMode
in effect for this query.NativeQueryImplementor<R>
setCacheRegion(String cacheRegion)
Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()
).NativeQueryImplementor<R>
setCacheRetrieveMode(CacheRetrieveMode cacheRetrieveMode)
NativeQueryImplementor<R>
setCacheStoreMode(CacheStoreMode cacheStoreMode)
NativeQueryImplementor<R>
setComment(String comment)
Set a comment for this query.NativeQueryImplementor<R>
setFetchSize(int fetchSize)
Sets a JDBC fetch size hint for the query.NativeQueryImplementor<R>
setFirstResult(int startPosition)
Set the first row position to return from the query results.NativeQueryImplementor<R>
setFlushMode(FlushModeType flushModeType)
Set theFlushMode
in to use for this query.NativeQueryImplementor<R>
setHibernateFlushMode(FlushMode flushMode)
Set the currentFlushMode
in effect for this query.NativeQueryImplementor<R>
setHibernateLockMode(LockMode lockMode)
Specify the root LockMode for the queryNativeQueryImplementor<R>
setHint(String hintName, Object value)
Set a hint.NativeQueryImplementor<R>
setLockMode(LockModeType lockModeType)
Specify the root LockModeType for the queryNativeQueryImplementor<R>
setLockMode(String alias, LockMode lockMode)
Specify aLockMode
to apply to a specific alias defined in the queryNativeQueryImplementor<R>
setLockOptions(LockOptions lockOptions)
Apply the given lock options to this query.NativeQueryImplementor<R>
setMaxResults(int maxResult)
Set the max number of rows requested for the query results.Query<R>
setOrder(List<Order<? super R>> orderList)
If the result type of this query is an entity class, add one or more rules for ordering the query results.Query<R>
setOrder(Order<? super R> order)
If the result type of this query is an entity class, add a rule for ordering the query results.NativeQueryImplementor<R>
setParameter(int position, Object value)
Bind the given argument to an ordinal query parameter.NativeQueryImplementor<R>
setParameter(int position, Instant value, TemporalType temporalType)
Bind anInstant
to an ordinal query parameter using just the portion indicated by the givenTemporalType
.NativeQueryImplementor<R>
setParameter(int position, Calendar value, TemporalType temporalType)
Query
overrideNativeQueryImplementor<R>
setParameter(int position, Date value, TemporalType temporalType)
Query
override<P> NativeQueryImplementor<R>
setParameter(int position, P value, Class<P> javaTypeClass)
Bind the given argument to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
.<P> NativeQueryImplementor<R>
setParameter(int position, P value, BindableType<P> type)
Bind the given argument to an ordinal query parameter using the givenBindableType
.NativeQueryImplementor<R>
setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType)
Query
overrideNativeQueryImplementor<R>
setParameter(Parameter<Date> param, Date value, TemporalType temporalType)
Query
override<P> NativeQueryImplementor<R>
setParameter(Parameter<P> parameter, P value)
Query
overrideNativeQueryImplementor<R>
setParameter(String name, Object value)
Bind the given argument to a named query parameter.NativeQueryImplementor<R>
setParameter(String name, Instant value, TemporalType temporalType)
Bind anInstant
to the named query parameter using just the portion indicated by the givenTemporalType
.NativeQueryImplementor<R>
setParameter(String name, Calendar value, TemporalType temporalType)
Query
overrideNativeQueryImplementor<R>
setParameter(String name, Date value, TemporalType temporalType)
Query
override<P> NativeQueryImplementor<R>
setParameter(String name, P value, Class<P> javaTypeClass)
Bind the given argument to a named query parameter using the givenClass
reference to attempt to infer theBindableType
.<P> NativeQueryImplementor<R>
setParameter(String name, P value, BindableType<P> type)
Bind the given argument to a named query parameter using the givenBindableType
.<P> NativeQueryImplementor<R>
setParameter(QueryParameter<P> parameter, P value)
Bind an argument to the query parameter represented by the givenQueryParameter
.<P> NativeQueryImplementor<R>
setParameter(QueryParameter<P> parameter, P value, Class<P> javaTypeClass)
Bind an argument to the query parameter represented by the givenQueryParameter
, using the givenClass
reference to attempt to infer theBindableType
to use.<P> NativeQueryImplementor<R>
setParameter(QueryParameter<P> parameter, P value, BindableType<P> type)
Bind an argument to the query parameter represented by the givenQueryParameter
, using the givenBindableType
.NativeQueryImplementor<R>
setParameterList(int position, Object[] values)
Bind multiple arguments to an ordinal query parameter.NativeQueryImplementor<R>
setParameterList(int position, Collection values)
Bind multiple arguments to an ordinal query parameter.<P> NativeQueryImplementor<R>
setParameterList(int position, Collection<? extends P> values, Class<P> javaTypeClass)
Bind multiple arguments to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
.<P> NativeQueryImplementor<R>
setParameterList(int position, Collection<? extends P> values, BindableType<P> type)
Bind multiple arguments to an ordinal query parameter using the givenBindableType
.<P> NativeQueryImplementor<R>
setParameterList(int position, P[] values, Class<P> javaTypeClass)
Bind multiple arguments to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
.<P> NativeQueryImplementor<R>
setParameterList(int position, P[] values, BindableType<P> type)
Bind multiple arguments to an ordinal query parameter using the givenBindableType
.NativeQueryImplementor<R>
setParameterList(String name, Object[] values)
Bind multiple arguments to a named query parameter.NativeQueryImplementor<R>
setParameterList(String name, Collection values)
Bind multiple arguments to a named query parameter.<P> NativeQueryImplementor<R>
setParameterList(String name, Collection<? extends P> values, Class<P> javaTypeClass)
Bind multiple arguments to a named query parameter using the givenClass
reference to attempt to infer theBindableType
If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameterList(String, Collection)
.<P> NativeQueryImplementor<R>
setParameterList(String name, Collection<? extends P> values, BindableType<P> type)
Bind multiple arguments to a named query parameter using the givenBindableType
.<P> NativeQueryImplementor<R>
setParameterList(String name, P[] values, Class<P> javaTypeClass)
Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine theBindableType
to use.<P> NativeQueryImplementor<R>
setParameterList(String name, P[] values, BindableType<P> type)
Bind multiple arguments to a named query parameter using the givenBindableType
.<P> NativeQueryImplementor<R>
setParameterList(QueryParameter<P> parameter, Collection<? extends P> values)
Bind multiple arguments to the query parameter represented by the givenQueryParameter
.<P> NativeQueryImplementor<R>
setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaTypeClass)
Bind multiple arguments to the query parameter represented by the givenQueryParameter
using the givenClass
reference to attempt to infer theBindableType
to use.<P> NativeQueryImplementor<R>
setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type)
Bind multiple arguments to the query parameter represented by the givenQueryParameter
, using the givenBindableType
.<P> NativeQueryImplementor<R>
setParameterList(QueryParameter<P> parameter, P[] values)
Bind multiple arguments to the query parameter represented by the givenQueryParameter
.<P> NativeQueryImplementor<R>
setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaTypeClass)
Bind multiple arguments to the query parameter represented by the givenQueryParameter
using the givenClass
reference to attempt to infer theBindableType
to use.<P> NativeQueryImplementor<R>
setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type)
Bind multiple arguments to the query parameter represented by the givenQueryParameter
, using the given theBindableType
.NativeQueryImplementor<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.NativeQueryImplementor<R>
setProperties(Map map)
Bind the values of the givenMap
to named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.NativeQueryImplementor<R>
setQueryPlanCacheable(boolean queryPlanCacheable)
Enable/disable query plan caching for this query.NativeQueryImplementor<R>
setReadOnly(boolean readOnly)
Set the read-only/modifiable mode for entities and proxies loaded by thisQuery
.NativeQueryImplementor<R>
setResultListTransformer(ResultListTransformer<R> transformer)
Set aResultListTransformer
.<S> NativeQueryImplementor<S>
setResultTransformer(ResultTransformer<S> transformer)
Deprecated.NativeQueryImplementor<R>
setTimeout(int timeout)
Set the query timeout in seconds.<T> NativeQueryImplementor<T>
setTupleTransformer(TupleTransformer<T> transformer)
Set aTupleTransformer
.NamedNativeQueryMemento
toMemento(String name)
Convert the query into the memento<T> T
unwrap(Class<T> javaType)
-
Methods inherited from class org.hibernate.query.spi.AbstractQuery
applyOptions, disableFetchProfile, enableFetchProfile, executeUpdate, getComment, getFirstResult, getFlushMode, getLockOptions, getMaxResults, getParameters, getSupportedHints, isCacheable, resolveJdbcParameterTypeIfNecessary, setEntityGraph, setOptionalEntityName, setOptionalId, setOptionalObject
-
Methods inherited from class org.hibernate.query.spi.AbstractSelectionQuery
afterQuery, afterQuery, afterQueryHandlingFetchProfiles, applyOptions, beforeQuery, beforeQueryHandlingFetchProfiles, buildTupleMetadata, checkQueryReturnType, getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFetchSize, getHibernateLockMode, getSessionFactory, getSingleResult, getSingleResultOrNull, hasAppliedGraph, hasLimit, isQueryPlanCacheable, isReadOnly, list, requiresTxn, resetCallback, scroll, scroll, setAliasSpecificLockMode, setFollowOnLocking, stream, uniqueElement, uniqueResult, uniqueResultOptional, verifyResultType, visitQueryReturnType
-
Methods inherited from class org.hibernate.query.spi.AbstractCommonQueryContract
applyAdditionalPossibleHints, applyAliasSpecificLockModeHint, applyCacheableHint, applyCacheModeHint, applyCacheRegionHint, applyCommentHint, applyFetchSizeHint, applyFirstResult, applyFlushModeHint, applyFollowOnLockingHint, applyHibernateLockMode, applyHint, applyJpaCacheRetrieveModeHint, applyJpaCacheStoreModeHint, applyJpaFlushMode, applyLockModeHint, applyLockModeType, applyLockTimeoutHint, applyLockTimeoutHint, applyMaxResults, applyQueryPlanCacheableHint, applyResultListTransformer, applySelectionHint, applyTimeoutHint, applyTupleTransformer, determineType, getHibernateFlushMode, getHints, getIntegerLiteral, getJpaFlushMode, getMaxRows, getParameter, getParameter, getParameter, getParameter, getParameterValue, getParameterValue, getParameterValue, getSession, getTimeout, isBound, locateBinding, locateBinding, locateBinding, locateBinding, putIfNotNull, putIfNotNull
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.CommonQueryContract
getFlushMode, getHibernateFlushMode, getTimeout
-
Methods inherited from interface org.hibernate.query.spi.DomainQueryExecutionContext
getSession
-
Methods inherited from interface org.hibernate.query.NativeQuery
getHibernateLockMode, getLockOptions
-
Methods inherited from interface jakarta.persistence.Query
getFirstResult, getFlushMode, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound
-
Methods inherited from interface org.hibernate.query.Query
applyFetchGraph, applyLoadGraph, disableFetchProfile, enableFetchProfile, executeUpdate, getComment, getResultList, getResultStream, getSingleResult, list, setEntityGraph, setPage, stream, uniqueResult, uniqueResultOptional
-
Methods inherited from interface org.hibernate.query.spi.QueryImplementor
getSession, scroll, scroll, setOptionalEntityName, setOptionalId, setOptionalObject
-
Methods inherited from interface org.hibernate.query.internal.ResultSetMappingResolutionContext
getSessionFactory
-
Methods inherited from interface org.hibernate.query.SelectionQuery
getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFetchSize, getFirstResult, getMaxResults, getSingleResultOrNull, isCacheable, isQueryPlanCacheable, isReadOnly, setAliasSpecificLockMode, setFollowOnLocking
-
-
-
-
Constructor Detail
-
NativeQueryImpl
public NativeQueryImpl(NamedNativeQueryMemento memento, SharedSessionContractImplementor session)
Constructs a NativeQueryImpl given a sql query defined in the mappings.
-
NativeQueryImpl
public NativeQueryImpl(NamedNativeQueryMemento memento, Supplier<ResultSetMapping> resultSetMappingCreator, org.hibernate.query.sql.internal.NativeQueryImpl.ResultSetMappingHandler resultSetMappingHandler, SharedSessionContractImplementor session)
-
NativeQueryImpl
public NativeQueryImpl(NamedNativeQueryMemento memento, Class<R> resultJavaType, SharedSessionContractImplementor session)
Constructs a NativeQueryImpl given a sql query defined in the mappings.
-
NativeQueryImpl
public NativeQueryImpl(NamedNativeQueryMemento memento, String resultSetMappingName, SharedSessionContractImplementor session)
Constructs a NativeQueryImpl given a sql query defined in the mappings.
-
NativeQueryImpl
public NativeQueryImpl(String sqlString, NamedResultSetMappingMemento resultSetMappingMemento, AbstractSharedSessionContract session)
-
NativeQueryImpl
public NativeQueryImpl(String sqlString, SharedSessionContractImplementor session)
-
-
Method Detail
-
getParameterOccurrences
public List<ParameterOccurrence> getParameterOccurrences()
-
applyOptions
protected void applyOptions(NamedNativeQueryMemento memento)
-
getQueryString
public String getQueryString()
Description copied from interface:Query
The query as a string, ornull
in the case of a criteria query.- Specified by:
getQueryString
in interfaceQuery<R>
- Specified by:
getQueryString
in classAbstractSelectionQuery<R>
-
getParameterMetadata
public ParameterMetadataImplementor getParameterMetadata()
Description copied from interface:Query
Access to information about query parameters.- Specified by:
getParameterMetadata
in interfaceQuery<R>
- Specified by:
getParameterMetadata
in classAbstractCommonQueryContract
- Returns:
- information about query parameters.
-
getQueryOptions
public MutableQueryOptions getQueryOptions()
Description copied from interface:Query
Get the execution options for thisQuery
. Many of the setters of this object update the state of the returnedQueryOptions
. This is useful because it gives access to s primitive value in its (nullable) wrapper form, rather than the primitive form as required by JPA. This allows us to distinguish whether a value has been explicitly set by the client.- Specified by:
getQueryOptions
in interfaceDomainQueryExecutionContext
- Specified by:
getQueryOptions
in interfaceQuery<R>
- Overrides:
getQueryOptions
in classAbstractQuery<R>
- Returns:
- Return the encapsulation of this query's options.
-
getCallback
public Callback getCallback()
Description copied from interface:DomainQueryExecutionContext
The callback reference- Specified by:
getCallback
in interfaceDomainQueryExecutionContext
- Overrides:
getCallback
in classAbstractSelectionQuery<R>
-
hasCallbackActions
public boolean hasCallbackActions()
- Specified by:
hasCallbackActions
in interfaceDomainQueryExecutionContext
- Overrides:
hasCallbackActions
in classAbstractSelectionQuery<R>
-
getQueryParameterBindings
public QueryParameterBindings getQueryParameterBindings()
Description copied from interface:DomainQueryExecutionContext
The domain parameter bindings- Specified by:
getQueryParameterBindings
in interfaceDomainQueryExecutionContext
- Specified by:
getQueryParameterBindings
in classAbstractCommonQueryContract
-
getParameterBindings
public QueryParameterBindings getParameterBindings()
- Specified by:
getParameterBindings
in interfaceQueryImplementor<R>
-
toMemento
public NamedNativeQueryMemento toMemento(String name)
Description copied from interface:NameableQuery
Convert the query into the memento- Specified by:
toMemento
in interfaceNameableQuery
- Specified by:
toMemento
in interfaceNativeQueryImplementor<R>
-
getLockMode
public LockModeType getLockMode()
Description copied from interface:SelectionQuery
Get the rootLockModeType
for the query- Specified by:
getLockMode
in interfaceNativeQuery<R>
- Specified by:
getLockMode
in interfaceQuery
- Specified by:
getLockMode
in interfaceSelectionQuery<R>
- Overrides:
getLockMode
in classAbstractQuery<R>
- See Also:
SelectionQuery.getHibernateLockMode()
-
setLockOptions
public NativeQueryImplementor<R> setLockOptions(LockOptions lockOptions)
Description copied from interface:Query
Apply the given lock options to this query. Alias-specific lock modes in the given lock options are merged with any alias-specific lock mode which have already been set. If a lock mode has already been specified for an alias that is among the aliases in the given lock options, the lock mode specified in the given lock options overrides the lock mode that was already set.- Specified by:
setLockOptions
in interfaceNativeQuery<R>
- Specified by:
setLockOptions
in interfaceNativeQueryImplementor<R>
- Specified by:
setLockOptions
in interfaceQuery<R>
- Overrides:
setLockOptions
in classAbstractQuery<R>
- Parameters:
lockOptions
- The lock options to apply to the query.- Returns:
this
, for method chaining- See Also:
Query.getLockOptions()
-
setHibernateLockMode
public NativeQueryImplementor<R> setHibernateLockMode(LockMode lockMode)
Description copied from class:AbstractSelectionQuery
Specify the root LockMode for the query- Specified by:
setHibernateLockMode
in interfaceNativeQuery<R>
- Specified by:
setHibernateLockMode
in interfaceNativeQueryImplementor<R>
- Specified by:
setHibernateLockMode
in interfaceSelectionQuery<R>
- Overrides:
setHibernateLockMode
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.setLockMode(LockModeType)
-
setLockMode
public NativeQueryImplementor<R> setLockMode(String alias, LockMode lockMode)
Description copied from interface:SelectionQuery
Specify aLockMode
to apply to a specific alias defined in the query- Specified by:
setLockMode
in interfaceNativeQuery<R>
- Specified by:
setLockMode
in interfaceNativeQueryImplementor<R>
- Specified by:
setLockMode
in interfaceQuery<R>
- Specified by:
setLockMode
in interfaceSelectionQuery<R>
- Overrides:
setLockMode
in classAbstractQuery<R>
- Parameters:
alias
- A query aliaslockMode
- The lock mode to apply- Returns:
this
, for method chaining- See Also:
Query.getLockOptions()
-
setLockMode
public NativeQueryImplementor<R> setLockMode(LockModeType lockModeType)
Description copied from class:AbstractSelectionQuery
Specify the root LockModeType for the query- Specified by:
setLockMode
in interfaceNativeQuery<R>
- Specified by:
setLockMode
in interfaceNativeQueryImplementor<R>
- Specified by:
setLockMode
in interfaceQuery
- Specified by:
setLockMode
in interfaceQuery<R>
- Specified by:
setLockMode
in interfaceSelectionQuery<R>
- Specified by:
setLockMode
in interfaceTypedQuery<R>
- Overrides:
setLockMode
in classAbstractQuery<R>
- See Also:
AbstractSelectionQuery.setHibernateLockMode(org.hibernate.LockMode)
-
applyGraph
protected void applyGraph(String graphString, GraphSemantic graphSemantic)
- Overrides:
applyGraph
in classAbstractCommonQueryContract
-
applyGraph
protected void applyGraph(RootGraphImplementor<?> entityGraph, GraphSemantic graphSemantic)
- Overrides:
applyGraph
in classAbstractCommonQueryContract
-
applyGraph
public Query<R> applyGraph(RootGraph graph, GraphSemantic semantic)
Description copied from interface:Query
Apply the given graph using the given semantic- Specified by:
applyGraph
in interfaceQuery<R>
- Parameters:
graph
- The graph to apply.semantic
- The semantic to use when applying the graph
-
applyEntityGraphHint
protected void applyEntityGraphHint(String hintName, Object value)
- Overrides:
applyEntityGraphHint
in classAbstractCommonQueryContract
-
setTupleTransformer
public <T> NativeQueryImplementor<T> setTupleTransformer(TupleTransformer<T> transformer)
Description copied from interface:Query
Set aTupleTransformer
.- Specified by:
setTupleTransformer
in interfaceNativeQuery<R>
- Specified by:
setTupleTransformer
in interfaceNativeQueryImplementor<R>
- Specified by:
setTupleTransformer
in interfaceQuery<R>
- Specified by:
setTupleTransformer
in interfaceQueryImplementor<R>
- Overrides:
setTupleTransformer
in classAbstractQuery<R>
-
setResultListTransformer
public NativeQueryImplementor<R> setResultListTransformer(ResultListTransformer<R> transformer)
Description copied from interface:Query
Set aResultListTransformer
.- Specified by:
setResultListTransformer
in interfaceNativeQuery<R>
- Specified by:
setResultListTransformer
in interfaceNativeQueryImplementor<R>
- Specified by:
setResultListTransformer
in interfaceQuery<R>
- Specified by:
setResultListTransformer
in interfaceQueryImplementor<R>
- Overrides:
setResultListTransformer
in classAbstractQuery<R>
-
isSelectQuery
public Boolean isSelectQuery()
Description copied from interface:NativeQueryImplementor
Best guess whether this is a select query.null
indicates unknown- Specified by:
isSelectQuery
in interfaceNativeQueryImplementor<R>
-
prepareForExecution
protected void prepareForExecution()
- Overrides:
prepareForExecution
in classAbstractQuery<R>
-
doList
protected List<R> doList()
- Specified by:
doList
in classAbstractSelectionQuery<R>
-
resolveSelectQueryPlan
protected SelectQueryPlan<R> resolveSelectQueryPlan()
-
expandParameterLists
protected String expandParameterLists()
-
determineBindValueMaxCount
public static int determineBindValueMaxCount(boolean paddingEnabled, int inExprLimit, int bindValueCount)
-
doScroll
protected ScrollableResultsImplementor<R> doScroll(ScrollMode scrollMode)
- Specified by:
doScroll
in classAbstractSelectionQuery<R>
-
doExecuteUpdate
protected int doExecuteUpdate()
- Specified by:
doExecuteUpdate
in classAbstractQuery<R>
-
generateNonSelectInterpretationsKey
protected NonSelectInterpretationsKey generateNonSelectInterpretationsKey()
-
addResultTypeClass
public void addResultTypeClass(Class<?> resultClass)
- Specified by:
addResultTypeClass
in interfaceNativeQueryImplementor<R>
-
addScalar
public NativeQueryImplementor<R> addScalar(String columnAlias)
Description copied from interface:NativeQuery
Declare a scalar query result. Hibernate will attempt to automatically detect the underlying type.Functions like
<return-scalar/>
inhbm.xml
orColumnResult
in annotations- Specified by:
addScalar
in interfaceNativeQuery<R>
- Specified by:
addScalar
in interfaceNativeQueryImplementor<R>
- Parameters:
columnAlias
- The column alias in the result set to be processed as a scalar result- Returns:
this
, for method chaining
-
addScalar
public NativeQueryImplementor<R> addScalar(int position, Class<?> type)
-
registerBuilder
protected NativeQueryImplementor<R> registerBuilder(ResultBuilder builder)
-
addScalar
public NativeQuery<R> addScalar(String columnAlias, BasicTypeReference type)
Description copied from interface:NativeQuery
Declare a scalar query result.Functions like
<return-scalar/>
inhbm.xml
orColumnResult
in annotations.- Specified by:
addScalar
in interfaceNativeQuery<R>
- Parameters:
columnAlias
- The column alias in the result set to be processed as a scalar resulttype
- The Hibernate type as which to treat the value.- Returns:
this
, for method chaining
-
addScalar
public NativeQueryImplementor<R> addScalar(String columnAlias, BasicDomainType type)
Description copied from interface:NativeQuery
Declare a scalar query result.Functions like
<return-scalar/>
inhbm.xml
orColumnResult
in annotations.- Specified by:
addScalar
in interfaceNativeQuery<R>
- Specified by:
addScalar
in interfaceNativeQueryImplementor<R>
- Parameters:
columnAlias
- The column alias in the result set to be processed as a scalar resulttype
- The Hibernate type as which to treat the value.- Returns:
this
, for method chaining
-
addScalar
public NativeQueryImplementor<R> addScalar(String columnAlias, Class javaType)
Description copied from interface:NativeQuery
Declare a scalar query result using the specified result type.Hibernate will implicitly determine an appropriate conversion, if it can. Otherwise, an exception will be thrown.
- Specified by:
addScalar
in interfaceNativeQuery<R>
- Specified by:
addScalar
in interfaceNativeQueryImplementor<R>
- Returns:
this
, for method chaining
-
addScalar
public <C> NativeQueryImplementor<R> addScalar(String columnAlias, Class<C> jdbcJavaType, AttributeConverter<?,C> converter)
Description copied from interface:NativeQuery
Declare a scalar query result with an explicit conversion.- Specified by:
addScalar
in interfaceNativeQuery<R>
- Specified by:
addScalar
in interfaceNativeQueryImplementor<R>
jdbcJavaType
- The Java type expected by the converter as its "relational" type.converter
- The conversion to apply. Consumes the JDBC value based onrelationalJavaType
.- Returns:
this
, for method chaining
-
addScalar
public <O,J> NativeQueryImplementor<R> addScalar(String columnAlias, Class<O> domainJavaType, Class<J> jdbcJavaType, AttributeConverter<O,J> converter)
Description copied from interface:NativeQuery
Declare a scalar query result with an explicit conversion.- Specified by:
addScalar
in interfaceNativeQuery<R>
- Specified by:
addScalar
in interfaceNativeQueryImplementor<R>
domainJavaType
- The Java type expected by the converter as its "object model" type.jdbcJavaType
- The Java type expected by the converter as its "relational model" type.converter
- The conversion to apply. Consumes the JDBC value based onrelationalJavaType
.- Returns:
this
, for method chaining
-
addScalar
public <C> NativeQueryImplementor<R> addScalar(String columnAlias, Class<C> relationalJavaType, Class<? extends AttributeConverter<?,C>> converter)
Description copied from interface:NativeQuery
Declare a scalar query result with an explicit conversion.- Specified by:
addScalar
in interfaceNativeQuery<R>
- Specified by:
addScalar
in interfaceNativeQueryImplementor<R>
relationalJavaType
- The Java type expected by the converter as its "relational" type.converter
- The conversion to apply. Consumes the JDBC value based onrelationalJavaType
.- Returns:
this
, for method chaining
-
addScalar
public <O,J> NativeQueryImplementor<R> addScalar(String columnAlias, Class<O> domainJavaType, Class<J> jdbcJavaType, Class<? extends AttributeConverter<O,J>> converterJavaType)
Description copied from interface:NativeQuery
Declare a scalar query result with an explicit conversion.- Specified by:
addScalar
in interfaceNativeQuery<R>
- Specified by:
addScalar
in interfaceNativeQueryImplementor<R>
domainJavaType
- The Java type expected by the converter as its "object model" type.jdbcJavaType
- The Java type expected by the converter as its "relational model" type.converterJavaType
- The conversion to apply. Consumes the JDBC value based onrelationalJavaType
.- Returns:
this
, for method chaining
-
addInstantiation
public <J> NativeQuery.InstantiationResultNode<J> addInstantiation(Class<J> targetJavaType)
- Specified by:
addInstantiation
in interfaceNativeQuery<R>
-
addAttributeResult
public NativeQueryImplementor<R> addAttributeResult(String columnAlias, Class entityJavaType, String attributePath)
Description copied from interface:NativeQuery
Defines a result based on a specified attribute. Differs from adding a scalar in that any conversions or other semantics defined on the attribute are automatically applied to the mapping.- Specified by:
addAttributeResult
in interfaceNativeQuery<R>
- Specified by:
addAttributeResult
in interfaceNativeQueryImplementor<R>
- Returns:
this
, for method chaining
-
addAttributeResult
public NativeQueryImplementor<R> addAttributeResult(String columnAlias, String entityName, String attributePath)
Description copied from interface:NativeQuery
Defines a result based on a specified attribute. Differs from adding a scalar in that any conversions or other semantics defined on the attribute are automatically applied to the mapping.- Specified by:
addAttributeResult
in interfaceNativeQuery<R>
- Specified by:
addAttributeResult
in interfaceNativeQueryImplementor<R>
- Returns:
this
, for method chaining
-
addAttributeResult
public NativeQueryImplementor<R> addAttributeResult(String columnAlias, SingularAttribute attribute)
Description copied from interface:NativeQuery
Defines a result based on a specified attribute. Differs from adding a scalar in that any conversions or other semantics defined on the attribute are automatically applied to the mapping.This form accepts the JPA Attribute mapping describing the attribute
- Specified by:
addAttributeResult
in interfaceNativeQuery<R>
- Specified by:
addAttributeResult
in interfaceNativeQueryImplementor<R>
- Returns:
this
, for method chaining
-
addRoot
public DynamicResultBuilderEntityStandard addRoot(String tableAlias, String entityName)
Description copied from interface:NativeQuery
Add a new root return mapping, returning aNativeQuery.RootReturn
to allow further definition.- Specified by:
addRoot
in interfaceNativeQuery<R>
- Specified by:
addRoot
in interfaceNativeQueryImplementor<R>
- Parameters:
tableAlias
- The SQL table alias to map to this entityentityName
- The name of the entity- Returns:
- The return config object for further control.
-
addRoot
public DynamicResultBuilderEntityStandard addRoot(String tableAlias, Class entityType)
Description copied from interface:NativeQuery
Add a new root return mapping, returning aNativeQuery.RootReturn
to allow further definition.- Specified by:
addRoot
in interfaceNativeQuery<R>
- Parameters:
tableAlias
- The SQL table alias to map to this entityentityType
- The java type of the entity- Returns:
- The return config object for further control.
-
addEntity
public NativeQueryImplementor<R> addEntity(String entityName)
Description copied from interface:NativeQuery
Declare a "root" entity, without specifying an alias. The expectation here is that the table alias is the same as the unqualified entity name.Use
NativeQuery.addRoot(java.lang.String, java.lang.String)
if you need further control of the mapping- Specified by:
addEntity
in interfaceNativeQuery<R>
- Specified by:
addEntity
in interfaceNativeQueryImplementor<R>
- Parameters:
entityName
- The entity name that is the root return of the query- Returns:
this
, for method chaining
-
addEntity
public NativeQueryImplementor<R> addEntity(String tableAlias, String entityName)
Description copied from interface:NativeQuery
Declare a "root" entity.- Specified by:
addEntity
in interfaceNativeQuery<R>
- Specified by:
addEntity
in interfaceNativeQueryImplementor<R>
- Parameters:
tableAlias
- The SQL table aliasentityName
- The entity name- Returns:
this
, for method chaining
-
addEntity
public NativeQueryImplementor<R> addEntity(String tableAlias, String entityName, LockMode lockMode)
Description copied from interface:NativeQuery
Declare a "root" entity, specifying a lock mode.- Specified by:
addEntity
in interfaceNativeQuery<R>
- Specified by:
addEntity
in interfaceNativeQueryImplementor<R>
- Parameters:
tableAlias
- The SQL table aliasentityName
- The entity namelockMode
- The lock mode for this return.- Returns:
this
, for method chaining
-
addEntity
public NativeQueryImplementor<R> addEntity(Class entityType)
Description copied from interface:NativeQuery
Declare a "root" entity, without specifying an alias. The expectation here is that the table alias is the same as the unqualified entity name.- Specified by:
addEntity
in interfaceNativeQuery<R>
- Specified by:
addEntity
in interfaceNativeQueryImplementor<R>
- Parameters:
entityType
- The java type of the entity to add as a root- Returns:
this
, for method chaining
-
addEntity
public NativeQueryImplementor<R> addEntity(Class<R> entityType, LockMode lockMode)
- Specified by:
addEntity
in interfaceNativeQueryImplementor<R>
-
addEntity
public NativeQueryImplementor<R> addEntity(String tableAlias, Class entityClass)
Description copied from interface:NativeQuery
Declare a "root" entity.- Specified by:
addEntity
in interfaceNativeQuery<R>
- Specified by:
addEntity
in interfaceNativeQueryImplementor<R>
- Parameters:
tableAlias
- The SQL table aliasentityClass
- The java type of the entity to add as a root- Returns:
this
, for method chaining
-
addEntity
public NativeQueryImplementor<R> addEntity(String tableAlias, Class entityClass, LockMode lockMode)
Description copied from interface:NativeQuery
Declare a "root" entity, specifying a lock mode.- Specified by:
addEntity
in interfaceNativeQuery<R>
- Specified by:
addEntity
in interfaceNativeQueryImplementor<R>
- Parameters:
tableAlias
- The SQL table aliasentityClass
- The entityClass
lockMode
- The lock mode for this return- Returns:
this
, for method chaining
-
addFetch
public NativeQuery.FetchReturn addFetch(String tableAlias, String ownerTableAlias, String joinPropertyName)
Description copied from interface:NativeQuery
Declare a join fetch result.- Specified by:
addFetch
in interfaceNativeQuery<R>
- Parameters:
tableAlias
- The SQL table alias for the data to be mapped to this fetch.ownerTableAlias
- Identify the table alias of the owner of this association. Should match the alias of a previously added root or fetch.joinPropertyName
- The name of the property being join fetched.- Returns:
- The return config object for further control.
-
addJoin
public NativeQueryImplementor<R> addJoin(String tableAlias, String path)
Description copied from interface:NativeQuery
Declare a join fetch result.- Specified by:
addJoin
in interfaceNativeQuery<R>
- Specified by:
addJoin
in interfaceNativeQueryImplementor<R>
- Parameters:
tableAlias
- The SQL table alias for the data to be mapped to this fetch.path
- The association path of form[owner-alias].[property-name]
.- Returns:
this
, for method chaining
-
addJoin
public NativeQueryImplementor<R> addJoin(String tableAlias, String ownerTableAlias, String joinPropertyName)
Description copied from interface:NativeQuery
Declare a join fetch result.- Specified by:
addJoin
in interfaceNativeQuery<R>
- Specified by:
addJoin
in interfaceNativeQueryImplementor<R>
- Parameters:
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 fetch.joinPropertyName
- The name of the property being join fetched.- Returns:
this
, for method chaining
-
addJoin
public NativeQueryImplementor<R> addJoin(String tableAlias, String path, LockMode lockMode)
Description copied from interface:NativeQuery
Declare a join fetch result, specifying a lock mode.- Specified by:
addJoin
in interfaceNativeQuery<R>
- Specified by:
addJoin
in interfaceNativeQueryImplementor<R>
- Parameters:
tableAlias
- The SQL table alias for the data to be mapped to this fetchpath
- The association path of form[owner-alias].[property-name]
.lockMode
- The lock mode for this return.- Returns:
this
, for method chaining
-
getSynchronizedQuerySpaces
public Collection<String> getSynchronizedQuerySpaces()
Description copied from interface:SynchronizeableQuery
Obtain the list of query spaces this query is synchronized with.- Specified by:
getSynchronizedQuerySpaces
in interfaceSynchronizeableQuery
- Returns:
- The list of query spaces upon which the query is synchronized.
-
addSynchronizedQuerySpace
public NativeQueryImplementor<R> addSynchronizedQuerySpace(String querySpace)
Description copied from interface:SynchronizeableQuery
Add a query space. The effect of this call is to:- force an auto-flush if any entity associated with the current session and mapped to the given query space has pending changes which have not yet been synchronized with the database, and
- if the result set of this query is cached, mark it for invalidation when any entity mapped to the given query space is synchronized with the database in any session.
- Specified by:
addSynchronizedQuerySpace
in interfaceNativeQuery<R>
- Specified by:
addSynchronizedQuerySpace
in interfaceNativeQueryImplementor<R>
- Specified by:
addSynchronizedQuerySpace
in interfaceSynchronizeableQuery
- Parameters:
querySpace
- The name of the query space, usually the name of a database table.- Returns:
this
, for method chaining
-
addQuerySpaces
protected void addQuerySpaces(String... spaces)
-
addQuerySpaces
protected void addQuerySpaces(Serializable... spaces)
-
addSynchronizedEntityName
public NativeQueryImplementor<R> addSynchronizedEntityName(String entityName) throws MappingException
Description copied from interface:SynchronizeableQuery
Add all query spaces associated with the entity with the given names.Same as
SynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String)
for all tables mapped by the given entity.- Specified by:
addSynchronizedEntityName
in interfaceNativeQuery<R>
- Specified by:
addSynchronizedEntityName
in interfaceNativeQueryImplementor<R>
- Specified by:
addSynchronizedEntityName
in interfaceSynchronizeableQuery
- Parameters:
entityName
- The name of an entity.- Returns:
this
, for method chaining- Throws:
MappingException
- Indicates the given name could not be resolved as an entity
-
addSynchronizedEntityClass
public NativeQueryImplementor<R> addSynchronizedEntityClass(Class entityClass) throws MappingException
Description copied from interface:SynchronizeableQuery
Add all query spaces associated with the entity with the given type.Same as
SynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String)
for all tables mapped by the given entity.- Specified by:
addSynchronizedEntityClass
in interfaceNativeQuery<R>
- Specified by:
addSynchronizedEntityClass
in interfaceNativeQueryImplementor<R>
- Specified by:
addSynchronizedEntityClass
in interfaceSynchronizeableQuery
- Parameters:
entityClass
- The class of the entity.- Returns:
this
, for method chaining- Throws:
MappingException
- Indicates the given class could not be resolved as an entity
-
setHibernateFlushMode
public NativeQueryImplementor<R> setHibernateFlushMode(FlushMode flushMode)
Description copied from interface:CommonQueryContract
Set the currentFlushMode
in effect for this query.- Specified by:
setHibernateFlushMode
in interfaceCommonQueryContract
- Specified by:
setHibernateFlushMode
in interfaceMutationQuery
- Specified by:
setHibernateFlushMode
in interfaceNativeQuery<R>
- Specified by:
setHibernateFlushMode
in interfaceNativeQueryImplementor<R>
- Specified by:
setHibernateFlushMode
in interfaceQuery<R>
- Specified by:
setHibernateFlushMode
in interfaceSelectionQuery<R>
- Overrides:
setHibernateFlushMode
in classAbstractQuery<R>
- See Also:
CommonQueryContract.getHibernateFlushMode()
,Session.getHibernateFlushMode()
-
setFlushMode
public NativeQueryImplementor<R> setFlushMode(FlushModeType flushModeType)
Description copied from interface:CommonQueryContract
Set theFlushMode
in to use for this query.- Specified by:
setFlushMode
in interfaceCommonQueryContract
- Specified by:
setFlushMode
in interfaceMutationQuery
- Specified by:
setFlushMode
in interfaceNativeQuery<R>
- Specified by:
setFlushMode
in interfaceNativeQueryImplementor<R>
- Specified by:
setFlushMode
in interfaceQuery
- Specified by:
setFlushMode
in interfaceQuery<R>
- Specified by:
setFlushMode
in interfaceSelectionQuery<R>
- Specified by:
setFlushMode
in interfaceTypedQuery<R>
- Overrides:
setFlushMode
in classAbstractQuery<R>
- See Also:
CommonQueryContract.getHibernateFlushMode()
,Session.getHibernateFlushMode()
-
setCacheMode
public NativeQueryImplementor<R> setCacheMode(CacheMode cacheMode)
Description copied from interface:SelectionQuery
Set the currentCacheMode
in effect for this query.- Specified by:
setCacheMode
in interfaceNativeQuery<R>
- Specified by:
setCacheMode
in interfaceNativeQueryImplementor<R>
- Specified by:
setCacheMode
in interfaceQuery<R>
- Specified by:
setCacheMode
in interfaceSelectionQuery<R>
- Overrides:
setCacheMode
in classAbstractQuery<R>
- See Also:
SelectionQuery.getCacheMode()
,Session.setCacheMode(CacheMode)
-
setCacheRetrieveMode
public NativeQueryImplementor<R> setCacheRetrieveMode(CacheRetrieveMode cacheRetrieveMode)
- Specified by:
setCacheRetrieveMode
in interfaceNativeQuery<R>
- Specified by:
setCacheRetrieveMode
in interfaceQuery<R>
- Specified by:
setCacheRetrieveMode
in interfaceSelectionQuery<R>
- Overrides:
setCacheRetrieveMode
in classAbstractQuery<R>
- See Also:
SelectionQuery.setCacheMode(CacheMode)
-
setCacheStoreMode
public NativeQueryImplementor<R> setCacheStoreMode(CacheStoreMode cacheStoreMode)
- Specified by:
setCacheStoreMode
in interfaceNativeQuery<R>
- Specified by:
setCacheStoreMode
in interfaceQuery<R>
- Specified by:
setCacheStoreMode
in interfaceSelectionQuery<R>
- Overrides:
setCacheStoreMode
in classAbstractQuery<R>
- See Also:
SelectionQuery.setCacheMode(CacheMode)
-
setCacheable
public NativeQueryImplementor<R> setCacheable(boolean cacheable)
Description copied from interface:SelectionQuery
Enable/disable second level query (result) caching for this query.- Specified by:
setCacheable
in interfaceNativeQuery<R>
- Specified by:
setCacheable
in interfaceNativeQueryImplementor<R>
- Specified by:
setCacheable
in interfaceQuery<R>
- Specified by:
setCacheable
in interfaceSelectionQuery<R>
- Overrides:
setCacheable
in classAbstractQuery<R>
- See Also:
SelectionQuery.isCacheable()
-
setCacheRegion
public NativeQueryImplementor<R> setCacheRegion(String cacheRegion)
Description copied from interface:SelectionQuery
Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()
).null
indicates to use the default region.- Specified by:
setCacheRegion
in interfaceNativeQuery<R>
- Specified by:
setCacheRegion
in interfaceNativeQueryImplementor<R>
- Specified by:
setCacheRegion
in interfaceQuery<R>
- Specified by:
setCacheRegion
in interfaceSelectionQuery<R>
- Overrides:
setCacheRegion
in classAbstractQuery<R>
- See Also:
SelectionQuery.getCacheRegion()
-
setQueryPlanCacheable
public NativeQueryImplementor<R> setQueryPlanCacheable(boolean queryPlanCacheable)
Description copied from interface:SelectionQuery
Enable/disable query plan caching for this query.- Specified by:
setQueryPlanCacheable
in interfaceSelectionQuery<R>
- Overrides:
setQueryPlanCacheable
in classAbstractQuery<R>
- See Also:
SelectionQuery.isQueryPlanCacheable()
-
setTimeout
public NativeQueryImplementor<R> setTimeout(int timeout)
Description copied from interface:CommonQueryContract
Set the query timeout in seconds.Any value set here is eventually passed directly along to the JDBC statement, which expressly disallows negative values. So negative values should be avoided as a general rule.
A value of zero indicates no timeout.
- Specified by:
setTimeout
in interfaceCommonQueryContract
- Specified by:
setTimeout
in interfaceMutationQuery
- Specified by:
setTimeout
in interfaceNativeQuery<R>
- Specified by:
setTimeout
in interfaceNativeQueryImplementor<R>
- Specified by:
setTimeout
in interfaceQuery<R>
- Specified by:
setTimeout
in interfaceSelectionQuery<R>
- Overrides:
setTimeout
in classAbstractQuery<R>
- Parameters:
timeout
- the timeout in seconds- Returns:
this
, for method chaining- See Also:
CommonQueryContract.getTimeout()
-
setFetchSize
public NativeQueryImplementor<R> setFetchSize(int fetchSize)
Description copied from interface:SelectionQuery
Sets a JDBC fetch size hint for the query.- Specified by:
setFetchSize
in interfaceNativeQuery<R>
- Specified by:
setFetchSize
in interfaceNativeQueryImplementor<R>
- Specified by:
setFetchSize
in interfaceQuery<R>
- Specified by:
setFetchSize
in interfaceSelectionQuery<R>
- Overrides:
setFetchSize
in classAbstractQuery<R>
- Parameters:
fetchSize
- the fetch size hint- Returns:
this
, for method chaining- See Also:
SelectionQuery.getFetchSize()
-
setReadOnly
public NativeQueryImplementor<R> setReadOnly(boolean readOnly)
Description copied from interface:SelectionQuery
Set the read-only/modifiable mode for entities and proxies loaded by thisQuery
. This setting overrides the default setting for the persistence context,Session.isDefaultReadOnly()
.To set the default read-only/modifiable setting used for entities and proxies that are loaded into the session, use
Session.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 beforeQuery the query was executed.
- Specified by:
setReadOnly
in interfaceNativeQuery<R>
- Specified by:
setReadOnly
in interfaceNativeQueryImplementor<R>
- Specified by:
setReadOnly
in interfaceQuery<R>
- Specified by:
setReadOnly
in interfaceSelectionQuery<R>
- Overrides:
setReadOnly
in classAbstractQuery<R>
- Parameters:
readOnly
-true
indicates that entities and proxies loaded by the query are to be put in read-only mode;false
indicates that entities and proxies loaded by the query will be put in modifiable mode- Returns:
this
, for method chaining
-
setComment
public NativeQueryImplementor<R> setComment(String comment)
Description copied from interface:CommonQueryContract
Set a comment for this query.- Specified by:
setComment
in interfaceCommonQueryContract
- Specified by:
setComment
in interfaceMutationQuery
- Specified by:
setComment
in interfaceNativeQuery<R>
- Specified by:
setComment
in interfaceNativeQueryImplementor<R>
- Specified by:
setComment
in interfaceQuery<R>
- Specified by:
setComment
in interfaceSelectionQuery<R>
- Overrides:
setComment
in classAbstractQuery<R>
- Parameters:
comment
- The human-readable comment- Returns:
this
, for method chaining- See Also:
Query.setComment(String)
-
addQueryHint
public NativeQueryImplementor<R> addQueryHint(String hint)
Description copied from interface:Query
Add a database query hint to the SQL query.A database hint is a completely different concept to a JPA hint specified using
QueryHint
orQuery.getHints()
. These are hints to the JPA provider.Multiple query hints may be specified. The operation
Dialect.getQueryHintString(String, List)
determines how the hint is actually added to the SQL query.- Specified by:
addQueryHint
in interfaceNativeQuery<R>
- Specified by:
addQueryHint
in interfaceNativeQueryImplementor<R>
- Specified by:
addQueryHint
in interfaceQuery<R>
- Overrides:
addQueryHint
in classAbstractQuery<R>
- Parameters:
hint
- The database specific query hint to add.
-
collectHints
protected void collectHints(Map<String,Object> hints)
- Overrides:
collectHints
in classAbstractQuery<R>
-
applySynchronizeSpacesHint
protected void applySynchronizeSpacesHint(Object value)
- Overrides:
applySynchronizeSpacesHint
in classAbstractCommonQueryContract
-
applySynchronizeSpace
protected void applySynchronizeSpace(Object value)
-
setParameter
public NativeQueryImplementor<R> setParameter(String name, Object value)
Description copied from interface:CommonQueryContract
Bind the given argument to a named query parameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the forms which accepts a "type".
- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
CommonQueryContract.setParameter(String, Object, Class)
,CommonQueryContract.setParameter(String, Object, BindableType)
-
setParameter
public <P> NativeQueryImplementor<R> setParameter(String name, P value, Class<P> javaTypeClass)
Description copied from interface:CommonQueryContract
Bind the given argument to a named query parameter using the givenClass
reference to attempt to infer theBindableType
. If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameter(String, Object)
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
CommonQueryContract.setParameter(String, Object, BindableType)
-
setParameter
public <P> NativeQueryImplementor<R> setParameter(String name, P value, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind the given argument to a named query parameter using the givenBindableType
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
-
setParameter
public NativeQueryImplementor<R> setParameter(String name, Calendar value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
Query.setParameter(String, Calendar, TemporalType)
-
setParameter
public NativeQueryImplementor<R> setParameter(String name, Instant value, TemporalType temporalType)
Description copied from interface:CommonQueryContract
Bind anInstant
to the named query parameter using just the portion indicated by the givenTemporalType
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
-
setParameter
public NativeQueryImplementor<R> setParameter(String name, Date value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
Query.setParameter(String, Date, TemporalType)
-
setParameter
public NativeQueryImplementor<R> setParameter(int position, Object value)
Description copied from interface:CommonQueryContract
Bind the given argument to an ordinal query parameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the forms which accepts a "type".
- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
CommonQueryContract.setParameter(int, Object, Class)
,CommonQueryContract.setParameter(int, Object, BindableType)
-
setParameter
public <P> NativeQueryImplementor<R> setParameter(int position, P value, Class<P> javaTypeClass)
Description copied from interface:CommonQueryContract
Bind the given argument to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
. If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameter(int, Object)
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
CommonQueryContract.setParameter(int, Object, BindableType)
-
setParameter
public <P> NativeQueryImplementor<R> setParameter(int position, P value, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind the given argument to an ordinal query parameter using the givenBindableType
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
-
setParameter
public NativeQueryImplementor<R> setParameter(int position, Instant value, TemporalType temporalType)
Description copied from interface:CommonQueryContract
Bind anInstant
to an ordinal query parameter using just the portion indicated by the givenTemporalType
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
-
setParameter
public NativeQueryImplementor<R> setParameter(int position, Calendar value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
Query.setParameter(int, Calendar, TemporalType)
-
setParameter
public NativeQueryImplementor<R> setParameter(int position, Date value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
Query.setParameter(int, Date, TemporalType)
-
setParameter
public <P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value)
Description copied from interface:CommonQueryContract
Bind an argument to the query parameter represented by the givenQueryParameter
.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the forms which accepts a "type".
- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- Parameters:
parameter
- the query parameter mementovalue
- the argument, which might be null- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameter(QueryParameter, Object, BindableType)
-
setParameter
public <P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, Class<P> javaTypeClass)
Description copied from interface:CommonQueryContract
Bind an argument to the query parameter represented by the givenQueryParameter
, using the givenClass
reference to attempt to infer theBindableType
to use. If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameter(QueryParameter, Object)
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- Parameters:
parameter
- the query parameter mementovalue
- the argument, which might be nulljavaTypeClass
- aBindableType
representing the type of the parameter- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameter(QueryParameter, Object, BindableType)
-
setParameter
public <P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind an argument to the query parameter represented by the givenQueryParameter
, using the givenBindableType
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- Parameters:
parameter
- the query parameter mementovalue
- the argument, which might be nulltype
- aBindableType
representing the type of the parameter- Returns:
this
, for method chaining
-
setParameter
public <P> NativeQueryImplementor<R> setParameter(Parameter<P> parameter, P value)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
Query.setParameter(Parameter, Object)
-
setParameter
public NativeQueryImplementor<R> setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
Query.setParameter(Parameter, Calendar, TemporalType)
-
setParameter
public NativeQueryImplementor<R> setParameter(Parameter<Date> param, Date value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceNativeQuery<R>
- Specified by:
setParameter
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
Query.setParameter(Parameter, Date, TemporalType)
-
setParameterList
public NativeQueryImplementor<R> setParameterList(String name, Collection values)
Description copied from interface:CommonQueryContract
Bind multiple arguments to a named query parameter.The "type mapping" for the binding is inferred from the type of the first collection element.
- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(java.lang.String, java.util.Collection, BindableType)
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, Class<P> javaTypeClass)
Description copied from interface:CommonQueryContract
Bind multiple arguments to a named query parameter using the givenClass
reference to attempt to infer theBindableType
If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameterList(String, Collection)
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(java.lang.String, java.util.Collection, BindableType)
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to a named query parameter using the givenBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public NativeQueryImplementor<R> setParameterList(String name, Object[] values)
Description copied from interface:CommonQueryContract
Bind multiple arguments to a named query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(String name, P[] values, Class<P> javaTypeClass)
Description copied from interface:CommonQueryContract
Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine theBindableType
to use. If unable to determine an appropriateBindableType
,CommonQueryContract.setParameterList(String, Collection)
is used- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(java.lang.String, Object[], BindableType)
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(String name, P[] values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to a named query parameter using the givenBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public NativeQueryImplementor<R> setParameterList(int position, Collection values)
Description copied from interface:CommonQueryContract
Bind multiple arguments to an ordinal query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, Class<P> javaTypeClass)
Description copied from interface:CommonQueryContract
Bind multiple arguments to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
. If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameterList(String, Collection)
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(int, Collection, BindableType)
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to an ordinal query parameter using the givenBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public NativeQueryImplementor<R> setParameterList(int position, Object[] values)
Description copied from interface:CommonQueryContract
Bind multiple arguments to an ordinal query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(int position, P[] values, Class<P> javaTypeClass)
Description copied from interface:CommonQueryContract
Bind multiple arguments to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
. If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameterList(String, Collection)
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(int, Object[], BindableType)
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(int position, P[] values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to an ordinal query parameter using the givenBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values)
Description copied from interface:CommonQueryContract
Bind multiple arguments to the query parameter represented by the givenQueryParameter
.The type of the parameter is inferred from the context in which it occurs, and from the type of the first given argument.
- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Parameters:
parameter
- the parameter mementovalues
- a collection of arguments- Returns:
this
, for method chaining
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaTypeClass)
Description copied from interface:CommonQueryContract
Bind multiple arguments to the query parameter represented by the givenQueryParameter
using the givenClass
reference to attempt to infer theBindableType
to use. If unable to infer an appropriateBindableType
, fall back to usingCommonQueryContract.setParameterList(String, Collection)
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(QueryParameter, java.util.Collection, BindableType)
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to the query parameter represented by the givenQueryParameter
, using the givenBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values)
Description copied from interface:CommonQueryContract
Bind multiple arguments to the query parameter represented by the givenQueryParameter
.The type of the parameter is inferred between the context in which it occurs, the type associated with the
QueryParameter
and the type of the first given argument.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Parameters:
parameter
- the parameter mementovalues
- a collection of arguments- Returns:
this
, for method chaining
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaTypeClass)
Description copied from interface:CommonQueryContract
Bind multiple arguments to the query parameter represented by the givenQueryParameter
using the givenClass
reference to attempt to infer theBindableType
to use. If unable to infer an appropriateBindableType
, fall back to usingCommonQueryContract.setParameterList(String, Collection)
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(QueryParameter, Object[], BindableType)
-
setParameterList
public <P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to the query parameter represented by the givenQueryParameter
, using the given theBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceNativeQuery<R>
- Specified by:
setParameterList
in interfaceNativeQueryImplementor<R>
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractQuery<R>
- Returns:
this
, for method chaining
-
setProperties
public NativeQueryImplementor<R> setProperties(Map map)
Description copied from interface:CommonQueryContract
Bind the values of the givenMap
to named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.- Specified by:
setProperties
in interfaceCommonQueryContract
- Specified by:
setProperties
in interfaceMutationQuery
- Specified by:
setProperties
in interfaceNativeQuery<R>
- Specified by:
setProperties
in interfaceNativeQueryImplementor<R>
- Specified by:
setProperties
in interfaceQuery<R>
- Specified by:
setProperties
in interfaceQueryImplementor<R>
- Specified by:
setProperties
in interfaceSelectionQuery<R>
- Overrides:
setProperties
in classAbstractQuery<R>
- Parameters:
map
- aMap
of names to arguments- Returns:
this
, for method chaining
-
setProperties
public NativeQueryImplementor<R> setProperties(Object bean)
Description copied from interface:CommonQueryContract
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.- Specified by:
setProperties
in interfaceCommonQueryContract
- Specified by:
setProperties
in interfaceMutationQuery
- Specified by:
setProperties
in interfaceNativeQuery<R>
- Specified by:
setProperties
in interfaceNativeQueryImplementor<R>
- Specified by:
setProperties
in interfaceQuery<R>
- Specified by:
setProperties
in interfaceQueryImplementor<R>
- Specified by:
setProperties
in interfaceSelectionQuery<R>
- Overrides:
setProperties
in classAbstractQuery<R>
- Parameters:
bean
- any JavaBean or POJO- Returns:
this
, for method chaining
-
setResultTransformer
@Deprecated public <S> NativeQueryImplementor<S> setResultTransformer(ResultTransformer<S> transformer)
Deprecated.- Specified by:
setResultTransformer
in interfaceNativeQuery<R>
- Specified by:
setResultTransformer
in interfaceNativeQueryImplementor<R>
- Specified by:
setResultTransformer
in interfaceQuery<R>
- Specified by:
setResultTransformer
in interfaceQueryImplementor<R>
-
setMaxResults
public NativeQueryImplementor<R> setMaxResults(int maxResult)
Description copied from interface:SelectionQuery
Set the max number of rows requested for the query results. Applied to the SQL query- Specified by:
setMaxResults
in interfaceNativeQuery<R>
- Specified by:
setMaxResults
in interfaceNativeQueryImplementor<R>
- Specified by:
setMaxResults
in interfaceQuery
- Specified by:
setMaxResults
in interfaceQuery<R>
- Specified by:
setMaxResults
in interfaceSelectionQuery<R>
- Specified by:
setMaxResults
in interfaceTypedQuery<R>
- Overrides:
setMaxResults
in classAbstractQuery<R>
-
setFirstResult
public NativeQueryImplementor<R> setFirstResult(int startPosition)
Description copied from interface:SelectionQuery
Set the first row position to return from the query results. Applied to the SQL query.- Specified by:
setFirstResult
in interfaceNativeQuery<R>
- Specified by:
setFirstResult
in interfaceNativeQueryImplementor<R>
- Specified by:
setFirstResult
in interfaceQuery
- Specified by:
setFirstResult
in interfaceQuery<R>
- Specified by:
setFirstResult
in interfaceSelectionQuery<R>
- Specified by:
setFirstResult
in interfaceTypedQuery<R>
- Overrides:
setFirstResult
in classAbstractQuery<R>
-
setOrder
public Query<R> setOrder(List<Order<? super R>> orderList)
Description copied from interface:SelectionQuery
If the result type of this query is an entity class, add one or more rules for ordering the query results.
-
setOrder
public Query<R> setOrder(Order<? super R> order)
Description copied from interface:SelectionQuery
If the result type of this query is an entity class, add a rule for ordering the query results.
-
setHint
public NativeQueryImplementor<R> setHint(String hintName, Object value)
Description copied from interface:CommonQueryContract
Set a hint. The hints understood by Hibernate are enumerated byAvailableHints
.- Specified by:
setHint
in interfaceCommonQueryContract
- Specified by:
setHint
in interfaceMutationQuery
- Specified by:
setHint
in interfaceNativeQuery<R>
- Specified by:
setHint
in interfaceNativeQueryImplementor<R>
- Specified by:
setHint
in interfaceQuery
- Specified by:
setHint
in interfaceQuery<R>
- Specified by:
setHint
in interfaceSelectionQuery<R>
- Specified by:
setHint
in interfaceTypedQuery<R>
- Overrides:
setHint
in classAbstractQuery<R>
- See Also:
HibernateHints
,SpecHints
-
-