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- Author:
- Steve Ebersole
-
Field Summary
Fields inherited from class org.hibernate.query.spi.AbstractQuery
logFields inherited from class org.hibernate.query.spi.AbstractSelectionQuery
CRITERIA_HQL_STRINGFields 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 voidaddSynchronizedQuerySpaces(EntityPersister persister) applyGraph(RootGraph graph, GraphSemantic semantic) Apply the given graph using the given semanticprotected voidapplyGraph(RootGraphImplementor<?> entityGraph, GraphSemantic graphSemantic) protected voidapplyOptions(NamedCallableQueryMemento memento) protected intdoList()protected ScrollableResultsImplementor<R>doScroll(ScrollMode scrollMode) booleanexecute()Return true if the first result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any.getKeyedResultList(KeyedPage<R> page) Execute the query and return the results for the given page, using key-based pagination.Get the rootLockModeTypefor the querygetOutputParameterValue(int position) Retrieve a value passed back from the procedure through an INOUT or OUT parameter.getOutputParameterValue(String parameterName) Retrieve a value passed back from the procedure through an INOUT or OUT parameter.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, ornullin the case of a criteria query.Retrieve all registered parameters.longDetermine the size of the query result list that would be returned by callingSelectionQuery.getResultList()with no offset or limit applied to the query.Retrieve the list of results from the next result set.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, ornullif the query returns no results.Obtain the list of query spaces this query is synchronized with.intReturn the update count or -1 if there is no pending result or if the next result is not an update count.booleanReturn true if the next result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any.booleanDoes thisProcedureCallrepresent 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 ProcedureOutputsoutputs()<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) Register a positional parameter.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) Register a named parameter.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.setFlushMode(FlushModeType flushModeType) Set theFlushModein to use for this query.Set a hint.setLockMode(LockModeType lockMode) Specify the root LockModeType for the querysetLockMode(String alias, LockMode lockMode) Specify aLockModeto 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) QueryoverridesetParameter(int position, Date value, TemporalType temporalPrecision) QueryoverridesetParameter(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) QueryoverridesetParameter(Parameter<Date> parameter, Date value, TemporalType temporalPrecision) QueryoverridesetParameter(Parameter<P> parameter, P value) QueryoverridesetParameter(String name, Object value) Bind the given argument to a named query parameter.setParameter(String name, Calendar value, TemporalType temporalPrecision) QueryoverridesetParameter(String name, Date value, TemporalType temporalPrecision) QueryoverridesetParameter(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.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> TReturn an object of the specified type to allow access to the provider-specific API.Methods inherited from class org.hibernate.query.spi.AbstractQuery
addQueryHint, applyOptions, collectHints, disableFetchProfile, enableFetchProfile, executeUpdate, getComment, getFirstResult, getFlushMode, getLockOptions, getMaxResults, getParameters, getSupportedHints, isCacheable, prepareForExecution, resolveJdbcParameterTypeIfNecessary, setCacheable, setCacheMode, setCacheRegion, setCacheRetrieveMode, setCacheStoreMode, 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, setQueryPlanCacheable, setReadOnly, setResultListTransformer, setTimeout, setTupleTransformerMethods inherited from class org.hibernate.query.spi.AbstractSelectionQuery
afterQuery, afterQuery, afterQueryHandlingFetchProfiles, beforeQuery, beforeQueryHandlingFetchProfiles, getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getCallback, getFetchSize, getHibernateLockMode, hasCallbackActions, isQueryPlanCacheable, isReadOnly, list, requiresTxn, resetCallback, scroll, setAliasSpecificLockMode, setFollowOnLocking, setHibernateLockMode, uniqueElement, uniqueResult, uniqueResultOptionalMethods inherited from class org.hibernate.query.spi.AbstractCommonQueryContract
applyAdditionalPossibleHints, applyAliasSpecificLockModeHint, applyCacheableHint, applyCacheModeHint, applyCacheRegionHint, applyCommentHint, applyDatabaseHint, applyEntityGraphHint, applyFetchSizeHint, applyFirstResult, applyFlushModeHint, applyFollowOnLockingHint, applyGraph, applyHibernateLockMode, applyHint, applyJpaCacheRetrieveModeHint, applyJpaCacheStoreModeHint, applyJpaFlushMode, applyLockModeHint, applyLockModeType, applyLockTimeoutHint, applyLockTimeoutHint, applyMaxResults, applyQueryPlanCacheableHint, applyResultListTransformer, applySelectionHint, applySynchronizeSpacesHint, applyTimeoutHint, applyTupleTransformer, determineType, getHibernateFlushMode, getHints, getIntegerLiteral, getJpaFlushMode, getMaxRows, getParameter, getParameter, getParameter, getParameter, getParameterValue, getParameterValue, getParameterValue, getSession, getTimeout, isBound, locateBinding, locateBinding, locateBinding, locateBinding, putIfNotNull, putIfNotNullMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.CommonQueryContract
getFlushMode, getHibernateFlushMode, getTimeoutMethods inherited from interface org.hibernate.query.spi.DomainQueryExecutionContext
getResultType, getSessionMethods inherited from interface org.hibernate.procedure.ProcedureCall
closeMethods inherited from interface jakarta.persistence.Query
getFirstResult, getFlushMode, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBoundMethods inherited from interface org.hibernate.query.Query
addQueryHint, applyFetchGraph, applyLoadGraph, disableFetchProfile, enableFetchProfile, executeUpdate, getComment, getLockOptions, list, setCacheable, setCacheMode, setCacheRegion, setCacheRetrieveMode, setCacheStoreMode, setComment, setEntityGraph, setFetchSize, setFirstResult, setHibernateFlushMode, setMaxResults, setPage, setReadOnly, setTimeout, uniqueResult, uniqueResultOptionalMethods 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, setTupleTransformerMethods inherited from interface org.hibernate.result.spi.ResultContext
getSessionMethods inherited from interface org.hibernate.query.SelectionQuery
getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFetchSize, getFirstResult, getHibernateLockMode, getMaxResults, isCacheable, isQueryPlanCacheable, isReadOnly, setAliasSpecificLockMode, setFollowOnLocking, setHibernateLockMode, setQueryPlanCacheableMethods inherited from interface jakarta.persistence.StoredProcedureQuery
executeUpdate
-
Constructor Details
-
Method Details
-
applyOptions
-
getProcedureName
Description copied from interface:ProcedureCallGet the name of the stored procedure (or function) to be called.- Specified by:
getProcedureNamein interfaceProcedureCall- Returns:
- The procedure name.
-
getQueryOptions
Description copied from interface:QueryGet 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:
getQueryOptionsin interfaceDomainQueryExecutionContext- Specified by:
getQueryOptionsin interfaceQuery<R>- Specified by:
getQueryOptionsin interfaceResultContext- Overrides:
getQueryOptionsin classAbstractQuery<R>- Returns:
- Return the encapsulation of this query's options.
-
getParameterMetadata
Description copied from interface:QueryAccess to information about query parameters.- Specified by:
getParameterMetadatain interfaceProcedureCallImplementor<R>- Specified by:
getParameterMetadatain interfaceQuery<R>- Specified by:
getParameterMetadatain classAbstractCommonQueryContract- Returns:
- information about query parameters.
-
getQueryParameterBindings
Description copied from interface:DomainQueryExecutionContextThe domain parameter bindings- Specified by:
getQueryParameterBindingsin interfaceDomainQueryExecutionContext- Specified by:
getQueryParameterBindingsin classAbstractCommonQueryContract
-
getParameterStrategy
- Specified by:
getParameterStrategyin interfaceProcedureCallImplementor<R>
-
isFunctionCall
public boolean isFunctionCall()Description copied from interface:ProcedureCallDoes thisProcedureCallrepresent a call to a databaseFUNCTION, as opposed to aPROCEDURE?- Specified by:
isFunctionCallin interfaceProcedureCall- Returns:
trueindicates that this ProcedureCall represents a function call;falseindicates a procedure call.
-
getFunctionReturn
- Specified by:
getFunctionReturnin interfaceProcedureCallImplementor<R>
-
markAsFunctionCall
Description copied from interface:ProcedureCallMark this ProcedureCall as representing a call to a database function, rather than a database procedure.- Specified by:
markAsFunctionCallin interfaceProcedureCall- Parameters:
sqlType- TheTypescode for the function return- Returns:
this, for method chaining
-
markAsFunctionCall
Description copied from interface:ProcedureCallMark this ProcedureCall as representing a call to a database function, rather than a database procedure.- Specified by:
markAsFunctionCallin interfaceProcedureCall- Parameters:
resultType- The result type for the function return- Returns:
this, for method chaining
-
markAsFunctionCall
Description copied from interface:ProcedureCallMark this ProcedureCall as representing a call to a database function, rather than a database procedure.- Specified by:
markAsFunctionCallin interfaceProcedureCall- Parameters:
typeReference- The result type for the function return- Returns:
this, for method chaining
-
getParameterBindings
- Specified by:
getParameterBindingsin interfaceQueryImplementor<R>
-
getSessionFactory
- Overrides:
getSessionFactoryin classAbstractSelectionQuery<R>
-
setOrder
Description copied from interface:SelectionQueryIf 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:SelectionQueryIf 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) Description copied from interface:StoredProcedureQueryRegister a positional parameter. All parameters must be registered.- Specified by:
registerStoredProcedureParameterin interfaceProcedureCall- Specified by:
registerStoredProcedureParameterin interfaceProcedureCallImplementor<R>- Specified by:
registerStoredProcedureParameterin interfaceStoredProcedureQuery- Parameters:
position- parameter positiontype- type of the parametermode- parameter mode- Returns:
- the same query instance
-
registerStoredProcedureParameter
public ProcedureCallImplementor<R> registerStoredProcedureParameter(String parameterName, Class type, ParameterMode mode) Description copied from interface:StoredProcedureQueryRegister a named parameter.- Specified by:
registerStoredProcedureParameterin interfaceProcedureCall- Specified by:
registerStoredProcedureParameterin interfaceProcedureCallImplementor<R>- Specified by:
registerStoredProcedureParameterin interfaceStoredProcedureQuery- Parameters:
parameterName- name of the parameter as registered or specified in metadatatype- type of the parametermode- parameter mode- Returns:
- the same query instance
-
registerStoredProcedureParameter
public ProcedureCallImplementor<R> registerStoredProcedureParameter(int position, BasicTypeReference<?> type, ParameterMode mode) Description copied from interface:ProcedureCallLikeProcedureCall.registerStoredProcedureParameter(int, Class, ParameterMode)but a basic type reference is given instead of a class for the parameter type.- Specified by:
registerStoredProcedureParameterin interfaceProcedureCall- Specified by:
registerStoredProcedureParameterin interfaceProcedureCallImplementor<R>
-
registerStoredProcedureParameter
public ProcedureCallImplementor<R> registerStoredProcedureParameter(String parameterName, BasicTypeReference<?> type, ParameterMode mode) Description copied from interface:ProcedureCallLikeProcedureCall.registerStoredProcedureParameter(String, Class, ParameterMode)but a basic type reference is given instead of a class for the parameter type.- Specified by:
registerStoredProcedureParameterin interfaceProcedureCall- Specified by:
registerStoredProcedureParameterin interfaceProcedureCallImplementor<R>
-
registerParameter
public <T> ProcedureParameter<T> registerParameter(int position, Class<T> javaType, ParameterMode mode) Description copied from interface:ProcedureCallBasic form for registering a positional parameter.- Specified by:
registerParameterin 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:ProcedureCallBasic form for registering a positional parameter.- Specified by:
registerParameterin 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:ProcedureCallRetrieve a previously registered parameter memento by the position under which it was registered.- Specified by:
getParameterRegistrationin 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:ProcedureCallBasic form for registering a named parameter.- Specified by:
registerParameterin 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:ProcedureCallBasic form for registering a named parameter.- Specified by:
registerParameterin 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:ProcedureCallRetrieve a previously registered parameter memento by the name under which it was registered.- Specified by:
getParameterRegistrationin interfaceProcedureCall- Parameters:
name- The parameter name- Returns:
- The parameter registration memento
-
getRegisteredParameters
Description copied from interface:ProcedureCallRetrieve all registered parameters.- Specified by:
getRegisteredParametersin interfaceProcedureCall- Returns:
- The (immutable) list of all registered parameters.
-
getOutputs
Description copied from interface:ProcedureCallRetrieves 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:
getOutputsin interfaceProcedureCall- Returns:
- The ProcedureOutputs representation
-
getQueryString
Description copied from interface:QueryThe query as a string, ornullin the case of a criteria query.- Specified by:
getQueryStringin interfaceQuery<R>- Specified by:
getQueryStringin 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:SynchronizeableQueryObtain the list of query spaces this query is synchronized with.- Specified by:
getSynchronizedQuerySpacesin interfaceResultContext- Specified by:
getSynchronizedQuerySpacesin interfaceSynchronizeableQuery- Returns:
- The list of query spaces upon which the query is synchronized.
-
addSynchronizedQuerySpace
Description copied from interface:SynchronizeableQueryAdd 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:
addSynchronizedQuerySpacein interfaceProcedureCall- Specified by:
addSynchronizedQuerySpacein 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:SynchronizeableQueryAdd 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:
addSynchronizedEntityNamein interfaceProcedureCall- Specified by:
addSynchronizedEntityNamein interfaceSynchronizeableQuery- Parameters:
entityName- The name of an entity.- Returns:
this, for method chaining
-
addSynchronizedQuerySpaces
-
addSynchronizedEntityClass
Description copied from interface:SynchronizeableQueryAdd 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:
addSynchronizedEntityClassin interfaceProcedureCall- Specified by:
addSynchronizedEntityClassin interfaceSynchronizeableQuery- Parameters:
entityClass- The class of the entity.- Returns:
this, for method chaining
-
toMemento
Description copied from interface:NameableQueryConvert the query into the memento- Specified by:
toMementoin interfaceNameableQuery- Specified by:
toMementoin interfaceProcedureCall
-
applyGraph
- Overrides:
applyGraphin classAbstractCommonQueryContract
-
applyGraph
Description copied from interface:QueryApply the given graph using the given semantic- Specified by:
applyGraphin interfaceQuery<R>- Parameters:
graph- The graph to apply.semantic- The semantic to use when applying the graph
-
execute
public boolean execute()Description copied from interface:StoredProcedureQueryReturn true if the first result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any.- Specified by:
executein interfaceStoredProcedureQuery- Returns:
- true if first result corresponds to result set
-
outputs
-
doExecuteUpdate
protected int doExecuteUpdate()- Specified by:
doExecuteUpdatein classAbstractQuery<R>
-
getOutputParameterValue
Description copied from interface:StoredProcedureQueryRetrieve a value passed back from the procedure through an INOUT or OUT parameter. For portability, all results corresponding to result sets and update counts must be retrieved before the values of output parameters.- Specified by:
getOutputParameterValuein interfaceStoredProcedureQuery- Parameters:
position- parameter position- Returns:
- the result that is passed back through the parameter
-
getOutputParameterValue
Description copied from interface:StoredProcedureQueryRetrieve a value passed back from the procedure through an INOUT or OUT parameter. For portability, all results corresponding to result sets and update counts must be retrieved before the values of output parameters.- Specified by:
getOutputParameterValuein interfaceStoredProcedureQuery- Parameters:
parameterName- name of the parameter as registered or specified in metadata- Returns:
- the result that is passed back through the parameter
-
hasMoreResults
public boolean hasMoreResults()Description copied from interface:StoredProcedureQueryReturn true if the next result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any.- Specified by:
hasMoreResultsin interfaceStoredProcedureQuery- Returns:
- true if next result corresponds to result set
-
getUpdateCount
public int getUpdateCount()Description copied from interface:StoredProcedureQueryReturn the update count or -1 if there is no pending result or if the next result is not an update count.- Specified by:
getUpdateCountin interfaceStoredProcedureQuery- Returns:
- update count or -1 if there is no pending result or if the next result is not an update count
-
doList
- Specified by:
doListin classAbstractSelectionQuery<R>
-
getResultCount
public long getResultCount()Description copied from interface:SelectionQueryDetermine 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:
getResultCountin interfaceSelectionQuery<R>- Returns:
- the size of the list that would be returned
-
getKeyedResultList
Description copied from interface:SelectionQueryExecute the query and return the results for the given page, using key-based pagination.- Specified by:
getKeyedResultListin interfaceSelectionQuery<R>- Overrides:
getKeyedResultListin 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:SelectionQueryReturns scrollable access to the query results. The capabilities of the returned ScrollableResults depend on the specified ScrollMode.- Specified by:
scrollin interfaceQuery<R>- Specified by:
scrollin interfaceQueryImplementor<R>- Specified by:
scrollin interfaceSelectionQuery<R>- Overrides:
scrollin classAbstractSelectionQuery<R>
-
doScroll
- Specified by:
doScrollin classAbstractSelectionQuery<R>
-
getResultList
Description copied from interface:StoredProcedureQueryRetrieve the list of results from the next result set. The provider will callexecuteon the query if needed. AREF_CURSORresult set, if any, will be retrieved in the order theREF_CURSORparameter was registered with the query.- Specified by:
getResultListin interfaceProcedureCallImplementor<R>- Specified by:
getResultListin interfaceQuery- Specified by:
getResultListin interfaceQuery<R>- Specified by:
getResultListin interfaceSelectionQuery<R>- Specified by:
getResultListin interfaceStoredProcedureQuery- Specified by:
getResultListin interfaceTypedQuery<R>- Returns:
- a list of the results or null is the next item is not a result set
-
getSingleResult
Description copied from interface:SelectionQueryExecute the query and return the single result of the query, throwing an exception if the query returns no results.- Specified by:
getSingleResultin interfaceProcedureCallImplementor<R>- Specified by:
getSingleResultin interfaceQuery- Specified by:
getSingleResultin interfaceQuery<R>- Specified by:
getSingleResultin interfaceSelectionQuery<R>- Specified by:
getSingleResultin interfaceStoredProcedureQuery- Specified by:
getSingleResultin interfaceTypedQuery<R>- Overrides:
getSingleResultin classAbstractSelectionQuery<R>- Returns:
- the single result, only if there is exactly one
-
getSingleResultOrNull
Description copied from interface:SelectionQueryExecute the query and return the single result of the query, ornullif the query returns no results.- Specified by:
getSingleResultOrNullin interfaceSelectionQuery<R>- Overrides:
getSingleResultOrNullin classAbstractSelectionQuery<R>- Returns:
- the single result or
nullif there is no result to return
-
unwrap
Description copied from interface:QueryReturn an object of the specified type to allow access to the provider-specific API. If the provider's query implementation does not support the specified class, thePersistenceExceptionis thrown. -
setLockMode
Description copied from interface:SelectionQuerySpecify aLockModeto apply to a specific alias defined in the query- Specified by:
setLockModein interfaceQuery<R>- Specified by:
setLockModein interfaceSelectionQuery<R>- Overrides:
setLockModein classAbstractQuery<R>- Parameters:
alias- A query aliaslockMode- The lock mode to apply- Returns:
this, for method chaining- See Also:
-
setLockMode
Description copied from class:AbstractSelectionQuerySpecify the root LockModeType for the query- Specified by:
setLockModein interfaceQuery- Specified by:
setLockModein interfaceQuery<R>- Specified by:
setLockModein interfaceSelectionQuery<R>- Specified by:
setLockModein interfaceTypedQuery<R>- Overrides:
setLockModein classAbstractQuery<R>- Parameters:
lockMode- lock mode- Returns:
- the same query instance
- See Also:
-
getLockMode
Description copied from interface:SelectionQueryGet the rootLockModeTypefor the query- Specified by:
getLockModein interfaceQuery- Specified by:
getLockModein interfaceSelectionQuery<R>- Overrides:
getLockModein classAbstractQuery<R>- Returns:
- lock mode
- See Also:
-
setLockOptions
Description copied from interface:QueryApply 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:
setLockOptionsin interfaceQuery<R>- Overrides:
setLockOptionsin classAbstractQuery<R>- Parameters:
lockOptions- The lock options to apply to the query.- Returns:
this, for method chaining- See Also:
-
setHint
Description copied from interface:CommonQueryContractSet a hint. The hints understood by Hibernate are enumerated byAvailableHints.- Specified by:
setHintin interfaceCommonQueryContract- Specified by:
setHintin interfaceMutationQuery- Specified by:
setHintin interfaceProcedureCall- Specified by:
setHintin interfaceProcedureCallImplementor<R>- Specified by:
setHintin interfaceQuery- Specified by:
setHintin interfaceQuery<R>- Specified by:
setHintin interfaceSelectionQuery<R>- Specified by:
setHintin interfaceStoredProcedureQuery- Specified by:
setHintin interfaceTypedQuery<R>- Overrides:
setHintin classAbstractQuery<R>- Parameters:
hintName- name of property or hintvalue- value for the property or hint- Returns:
- the same query instance
- See Also:
-
setFlushMode
Description copied from interface:CommonQueryContractSet theFlushModein to use for this query.- Specified by:
setFlushModein interfaceCommonQueryContract- Specified by:
setFlushModein interfaceMutationQuery- Specified by:
setFlushModein interfaceProcedureCall- Specified by:
setFlushModein interfaceProcedureCallImplementor<R>- Specified by:
setFlushModein interfaceQuery- Specified by:
setFlushModein interfaceQuery<R>- Specified by:
setFlushModein interfaceSelectionQuery<R>- Specified by:
setFlushModein interfaceStoredProcedureQuery- Specified by:
setFlushModein interfaceTypedQuery<R>- Overrides:
setFlushModein classAbstractQuery<R>- Parameters:
flushModeType- flush mode- Returns:
- the same query instance
- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind 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:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Overrides:
setParameterin 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:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceProcedureCall- Specified by:
setParameterin interfaceProcedureCallImplementor<R>- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceStoredProcedureQuery- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractQuery<R>- Parameters:
parameter- parameter objectvalue- parameter value- Returns:
- the same query instance
- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind 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:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceProcedureCall- Specified by:
setParameterin interfaceProcedureCallImplementor<R>- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceStoredProcedureQuery- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractQuery<R>- Parameters:
name- parameter namevalue- parameter value- Returns:
- the same query instance
- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind 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:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceProcedureCall- Specified by:
setParameterin interfaceProcedureCallImplementor<R>- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceStoredProcedureQuery- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractQuery<R>- Parameters:
position- positionvalue- parameter value- Returns:
- the same query instance
- See Also:
-
setParameter
public <P> ProcedureCallImplementor<R> setParameter(QueryParameter<P> parameter, P value, BindableType<P> type) Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter, using the givenBindableType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Overrides:
setParameterin classAbstractQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be nulltype- aBindableTyperepresenting the type of the parameter- Returns:
this, for method chaining
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenBindableType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Overrides:
setParameterin classAbstractQuery<R>
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenBindableType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Overrides:
setParameterin classAbstractQuery<R>
-
setParameter
public ProcedureCallImplementor<R> setParameter(Parameter<Calendar> parameter, Calendar value, TemporalType temporalPrecision) Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceProcedureCall- Specified by:
setParameterin interfaceProcedureCallImplementor<R>- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceStoredProcedureQuery- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractQuery<R>- Parameters:
parameter- parameter objectvalue- parameter valuetemporalPrecision- temporal type- Returns:
- the same query instance
- See Also:
-
setParameter
public ProcedureCallImplementor<R> setParameter(Parameter<Date> parameter, Date value, TemporalType temporalPrecision) Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceProcedureCall- Specified by:
setParameterin interfaceProcedureCallImplementor<R>- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceStoredProcedureQuery- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractQuery<R>- Parameters:
parameter- parameter objectvalue- parameter valuetemporalPrecision- temporal type- Returns:
- the same query instance
- See Also:
-
setParameter
public ProcedureCallImplementor<R> setParameter(String name, Calendar value, TemporalType temporalPrecision) Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceProcedureCall- Specified by:
setParameterin interfaceProcedureCallImplementor<R>- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceStoredProcedureQuery- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractQuery<R>- Parameters:
name- parameter namevalue- parameter valuetemporalPrecision- temporal type- Returns:
- the same query instance
- See Also:
-
setParameter
public ProcedureCallImplementor<R> setParameter(String name, Date value, TemporalType temporalPrecision) Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceProcedureCall- Specified by:
setParameterin interfaceProcedureCallImplementor<R>- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceStoredProcedureQuery- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractQuery<R>- Parameters:
name- parameter namevalue- parameter valuetemporalPrecision- temporal type- Returns:
- the same query instance
- See Also:
-
setParameter
public ProcedureCallImplementor<R> setParameter(int position, Calendar value, TemporalType temporalPrecision) Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceProcedureCall- Specified by:
setParameterin interfaceProcedureCallImplementor<R>- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceStoredProcedureQuery- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractQuery<R>- Parameters:
position- positionvalue- parameter valuetemporalPrecision- temporal type- Returns:
- the same query instance
- See Also:
-
setParameter
public ProcedureCallImplementor<R> setParameter(int position, Date value, TemporalType temporalPrecision) Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceProcedureCall- Specified by:
setParameterin interfaceProcedureCallImplementor<R>- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceStoredProcedureQuery- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractQuery<R>- Parameters:
position- positionvalue- parameter valuetemporalPrecision- temporal type- Returns:
- the same query instance
- See Also:
-
getResultStream
Description copied from interface:SelectionQueryExecute 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:
getResultStreamin interfaceQuery- Specified by:
getResultStreamin interfaceQuery<R>- Specified by:
getResultStreamin interfaceSelectionQuery<R>- Specified by:
getResultStreamin interfaceTypedQuery<R>- Overrides:
getResultStreamin classAbstractSelectionQuery<R>- Returns:
- The results as a
Stream - See Also:
-
stream
Description copied from interface:SelectionQueryExecute 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:
streamin interfaceQuery<R>- Specified by:
streamin interfaceSelectionQuery<R>- Overrides:
streamin classAbstractSelectionQuery<R>- Returns:
- The results as a
Stream
-
getResultSetMapping
-