Class ProcedureCallImpl<R>
- All Implemented Interfaces:
Query
,StoredProcedureQuery
,TypedQuery<R>
,AutoCloseable
,ProcedureCall
,ProcedureCallImplementor<R>
,CommonQueryContract
,MutationQuery
,NameableQuery
,Query<R>
,SelectionQuery<R>
,DomainQueryExecutionContext
,QueryImplementor<R>
,SynchronizeableQuery
,ResultContext
ProcedureCall
-
Field Summary
Fields inherited from class org.hibernate.query.spi.AbstractQuery
log
Fields inherited from class org.hibernate.query.spi.AbstractSelectionQuery
CRITERIA_HQL_STRING
Fields inherited from interface org.hibernate.procedure.ProcedureCall
FUNCTION_RETURN_TYPE_HINT
-
Constructor Summary
ConstructorsConstructorDescriptionProcedureCallImpl
(SharedSessionContractImplementor session, String procedureName) The no-returns form.ProcedureCallImpl
(SharedSessionContractImplementor session, String procedureName, Class<?>... resultClasses) The result Class(es) return formProcedureCallImpl
(SharedSessionContractImplementor session, String procedureName, String... resultSetMappingNames) The result-set-mapping(s) return formProcedureCallImpl
(SharedSessionContractImplementor session, NamedCallableQueryMementoImpl memento, String... resultSetMappingNames) -
Method Summary
Modifier and TypeMethodDescriptionaddSynchronizedEntityClass
(Class entityClass) Add all query spaces associated with the entity with the given type.addSynchronizedEntityName
(String entityName) Add all query spaces associated with the entity with the given names.addSynchronizedQuerySpace
(String querySpace) Add a query space.protected void
addSynchronizedQuerySpaces
(EntityPersister persister) applyGraph
(RootGraph graph, GraphSemantic semantic) Apply the given graph using the given semanticprotected void
applyGraph
(RootGraphImplementor<?> entityGraph, GraphSemantic graphSemantic) protected void
applyOptions
(NamedCallableQueryMemento memento) protected int
doList()
protected ScrollableResultsImplementor<R>
doScroll
(ScrollMode scrollMode) boolean
execute()
getKeyedResultList
(KeyedPage<R> page) Execute the query and return the results for the given page, using key-based pagination.Get the rootLockModeType
for the querygetOutputParameterValue
(int position) getOutputParameterValue
(String parameterName) Retrieves access to outputs of this procedure call.Access to information about query parameters.getParameterRegistration
(int position) Retrieve a previously registered parameter memento by the position under which it was registered.Retrieve a previously registered parameter memento by the name under which it was registered.Get the name of the stored procedure (or function) to be called.Get the execution options for thisQuery
.The domain parameter bindingsThe query as a string, ornull
in the case of a criteria query.Retrieve all registered parameters.long
Determine the size of the query result list that would be returned by callingSelectionQuery.getResultList()
with no offset or limit applied to the query.Execute the query and return the query results as aList
.Execute the query and return the query results as aStream
.Execute the query and return the single result of the query, throwing an exception if the query returns no results.Execute the query and return the single result of the query, ornull
if the query returns no results.Obtain the list of query spaces this query is synchronized with.int
boolean
boolean
Does thisProcedureCall
represent a call to a databaseFUNCTION
, as opposed to aPROCEDURE
?markAsFunctionCall
(int sqlType) Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.markAsFunctionCall
(Class<?> resultType) Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.markAsFunctionCall
(BasicTypeReference<?> typeReference) Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.protected ProcedureOutputs
outputs()
<T> ProcedureParameter<T>
registerParameter
(int position, Class<T> javaType, ParameterMode mode) Basic form for registering a positional parameter.<T> ProcedureParameter<T>
registerParameter
(int position, BasicTypeReference<T> typeReference, ParameterMode mode) Basic form for registering a positional parameter.registerParameter
(String name, Class<T> javaType, ParameterMode mode) Basic form for registering a named parameter.registerParameter
(String name, BasicTypeReference<T> typeReference, ParameterMode mode) Basic form for registering a named parameter.registerStoredProcedureParameter
(int position, Class type, ParameterMode mode) registerStoredProcedureParameter
(int position, BasicTypeReference<?> type, ParameterMode mode) LikeProcedureCall.registerStoredProcedureParameter(int, Class, ParameterMode)
but a basic type reference is given instead of a class for the parameter type.registerStoredProcedureParameter
(String parameterName, Class type, ParameterMode mode) registerStoredProcedureParameter
(String parameterName, BasicTypeReference<?> type, ParameterMode mode) LikeProcedureCall.registerStoredProcedureParameter(String, Class, ParameterMode)
but a basic type reference is given instead of a class for the parameter type.scroll
(ScrollMode scrollMode) Returns scrollable access to the query results.setCacheRetrieveMode
(CacheRetrieveMode cacheRetrieveMode) setCacheStoreMode
(CacheStoreMode cacheStoreMode) setFlushMode
(FlushModeType flushModeType) Set theFlushMode
to use for this query.Set a hint.setLockMode
(LockModeType lockMode) Specify the root LockModeType for the querysetLockMode
(String alias, LockMode lockMode) Specify aLockMode
to apply to a specific alias defined in the querysetLockOptions
(LockOptions lockOptions) Apply the given lock options to this query.If the result type of this query is an entity class, add one or more rules for ordering the query results.If the result type of this query is an entity class, add a rule for ordering the query results.setParameter
(int position, Object value) Bind the given argument to an ordinal query parameter.setParameter
(int position, Calendar value, TemporalType temporalPrecision) Query
overridesetParameter
(int position, Date value, TemporalType temporalPrecision) Query
overridesetParameter
(int position, P value, BindableType<P> type) Bind the given argument to an ordinal query parameter using the givenBindableType
.setParameter
(Parameter<Calendar> parameter, Calendar value, TemporalType temporalPrecision) Query
overridesetParameter
(Parameter<Date> parameter, Date value, TemporalType temporalPrecision) Query
overridesetParameter
(Parameter<P> parameter, P value) Query
overridesetParameter
(String name, Object value) Bind the given argument to a named query parameter.setParameter
(String name, Calendar value, TemporalType temporalPrecision) Query
overridesetParameter
(String name, Date value, TemporalType temporalPrecision) Query
overridesetParameter
(String name, P value, BindableType<P> type) Bind the given argument to a named query parameter using the givenBindableType
.setParameter
(QueryParameter<P> parameter, P value) Bind an argument to the query parameter represented by the givenQueryParameter
.setParameter
(QueryParameter<P> parameter, P value, BindableType<P> type) Bind an argument to the query parameter represented by the givenQueryParameter
, using the givenBindableType
.setTimeout
(Integer timeout) stream()
Execute the query and return the query results as aStream
.Use this form instead ofgetSynchronizedQuerySpaces()
when you want to make sure the underlying Set is instantiated (aka, on add)Convert the query into the memento<T> T
Methods inherited from class org.hibernate.query.spi.AbstractQuery
addQueryHint, applyOptions, collectHints, disableFetchProfile, enableFetchProfile, executeUpdate, getComment, getFirstResult, getLockOptions, getMaxResults, getParameters, getSupportedHints, isCacheable, prepareForExecution, resolveJdbcParameterTypeIfNecessary, setCacheable, setCacheMode, setCacheRegion, setComment, setEntityGraph, setFetchSize, setFirstResult, setHibernateFlushMode, setMaxResults, setOptionalEntityName, setOptionalId, setOptionalObject, setParameter, setParameter, setParameter, setParameter, setParameter, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setProperties, setProperties, setQueryFlushMode, setQueryPlanCacheable, setReadOnly, setResultListTransformer, setTimeout, setTupleTransformer
Methods inherited from class org.hibernate.query.spi.AbstractSelectionQuery
afterQuery, afterQuery, afterQueryHandlingFetchProfiles, beforeQuery, beforeQueryHandlingFetchProfiles, getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getCallback, getFetchSize, getFlushMode, getHibernateLockMode, getSessionFactory, hasCallbackActions, isQueryPlanCacheable, isReadOnly, list, requiresTxn, resetCallback, scroll, setFollowOnLocking, setHibernateLockMode, uniqueElement, uniqueResult, uniqueResultOptional
Methods inherited from class org.hibernate.query.spi.AbstractCommonQueryContract
applyAliasSpecificLockModeHint, applyCommentHint, applyDatabaseHint, applyEntityGraphHint, applyFlushModeHint, applyFollowOnLockingHint, applyGraph, applyHibernateLockMode, applyHint, applyLockModeHint, applyLockModeType, applyLockTimeoutHint, applyLockTimeoutHint, applySelectionHint, applySynchronizeSpacesHint, applyTimeoutHint, determineType, getHibernateFlushMode, getHints, getIntegerLiteral, getMaxRows, getParameter, getParameter, getParameter, getParameter, getParameterValue, getParameterValue, getParameterValue, getQueryFlushMode, 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, getQueryFlushMode, getTimeout
Methods inherited from interface org.hibernate.query.spi.DomainQueryExecutionContext
getResultType, getSession
Methods inherited from interface org.hibernate.procedure.ProcedureCall
close
Methods inherited from interface jakarta.persistence.Query
getCacheRetrieveMode, getCacheStoreMode, getFirstResult, getFlushMode, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getTimeout, isBound
Methods inherited from interface org.hibernate.query.Query
addQueryHint, applyFetchGraph, applyLoadGraph, disableFetchProfile, enableFetchProfile, executeUpdate, getComment, getLockOptions, list, setCacheable, setCacheMode, setCacheRegion, setComment, setEntityGraph, setFetchSize, setFirstResult, setHibernateFlushMode, setMaxResults, setPage, setQueryFlushMode, setReadOnly, setTimeout, uniqueResult, uniqueResultOptional
Methods inherited from interface org.hibernate.query.spi.QueryImplementor
getSession, scroll, setOptionalEntityName, setOptionalId, setOptionalObject, setParameter, setParameter, setParameter, setParameter, setParameter, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setProperties, setProperties, setResultListTransformer, setResultTransformer, setTupleTransformer
Methods inherited from interface org.hibernate.result.spi.ResultContext
getSession
Methods inherited from interface org.hibernate.query.SelectionQuery
getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFetchSize, getFirstResult, getHibernateLockMode, getMaxResults, isCacheable, isQueryPlanCacheable, isReadOnly, setFollowOnLocking, setHibernateLockMode, setQueryPlanCacheable
Methods inherited from interface jakarta.persistence.StoredProcedureQuery
executeUpdate
-
Constructor Details
-
Method Details
-
applyOptions
-
getProcedureName
Description copied from interface:ProcedureCall
Get the name of the stored procedure (or function) to be called.- Specified by:
getProcedureName
in interfaceProcedureCall
- Returns:
- The procedure name.
-
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>
- Specified by:
getQueryOptions
in interfaceResultContext
- Overrides:
getQueryOptions
in classAbstractQuery<R>
- Returns:
- Return the encapsulation of this query's options.
-
getParameterMetadata
Description copied from interface:Query
Access to information about query parameters.- Specified by:
getParameterMetadata
in interfaceProcedureCallImplementor<R>
- Specified by:
getParameterMetadata
in interfaceQuery<R>
- Specified by:
getParameterMetadata
in classAbstractCommonQueryContract
- Returns:
- information about query parameters.
-
getQueryParameterBindings
Description copied from interface:DomainQueryExecutionContext
The domain parameter bindings- Specified by:
getQueryParameterBindings
in interfaceDomainQueryExecutionContext
- Specified by:
getQueryParameterBindings
in classAbstractCommonQueryContract
-
getParameterStrategy
- Specified by:
getParameterStrategy
in interfaceProcedureCallImplementor<R>
-
isFunctionCall
public boolean isFunctionCall()Description copied from interface:ProcedureCall
Does thisProcedureCall
represent a call to a databaseFUNCTION
, as opposed to aPROCEDURE
?- Specified by:
isFunctionCall
in interfaceProcedureCall
- Returns:
true
indicates that this ProcedureCall represents a function call;false
indicates a procedure call.
-
getFunctionReturn
- Specified by:
getFunctionReturn
in interfaceProcedureCallImplementor<R>
-
markAsFunctionCall
Description copied from interface:ProcedureCall
Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.- Specified by:
markAsFunctionCall
in interfaceProcedureCall
- Parameters:
sqlType
- TheTypes
code for the function return- Returns:
this
, for method chaining
-
markAsFunctionCall
Description copied from interface:ProcedureCall
Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.- Specified by:
markAsFunctionCall
in interfaceProcedureCall
- Parameters:
resultType
- The result type for the function return- Returns:
this
, for method chaining
-
markAsFunctionCall
Description copied from interface:ProcedureCall
Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.- Specified by:
markAsFunctionCall
in interfaceProcedureCall
- Parameters:
typeReference
- The result type for the function return- Returns:
this
, for method chaining
-
getParameterBindings
- Specified by:
getParameterBindings
in interfaceQueryImplementor<R>
-
setOrder
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
Description copied from interface:SelectionQuery
If the result type of this query is an entity class, add a rule for ordering the query results. -
registerStoredProcedureParameter
public ProcedureCallImplementor<R> registerStoredProcedureParameter(int position, Class type, ParameterMode mode) - Specified by:
registerStoredProcedureParameter
in interfaceProcedureCall
- Specified by:
registerStoredProcedureParameter
in interfaceProcedureCallImplementor<R>
- Specified by:
registerStoredProcedureParameter
in interfaceStoredProcedureQuery
-
registerStoredProcedureParameter
public ProcedureCallImplementor<R> registerStoredProcedureParameter(String parameterName, Class type, ParameterMode mode) - Specified by:
registerStoredProcedureParameter
in interfaceProcedureCall
- Specified by:
registerStoredProcedureParameter
in interfaceProcedureCallImplementor<R>
- Specified by:
registerStoredProcedureParameter
in interfaceStoredProcedureQuery
-
registerStoredProcedureParameter
public ProcedureCallImplementor<R> registerStoredProcedureParameter(int position, BasicTypeReference<?> type, ParameterMode mode) Description copied from interface:ProcedureCall
LikeProcedureCall.registerStoredProcedureParameter(int, Class, ParameterMode)
but a basic type reference is given instead of a class for the parameter type.- Specified by:
registerStoredProcedureParameter
in interfaceProcedureCall
- Specified by:
registerStoredProcedureParameter
in interfaceProcedureCallImplementor<R>
-
registerStoredProcedureParameter
public ProcedureCallImplementor<R> registerStoredProcedureParameter(String parameterName, BasicTypeReference<?> type, ParameterMode mode) Description copied from interface:ProcedureCall
LikeProcedureCall.registerStoredProcedureParameter(String, Class, ParameterMode)
but a basic type reference is given instead of a class for the parameter type.- Specified by:
registerStoredProcedureParameter
in interfaceProcedureCall
- Specified by:
registerStoredProcedureParameter
in interfaceProcedureCallImplementor<R>
-
registerParameter
public <T> ProcedureParameter<T> registerParameter(int position, Class<T> javaType, ParameterMode mode) Description copied from interface:ProcedureCall
Basic form for registering a positional parameter.- Specified by:
registerParameter
in interfaceProcedureCall
- Type Parameters:
T
- The parameterized Java type of the parameter.- Parameters:
position
- The positionjavaType
- The Java type of the parametermode
- The parameter mode (in, out, inout)- Returns:
- The parameter registration memento
-
registerParameter
public <T> ProcedureParameter<T> registerParameter(int position, BasicTypeReference<T> typeReference, ParameterMode mode) Description copied from interface:ProcedureCall
Basic form for registering a positional parameter.- Specified by:
registerParameter
in interfaceProcedureCall
- Type Parameters:
T
- The parameterized Java type of the parameter.- Parameters:
position
- The positiontypeReference
- The type reference of the parameter typemode
- The parameter mode (in, out, inout)- Returns:
- The parameter registration memento
-
getParameterRegistration
Description copied from interface:ProcedureCall
Retrieve a previously registered parameter memento by the position under which it was registered.- Specified by:
getParameterRegistration
in interfaceProcedureCall
- Parameters:
position
- The parameter position- Returns:
- The parameter registration memento
-
registerParameter
public <T> ProcedureParameterImplementor<T> registerParameter(String name, Class<T> javaType, ParameterMode mode) Description copied from interface:ProcedureCall
Basic form for registering a named parameter.- Specified by:
registerParameter
in interfaceProcedureCall
- Type Parameters:
T
- The parameterized Java type of the parameter.- Parameters:
name
- The parameter namejavaType
- The Java type of the parametermode
- The parameter mode (in, out, inout)- Returns:
- The parameter registration memento
-
registerParameter
public <T> ProcedureParameterImplementor<T> registerParameter(String name, BasicTypeReference<T> typeReference, ParameterMode mode) Description copied from interface:ProcedureCall
Basic form for registering a named parameter.- Specified by:
registerParameter
in interfaceProcedureCall
- Type Parameters:
T
- The parameterized Java type of the parameter.- Parameters:
name
- The parameter nametypeReference
- The type reference of the parameter typemode
- The parameter mode (in, out, inout)- Returns:
- The parameter registration memento
-
getParameterRegistration
Description copied from interface:ProcedureCall
Retrieve a previously registered parameter memento by the name under which it was registered.- Specified by:
getParameterRegistration
in interfaceProcedureCall
- Parameters:
name
- The parameter name- Returns:
- The parameter registration memento
-
getRegisteredParameters
Description copied from interface:ProcedureCall
Retrieve all registered parameters.- Specified by:
getRegisteredParameters
in interfaceProcedureCall
- Returns:
- The (immutable) list of all registered parameters.
-
getOutputs
Description copied from interface:ProcedureCall
Retrieves access to outputs of this procedure call. Can be called multiple times, returning the same ProcedureOutputs instance each time.If the procedure call has not actually be executed yet, it will be executed and then the ProcedureOutputs will be returned.
- Specified by:
getOutputs
in interfaceProcedureCall
- Returns:
- The ProcedureOutputs representation
-
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>
-
synchronizedQuerySpaces
Use this form instead ofgetSynchronizedQuerySpaces()
when you want to make sure the underlying Set is instantiated (aka, on add)- Returns:
- The spaces
-
getSynchronizedQuerySpaces
Description copied from interface:SynchronizeableQuery
Obtain the list of query spaces this query is synchronized with.- Specified by:
getSynchronizedQuerySpaces
in interfaceResultContext
- Specified by:
getSynchronizedQuerySpaces
in interfaceSynchronizeableQuery
- Returns:
- The list of query spaces upon which the query is synchronized.
-
addSynchronizedQuerySpace
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 interfaceProcedureCall
- 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
-
addSynchronizedEntityName
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 interfaceProcedureCall
- Specified by:
addSynchronizedEntityName
in interfaceSynchronizeableQuery
- Parameters:
entityName
- The name of an entity.- Returns:
this
, for method chaining
-
addSynchronizedQuerySpaces
-
addSynchronizedEntityClass
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 interfaceProcedureCall
- Specified by:
addSynchronizedEntityClass
in interfaceSynchronizeableQuery
- Parameters:
entityClass
- The class of the entity.- Returns:
this
, for method chaining
-
toMemento
Description copied from interface:NameableQuery
Convert the query into the memento- Specified by:
toMemento
in interfaceNameableQuery
- Specified by:
toMemento
in interfaceProcedureCall
-
applyGraph
- Overrides:
applyGraph
in classAbstractCommonQueryContract
-
applyGraph
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
-
execute
public boolean execute()- Specified by:
execute
in interfaceStoredProcedureQuery
-
outputs
-
doExecuteUpdate
protected int doExecuteUpdate()- Specified by:
doExecuteUpdate
in classAbstractQuery<R>
-
getOutputParameterValue
- Specified by:
getOutputParameterValue
in interfaceStoredProcedureQuery
-
getOutputParameterValue
- Specified by:
getOutputParameterValue
in interfaceStoredProcedureQuery
-
hasMoreResults
public boolean hasMoreResults()- Specified by:
hasMoreResults
in interfaceStoredProcedureQuery
-
getUpdateCount
public int getUpdateCount()- Specified by:
getUpdateCount
in interfaceStoredProcedureQuery
-
doList
- Specified by:
doList
in classAbstractSelectionQuery<R>
-
getResultCount
public long getResultCount()Description copied from interface:SelectionQuery
Determine the size of the query result list that would be returned by callingSelectionQuery.getResultList()
with no offset or limit applied to the query.- Specified by:
getResultCount
in interfaceSelectionQuery<R>
- Returns:
- the size of the list that would be returned
-
getKeyedResultList
Description copied from interface:SelectionQuery
Execute the query and return the results for the given page, using key-based pagination.- Specified by:
getKeyedResultList
in interfaceSelectionQuery<R>
- Overrides:
getKeyedResultList
in classAbstractQuery<R>
- Parameters:
page
- the key-based specification of the page as an instance ofKeyedPage
- Returns:
- the query results and the key of the next page
as an instance of
KeyedResultList
- See Also:
-
scroll
Description copied from interface:SelectionQuery
Returns scrollable access to the query results. The capabilities of the returned ScrollableResults depend on the specified ScrollMode.- Specified by:
scroll
in interfaceQuery<R>
- Specified by:
scroll
in interfaceQueryImplementor<R>
- Specified by:
scroll
in interfaceSelectionQuery<R>
- Overrides:
scroll
in classAbstractSelectionQuery<R>
-
doScroll
- Specified by:
doScroll
in classAbstractSelectionQuery<R>
-
getResultList
Description copied from interface:Query
Execute the query and return the query results as aList
. If the query contains multiple items in the selection list, then by default each result in the list is packaged in an array of typeObject[]
.- Specified by:
getResultList
in interfaceProcedureCallImplementor<R>
- Specified by:
getResultList
in interfaceQuery
- Specified by:
getResultList
in interfaceQuery<R>
- Specified by:
getResultList
in interfaceSelectionQuery<R>
- Specified by:
getResultList
in interfaceStoredProcedureQuery
- Specified by:
getResultList
in interfaceTypedQuery<R>
- Returns:
- the results as a list
-
getSingleResult
Description copied from interface:SelectionQuery
Execute the query and return the single result of the query, throwing an exception if the query returns no results.- Specified by:
getSingleResult
in interfaceProcedureCallImplementor<R>
- Specified by:
getSingleResult
in interfaceQuery
- Specified by:
getSingleResult
in interfaceQuery<R>
- Specified by:
getSingleResult
in interfaceSelectionQuery<R>
- Specified by:
getSingleResult
in interfaceStoredProcedureQuery
- Specified by:
getSingleResult
in interfaceTypedQuery<R>
- Overrides:
getSingleResult
in classAbstractSelectionQuery<R>
- Returns:
- the single result, only if there is exactly one
-
getSingleResultOrNull
Description copied from interface:SelectionQuery
Execute the query and return the single result of the query, ornull
if the query returns no results.- Specified by:
getSingleResultOrNull
in interfaceQuery
- Specified by:
getSingleResultOrNull
in interfaceSelectionQuery<R>
- Specified by:
getSingleResultOrNull
in interfaceStoredProcedureQuery
- Specified by:
getSingleResultOrNull
in interfaceTypedQuery<R>
- Overrides:
getSingleResultOrNull
in classAbstractSelectionQuery<R>
- Returns:
- the single result or
null
if there is no result to return
-
unwrap
-
setLockMode
Description copied from interface:SelectionQuery
Specify aLockMode
to apply to a specific alias defined in the query- 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:
-
setLockMode
Description copied from class:AbstractSelectionQuery
Specify the root LockModeType for the query- 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:
-
setTimeout
- Specified by:
setTimeout
in interfaceProcedureCallImplementor<R>
- Specified by:
setTimeout
in interfaceQuery
- Specified by:
setTimeout
in interfaceStoredProcedureQuery
- Specified by:
setTimeout
in interfaceTypedQuery<R>
-
getLockMode
Description copied from interface:SelectionQuery
Get the rootLockModeType
for the query- Specified by:
getLockMode
in interfaceQuery
- Specified by:
getLockMode
in interfaceSelectionQuery<R>
- Overrides:
getLockMode
in classAbstractQuery<R>
- See Also:
-
setLockOptions
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 interfaceQuery<R>
- Overrides:
setLockOptions
in classAbstractQuery<R>
- Parameters:
lockOptions
- The lock options to apply to the query.- Returns:
this
, for method chaining- See Also:
-
setHint
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 interfaceProcedureCall
- Specified by:
setHint
in interfaceProcedureCallImplementor<R>
- Specified by:
setHint
in interfaceQuery
- Specified by:
setHint
in interfaceQuery<R>
- Specified by:
setHint
in interfaceSelectionQuery<R>
- Specified by:
setHint
in interfaceStoredProcedureQuery
- Specified by:
setHint
in interfaceTypedQuery<R>
- Overrides:
setHint
in classAbstractQuery<R>
- See Also:
-
setFlushMode
Description copied from interface:CommonQueryContract
Set theFlushMode
to use for this query.Setting this to
null
ultimately indicates to use theFlushMode
of the session. UseCommonQueryContract.setHibernateFlushMode(org.hibernate.FlushMode)
passingFlushMode.MANUAL
instead to indicate that no automatic flushing should occur.- Specified by:
setFlushMode
in interfaceCommonQueryContract
- Specified by:
setFlushMode
in interfaceMutationQuery
- Specified by:
setFlushMode
in interfaceProcedureCall
- Specified by:
setFlushMode
in interfaceProcedureCallImplementor<R>
- Specified by:
setFlushMode
in interfaceQuery
- Specified by:
setFlushMode
in interfaceQuery<R>
- Specified by:
setFlushMode
in interfaceSelectionQuery<R>
- Specified by:
setFlushMode
in interfaceStoredProcedureQuery
- Specified by:
setFlushMode
in interfaceTypedQuery<R>
- Overrides:
setFlushMode
in classAbstractQuery<R>
- See Also:
-
setParameter
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 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:
-
setParameter
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceProcedureCall
- Specified by:
setParameter
in interfaceProcedureCallImplementor<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 interfaceStoredProcedureQuery
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
-
setParameter
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 interfaceProcedureCall
- Specified by:
setParameter
in interfaceProcedureCallImplementor<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 interfaceStoredProcedureQuery
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
-
setParameter
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 interfaceProcedureCall
- Specified by:
setParameter
in interfaceProcedureCallImplementor<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 interfaceStoredProcedureQuery
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
-
setParameter
public <P> ProcedureCallImplementor<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 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
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 interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
-
setParameter
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 interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
-
setParameter
public ProcedureCallImplementor<R> setParameter(Parameter<Calendar> parameter, Calendar value, TemporalType temporalPrecision) Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceProcedureCall
- Specified by:
setParameter
in interfaceProcedureCallImplementor<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 interfaceStoredProcedureQuery
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
-
setParameter
public ProcedureCallImplementor<R> setParameter(Parameter<Date> parameter, Date value, TemporalType temporalPrecision) Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceProcedureCall
- Specified by:
setParameter
in interfaceProcedureCallImplementor<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 interfaceStoredProcedureQuery
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
-
setParameter
public ProcedureCallImplementor<R> setParameter(String name, Calendar value, TemporalType temporalPrecision) Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceProcedureCall
- Specified by:
setParameter
in interfaceProcedureCallImplementor<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 interfaceStoredProcedureQuery
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
-
setParameter
public ProcedureCallImplementor<R> setParameter(String name, Date value, TemporalType temporalPrecision) Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceProcedureCall
- Specified by:
setParameter
in interfaceProcedureCallImplementor<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 interfaceStoredProcedureQuery
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
-
setParameter
public ProcedureCallImplementor<R> setParameter(int position, Calendar value, TemporalType temporalPrecision) Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceProcedureCall
- Specified by:
setParameter
in interfaceProcedureCallImplementor<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 interfaceStoredProcedureQuery
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
-
setParameter
public ProcedureCallImplementor<R> setParameter(int position, Date value, TemporalType temporalPrecision) Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceProcedureCall
- Specified by:
setParameter
in interfaceProcedureCallImplementor<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 interfaceStoredProcedureQuery
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractQuery<R>
- See Also:
-
getResultStream
Description copied from interface:SelectionQuery
Execute the query and return the query results as aStream
. If the query contains multiple items in the selection list, then by default each result in the stream is packaged in an array of typeObject[]
.The client should call
BaseStream.close()
after processing the stream so that resources are freed as soon as possible.- Specified by:
getResultStream
in interfaceQuery
- Specified by:
getResultStream
in interfaceQuery<R>
- Specified by:
getResultStream
in interfaceSelectionQuery<R>
- Specified by:
getResultStream
in interfaceTypedQuery<R>
- Overrides:
getResultStream
in classAbstractSelectionQuery<R>
- Returns:
- The results as a
Stream
-
stream
Description copied from interface:SelectionQuery
Execute the query and return the query results as aStream
. If the query contains multiple items in the selection list, then by default each result in the stream is packaged in an array of typeObject[]
.The client should call
BaseStream.close()
after processing the stream so that resources are freed as soon as possible.- Specified by:
stream
in interfaceQuery<R>
- Specified by:
stream
in interfaceSelectionQuery<R>
- Overrides:
stream
in classAbstractSelectionQuery<R>
- Returns:
- The results as a
Stream
-
getResultSetMapping
-
setCacheRetrieveMode
- Specified by:
setCacheRetrieveMode
in interfaceProcedureCallImplementor<R>
- Specified by:
setCacheRetrieveMode
in interfaceQuery
- Specified by:
setCacheRetrieveMode
in interfaceQuery<R>
- Specified by:
setCacheRetrieveMode
in interfaceSelectionQuery<R>
- Specified by:
setCacheRetrieveMode
in interfaceStoredProcedureQuery
- Specified by:
setCacheRetrieveMode
in interfaceTypedQuery<R>
- Overrides:
setCacheRetrieveMode
in classAbstractQuery<R>
- See Also:
-
setCacheStoreMode
- Specified by:
setCacheStoreMode
in interfaceProcedureCallImplementor<R>
- Specified by:
setCacheStoreMode
in interfaceQuery
- Specified by:
setCacheStoreMode
in interfaceQuery<R>
- Specified by:
setCacheStoreMode
in interfaceSelectionQuery<R>
- Specified by:
setCacheStoreMode
in interfaceStoredProcedureQuery
- Specified by:
setCacheStoreMode
in interfaceTypedQuery<R>
- Overrides:
setCacheStoreMode
in classAbstractQuery<R>
- See Also:
-