Class QuerySqmImpl<R>
- java.lang.Object
-
- org.hibernate.query.spi.AbstractCommonQueryContract
-
- org.hibernate.query.spi.AbstractSelectionQuery<R>
-
- org.hibernate.query.sqm.internal.QuerySqmImpl<R>
-
- All Implemented Interfaces:
jakarta.persistence.Query,jakarta.persistence.TypedQuery<R>,CommonQueryContract,SqmQueryImplementor<R>,MutationQuery,NameableQuery,Query<R>,SelectionQuery<R>,DomainQueryExecutionContext,QueryImplementor<R>,SqmQuery,SqmInterpretationsKey.CacheabilityInfluencers,SqmInterpretationsKey.InterpretationsKeySource
public class QuerySqmImpl<R> extends AbstractSelectionQuery<R> implements SqmQueryImplementor<R>, SqmInterpretationsKey.InterpretationsKeySource, DomainQueryExecutionContext
Queryimplementation based on an SQM
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQuerySqmImpl.UniqueSemanticFilterQueryOption
-
Field Summary
-
Fields inherited from class org.hibernate.query.spi.AbstractSelectionQuery
CRITERIA_HQL_STRING
-
-
Constructor Summary
Constructors Constructor Description QuerySqmImpl(String hql, HqlInterpretation hqlInterpretation, Class<R> resultType, SharedSessionContractImplementor session)Form used for HQL queriesQuerySqmImpl(NamedCriteriaQueryMementoImpl memento, Class<R> resultType, SharedSessionContractImplementor session)QuerySqmImpl(NamedHqlQueryMementoImpl memento, Class<R> expectedResultType, SharedSessionContractImplementor session)Creates a Query instance from a named HQL mementoQuerySqmImpl(SqmStatement<R> criteria, Class<R> resultType, SharedSessionContractImplementor producer)Form used for criteria queries
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SqmQueryImplementor<R>addQueryHint(String hint)Add a database query hint to the SQL query.protected voidapplyAliasSpecificLockModeHint(String hintName, Object value)protected voidapplyFollowOnLockingHint(Boolean followOnLocking)SqmQueryImplementor<R>applyGraph(RootGraph graph, GraphSemantic semantic)Apply the given graph using the given semanticprotected voidapplyHibernateLockMode(LockMode value)protected voidapplyLockModeType(jakarta.persistence.LockModeType value)protected voidapplyLockTimeoutHint(int timeout)protected voidapplyLockTimeoutHint(Integer timeout)protected voidcollectHints(Map<String,Object> hints)protected intdoExecuteUpdate()protected List<R>doList()protected ScrollableResultsImplementordoScroll(ScrollMode scrollMode)intexecuteUpdate()Execute an insert, update, or delete statement, and return the number of affected entities.DomainParameterXrefgetDomainParameterXref()jakarta.persistence.FlushModeTypegetFlushMode()The JPAFlushModeTypein effect for this query.LoadQueryInfluencersgetLoadQueryInfluencers()jakarta.persistence.LockModeTypegetLockMode()LockOptionsgetLockOptions()The LockOptions currently in effect for the queryQueryParameterBindingsgetParameterBindings()ParameterMetadataImplementorgetParameterMetadata()Access to information about query parameters.QueryParameterBindingsgetQueryParameterBindings()The domain parameter bindingsStringgetQueryString()The query as a string, ornullin the case of a criteria query.Class<R>getResultType()RgetSingleResult()Execute the query and return the single result of the query, throwing an exception if the query returns no results.SqmStatementgetSqmStatement()protected booleanhasMultiValuedParameterBindings()Supplier<Boolean>hasMultiValuedParameterBindingsChecker()List<R>list()Execute the query and return the query results as aList.protected voidprepareForExecution()protected booleanresolveJdbcParameterTypeIfNecessary()ScrollableResultsImplementor<R>scroll()Returns scrollable access to the query results.ScrollableResultsImplementor<R>scroll(ScrollMode scrollMode)Returns scrollable access to the query results.SqmQueryImplementor<R>setCacheable(boolean cacheable)Enable/disable second level query (result) caching for this query.SqmQueryImplementor<R>setCacheMode(CacheMode cacheMode)Set the current CacheMode in effect for this query.SqmQueryImplementor<R>setCacheRegion(String cacheRegion)Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()).SqmQueryImplementor<R>setComment(String comment)Set a comment for this query.SqmQueryImplementor<R>setFetchSize(int fetchSize)Sets a JDBC fetch size hint for the query.SqmQueryImplementor<R>setFirstResult(int startPosition)Set the first row position to return from the query results.SqmQueryImplementor<R>setFlushMode(jakarta.persistence.FlushModeType flushMode)Set theFlushModein to use for this query.SqmQueryImplementor<R>setHibernateFlushMode(FlushMode flushMode)Set the currentFlushModein effect for this query.SqmQueryImplementor<R>setHint(String hintName, Object value)Apply hints to the query.SqmQueryImplementor<R>setLockMode(jakarta.persistence.LockModeType lockMode)Specify the root LockModeType for the querySqmQueryImplementor<R>setLockMode(String alias, LockMode lockMode)Set theLockModeto use for particular alias defined in theFROMclause of the query.SqmQueryImplementor<R>setLockOptions(LockOptions lockOptions)Set the lock options for the query.SqmQueryImplementor<R>setMaxResults(int maxResult)Set the max number of rows requested for the query results.voidsetOptionalEntityName(String entityName)voidsetOptionalId(Serializable id)voidsetOptionalObject(Object optionalObject)SqmQueryImplementor<R>setParameter(int position, Object value)Bind the given argument to an ordinal query parameter.SqmQueryImplementor<R>setParameter(int position, Instant value, jakarta.persistence.TemporalType temporalType)Bind anInstantto an ordinal query parameter using just the portion indicated by the givenTemporalType.SqmQueryImplementor<R>setParameter(int position, Calendar value, jakarta.persistence.TemporalType temporalType)QueryoverrideSqmQueryImplementor<R>setParameter(int position, Date value, jakarta.persistence.TemporalType temporalType)Queryoverride<P> SqmQueryImplementor<R>setParameter(int position, P value, Class<P> javaType)Bind the given argument to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmQueryImplementor<R>setParameter(int position, P value, BindableType<P> type)Bind the given argument to an ordinal query parameter using the givenBindableType.SqmQueryImplementor<R>setParameter(jakarta.persistence.Parameter<Calendar> param, Calendar value, jakarta.persistence.TemporalType temporalType)QueryoverrideSqmQueryImplementor<R>setParameter(jakarta.persistence.Parameter<Date> param, Date value, jakarta.persistence.TemporalType temporalType)Queryoverride<P> SqmQueryImplementor<R>setParameter(jakarta.persistence.Parameter<P> parameter, P value)QueryoverrideSqmQueryImplementor<R>setParameter(String name, Object value)Bind the given argument to a named query parameter.SqmQueryImplementor<R>setParameter(String name, Instant value, jakarta.persistence.TemporalType temporalType)Bind anInstantto the named query parameter using just the portion indicated by the givenTemporalType.SqmQueryImplementor<R>setParameter(String name, Calendar value, jakarta.persistence.TemporalType temporalType)QueryoverrideSqmQueryImplementor<R>setParameter(String name, Date value, jakarta.persistence.TemporalType temporalType)Queryoverride<P> SqmQueryImplementor<R>setParameter(String name, P value, Class<P> javaType)Bind the given argument to a named query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmQueryImplementor<R>setParameter(String name, P value, BindableType<P> type)Bind the given argument to a named query parameter using the givenBindableType.<P> SqmQueryImplementor<R>setParameter(QueryParameter<P> parameter, P value)Bind an argument to the query parameter represented by the givenQueryParameter.<P> SqmQueryImplementor<R>setParameter(QueryParameter<P> parameter, P value, Class<P> javaType)Bind an argument to the query parameter represented by the givenQueryParameter, using the givenClassreference to attempt to infer theBindableTypeto use.<P> SqmQueryImplementor<R>setParameter(QueryParameter<P> parameter, P value, BindableType<P> type)Bind an argument to the query parameter represented by the givenQueryParameter, using the givenBindableType.SqmQueryImplementor<R>setParameterList(int position, Object[] values)Bind multiple arguments to an ordinal query parameter.SqmQueryImplementor<R>setParameterList(int position, Collection values)Bind multiple arguments to an ordinal query parameter.<P> SqmQueryImplementor<R>setParameterList(int position, Collection<? extends P> values, Class<P> javaType)Bind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmQueryImplementor<R>setParameterList(int position, Collection<? extends P> values, BindableType<P> type)Bind multiple arguments to an ordinal query parameter using the givenBindableType.<P> SqmQueryImplementor<R>setParameterList(int position, P[] values, Class<P> javaType)Bind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmQueryImplementor<R>setParameterList(int position, P[] values, BindableType<P> type)Bind multiple arguments to an ordinal query parameter using the givenBindableType.SqmQueryImplementor<R>setParameterList(String name, Object[] values)Bind multiple arguments to a named query parameter.SqmQueryImplementor<R>setParameterList(String name, Collection values)Bind multiple arguments to a named query parameter.<P> SqmQueryImplementor<R>setParameterList(String name, Collection<? extends P> values, Class<P> javaType)Bind multiple arguments to a named query parameter using the givenClassreference to attempt to infer theBindableTypeIf unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).<P> SqmQueryImplementor<R>setParameterList(String name, Collection<? extends P> values, BindableType<P> type)Bind multiple arguments to a named query parameter using the givenBindableType.<P> SqmQueryImplementor<R>setParameterList(String name, P[] values, Class<P> javaType)Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine theBindableTypeto use.<P> SqmQueryImplementor<R>setParameterList(String name, P[] values, BindableType<P> type)Bind multiple arguments to a named query parameter using the givenBindableType.<P> SqmQueryImplementor<R>setParameterList(QueryParameter<P> parameter, Collection<? extends P> values)Bind multiple arguments to the query parameter represented by the givenQueryParameter.<P> SqmQueryImplementor<R>setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType)Bind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theBindableTypeto use.<P> SqmQueryImplementor<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> SqmQueryImplementor<R>setParameterList(QueryParameter<P> parameter, P[] values)Bind multiple arguments to the query parameter represented by the givenQueryParameter.<P> SqmQueryImplementor<R>setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType)Bind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theBindableTypeto use.<P> SqmQueryImplementor<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.SqmQueryImplementor<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.SqmQueryImplementor<R>setProperties(Map bean)Bind the values of the givenMapto named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.SqmQueryImplementor<R>setReadOnly(boolean readOnly)Set the read-only/modifiable mode for entities and proxies loaded by this Query.SqmQueryImplementor<R>setResultListTransformer(ResultListTransformer transformer)Set aResultListTransformerSqmQueryImplementor<R>setTimeout(int timeout)Set the query timeout in seconds.<T> SqmQueryImplementor<T>setTupleTransformer(TupleTransformer<T> transformer)Set aTupleTransformerStream<R>stream()Execute the query and return the query results as aStream.NamedQueryMementotoMemento(String name)Convert the query into the mementoRuniqueResult()Execute the query and return the single result of the query, ornullif the query returns no results.Optional<R>uniqueResultOptional()Execute the query and return the single result of the query, as anOptional.static QueryOptionsuniqueSemanticQueryOptions(QueryOptions originalOptions)<T> Tunwrap(Class<T> cls)protected voidverifySelect()-
Methods inherited from class org.hibernate.query.spi.AbstractSelectionQuery
afterQuery, applyOptions, applyOptions, beforeQuery, buildTupleMetadata, checkQueryReturnType, getCacheMode, getCacheRegion, getCallback, getFetchSize, getSessionFactory, getSingleResultOrNull, hasAppliedGraph, hasLimit, isCacheable, isReadOnly, requiresTxn, resetCallback, setAliasSpecificLockMode, setFollowOnLocking, setHibernateLockMode, uniqueElement, verifyResultType, visitQueryReturnType
-
Methods inherited from class org.hibernate.query.spi.AbstractCommonQueryContract
applyAdditionalPossibleHints, applyCacheableHint, applyCacheModeHint, applyCacheRegionHint, applyCommentHint, applyEntityGraphHint, applyFetchSizeHint, applyFirstResult, applyFlushModeHint, applyGraph, applyGraph, applyHint, applyJpaCacheRetrieveModeHint, applyJpaCacheStoreModeHint, applyJpaFlushMode, applyLockModeHint, applyMaxResults, applyResultListTransformer, applySelectionHint, applySynchronizeSpacesHint, applyTimeoutHint, applyTupleTransformer, determineType, getComment, getFirstResult, getHibernateFlushMode, getHints, getIntegerLiteral, getJpaFlushMode, getMaxResults, getMaxRows, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getQueryOptions, 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
getHibernateFlushMode, getTimeout
-
Methods inherited from interface org.hibernate.query.spi.DomainQueryExecutionContext
getCallback, getQueryOptions, getSession
-
Methods inherited from interface jakarta.persistence.Query
getFirstResult, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound
-
Methods inherited from interface org.hibernate.query.Query
getComment, getQueryOptions, getResultList, getResultStream
-
Methods inherited from interface org.hibernate.query.spi.QueryImplementor
getSession
-
Methods inherited from interface org.hibernate.query.SelectionQuery
getCacheMode, getCacheRegion, getFetchSize, getFirstResult, getMaxResults, getSingleResultOrNull, isCacheable, isReadOnly, setAliasSpecificLockMode, setFollowOnLocking, setHibernateLockMode
-
Methods inherited from interface org.hibernate.query.sqm.internal.SqmInterpretationsKey.CacheabilityInfluencers
getQueryOptions
-
Methods inherited from interface org.hibernate.query.spi.SqmQuery
getQueryOptions
-
Methods inherited from interface org.hibernate.query.hql.spi.SqmQueryImplementor
applyFetchGraph, applyLoadGraph, setResultTransformer
-
-
-
-
Constructor Detail
-
QuerySqmImpl
public QuerySqmImpl(NamedHqlQueryMementoImpl memento, Class<R> expectedResultType, SharedSessionContractImplementor session)
Creates a Query instance from a named HQL memento
-
QuerySqmImpl
public QuerySqmImpl(NamedCriteriaQueryMementoImpl memento, Class<R> resultType, SharedSessionContractImplementor session)
-
QuerySqmImpl
public QuerySqmImpl(String hql, HqlInterpretation hqlInterpretation, Class<R> resultType, SharedSessionContractImplementor session)
Form used for HQL queries
-
QuerySqmImpl
public QuerySqmImpl(SqmStatement<R> criteria, Class<R> resultType, SharedSessionContractImplementor producer)
Form used for criteria queries
-
-
Method Detail
-
getQueryString
public String 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 interfaceSqmInterpretationsKey.CacheabilityInfluencers- Specified by:
getQueryStringin interfaceSqmQuery- Specified by:
getQueryStringin classAbstractSelectionQuery<R>
-
getSqmStatement
public SqmStatement getSqmStatement()
- Specified by:
getSqmStatementin interfaceSqmQuery- Specified by:
getSqmStatementin interfaceSqmQueryImplementor<R>
-
getDomainParameterXref
public DomainParameterXref getDomainParameterXref()
-
getParameterMetadata
public ParameterMetadataImplementor getParameterMetadata()
Description copied from interface:QueryAccess to information about query parameters.- Specified by:
getParameterMetadatain interfaceQuery<R>- Specified by:
getParameterMetadatain interfaceSqmQuery- Specified by:
getParameterMetadatain interfaceSqmQueryImplementor<R>- Specified by:
getParameterMetadatain classAbstractCommonQueryContract- Returns:
- information about query parameters.
-
getQueryParameterBindings
public QueryParameterBindings getQueryParameterBindings()
Description copied from interface:DomainQueryExecutionContextThe domain parameter bindings- Specified by:
getQueryParameterBindingsin interfaceDomainQueryExecutionContext- Specified by:
getQueryParameterBindingsin classAbstractCommonQueryContract
-
getParameterBindings
public QueryParameterBindings getParameterBindings()
- Specified by:
getParameterBindingsin interfaceQueryImplementor<R>
-
getResultType
public Class<R> getResultType()
- Specified by:
getResultTypein interfaceSqmInterpretationsKey.InterpretationsKeySource
-
getLoadQueryInfluencers
public LoadQueryInfluencers getLoadQueryInfluencers()
- Specified by:
getLoadQueryInfluencersin interfaceSqmInterpretationsKey.CacheabilityInfluencers
-
resolveJdbcParameterTypeIfNecessary
protected boolean resolveJdbcParameterTypeIfNecessary()
- Specified by:
resolveJdbcParameterTypeIfNecessaryin classAbstractCommonQueryContract
-
hasMultiValuedParameterBindingsChecker
public Supplier<Boolean> hasMultiValuedParameterBindingsChecker()
- Specified by:
hasMultiValuedParameterBindingsCheckerin interfaceSqmInterpretationsKey.CacheabilityInfluencers
-
hasMultiValuedParameterBindings
protected boolean hasMultiValuedParameterBindings()
-
prepareForExecution
protected void prepareForExecution()
- Specified by:
prepareForExecutionin classAbstractSelectionQuery<R>
-
verifySelect
protected void verifySelect()
-
doList
protected List<R> doList()
- Specified by:
doListin classAbstractSelectionQuery<R>
-
uniqueSemanticQueryOptions
public static QueryOptions uniqueSemanticQueryOptions(QueryOptions originalOptions)
-
doScroll
protected ScrollableResultsImplementor doScroll(ScrollMode scrollMode)
- Specified by:
doScrollin classAbstractSelectionQuery<R>
-
executeUpdate
public int executeUpdate()
Description copied from interface:QueryExecute an insert, update, or delete statement, and return the number of affected entities.For use with instances of
MutationQuerycreated usingQueryProducer.createMutationQuery(String),QueryProducer.createNamedMutationQuery(String),QueryProducer.createNativeMutationQuery(String),QueryProducer.createQuery(jakarta.persistence.criteria.CriteriaUpdate), orQueryProducer.createQuery(jakarta.persistence.criteria.CriteriaDelete).- Specified by:
executeUpdatein interfaceMutationQuery- Specified by:
executeUpdatein interfacejakarta.persistence.Query- Specified by:
executeUpdatein interfaceQuery<R>- Returns:
- the number of affected entity instances (may differ from the number of affected rows)
- See Also:
QueryProducer.createMutationQuery(java.lang.String),QueryProducer.createMutationQuery(String),QueryProducer.createNamedMutationQuery(String),QueryProducer.createNativeMutationQuery(String),Query.executeUpdate(),QueryProducer.createMutationQuery(java.lang.String)
-
doExecuteUpdate
protected int doExecuteUpdate()
-
addQueryHint
public SqmQueryImplementor<R> addQueryHint(String hint)
Description copied from interface:QueryAdd a database query hint to the SQL query.A database hint is a completely different concept to a JPA hint specified using
QueryHintorQuery.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:
addQueryHintin interfaceQuery<R>- Specified by:
addQueryHintin interfaceSqmQueryImplementor<R>- Parameters:
hint- The database specific query hint to add.
-
getLockOptions
public LockOptions getLockOptions()
Description copied from interface:SelectionQueryThe LockOptions currently in effect for the query- Specified by:
getLockOptionsin interfaceQuery<R>- Specified by:
getLockOptionsin interfaceSelectionQuery<R>- Overrides:
getLockOptionsin classAbstractSelectionQuery<R>- Returns:
- The LockOptions
- See Also:
LockOptions
-
setLockOptions
public SqmQueryImplementor<R> setLockOptions(LockOptions lockOptions)
Description copied from interface:QuerySet the lock options for the query.Only the following options are taken into consideration:
For alias-specific locking, useQuery.setLockMode(String, LockMode).- Specified by:
setLockOptionsin interfaceQuery<R>- Specified by:
setLockOptionsin interfaceSqmQueryImplementor<R>- Parameters:
lockOptions- The lock options to apply to the query.- Returns:
this, for method chaining- See Also:
Query.getLockOptions()
-
setLockMode
public SqmQueryImplementor<R> setLockMode(String alias, LockMode lockMode)
Description copied from interface:QuerySet theLockModeto use for particular alias defined in theFROMclause of the query.The alias-specific lock modes specified here are added to the
LockOptions.The effect of alias-specific locking is quite dependent on the driver and database. For maximum portability, the given lock mode should be
LockMode.PESSIMISTIC_WRITE.- Specified by:
setLockModein interfaceQuery<R>- Specified by:
setLockModein interfaceSqmQueryImplementor<R>- Parameters:
alias- a query alias, or"this"for a collection filterlockMode- The lock mode to apply.- Returns:
this, for method chaining- See Also:
Query.getLockOptions()
-
setTupleTransformer
public <T> SqmQueryImplementor<T> setTupleTransformer(TupleTransformer<T> transformer)
Description copied from interface:QuerySet aTupleTransformer- Specified by:
setTupleTransformerin interfaceQuery<R>- Specified by:
setTupleTransformerin interfaceQueryImplementor<R>- Specified by:
setTupleTransformerin interfaceSqmQueryImplementor<R>
-
setResultListTransformer
public SqmQueryImplementor<R> setResultListTransformer(ResultListTransformer transformer)
Description copied from interface:QuerySet aResultListTransformer- Specified by:
setResultListTransformerin interfaceQuery<R>- Specified by:
setResultListTransformerin interfaceQueryImplementor<R>- Specified by:
setResultListTransformerin interfaceSqmQueryImplementor<R>
-
setMaxResults
public SqmQueryImplementor<R> setMaxResults(int maxResult)
Description copied from interface:SelectionQuerySet the max number of rows requested for the query results. Applied to the SQL query- Specified by:
setMaxResultsin interfacejakarta.persistence.Query- Specified by:
setMaxResultsin interfaceQuery<R>- Specified by:
setMaxResultsin interfaceSelectionQuery<R>- Specified by:
setMaxResultsin interfaceSqmQueryImplementor<R>- Specified by:
setMaxResultsin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setMaxResultsin classAbstractSelectionQuery<R>
-
setFirstResult
public SqmQueryImplementor<R> setFirstResult(int startPosition)
Description copied from interface:SelectionQuerySet the first row position to return from the query results. Applied to the SQL query- Specified by:
setFirstResultin interfacejakarta.persistence.Query- Specified by:
setFirstResultin interfaceQuery<R>- Specified by:
setFirstResultin interfaceSelectionQuery<R>- Specified by:
setFirstResultin interfaceSqmQueryImplementor<R>- Specified by:
setFirstResultin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setFirstResultin classAbstractSelectionQuery<R>
-
setHibernateFlushMode
public SqmQueryImplementor<R> setHibernateFlushMode(FlushMode flushMode)
Description copied from interface:CommonQueryContractSet the currentFlushModein effect for this query.- Specified by:
setHibernateFlushModein interfaceCommonQueryContract- Specified by:
setHibernateFlushModein interfaceMutationQuery- Specified by:
setHibernateFlushModein interfaceQuery<R>- Specified by:
setHibernateFlushModein interfaceSelectionQuery<R>- Specified by:
setHibernateFlushModein interfaceSqmQuery- Specified by:
setHibernateFlushModein interfaceSqmQueryImplementor<R>- Overrides:
setHibernateFlushModein classAbstractSelectionQuery<R>- See Also:
CommonQueryContract.getHibernateFlushMode(),Session.getHibernateFlushMode()
-
setFlushMode
public SqmQueryImplementor<R> setFlushMode(jakarta.persistence.FlushModeType flushMode)
Description copied from interface:CommonQueryContractSet theFlushModein to use for this query.- Specified by:
setFlushModein interfaceCommonQueryContract- Specified by:
setFlushModein interfacejakarta.persistence.Query- Specified by:
setFlushModein interfaceQuery<R>- Specified by:
setFlushModein interfaceSelectionQuery<R>- Specified by:
setFlushModein interfaceSqmQueryImplementor<R>- Specified by:
setFlushModein interfacejakarta.persistence.TypedQuery<R>- Overrides:
setFlushModein classAbstractSelectionQuery<R>- See Also:
CommonQueryContract.getHibernateFlushMode(),Session.getHibernateFlushMode()
-
setLockMode
public SqmQueryImplementor<R> setLockMode(jakarta.persistence.LockModeType lockMode)
Description copied from class:AbstractSelectionQuerySpecify the root LockModeType for the query- Specified by:
setLockModein interfacejakarta.persistence.Query- Specified by:
setLockModein interfaceQuery<R>- Specified by:
setLockModein interfaceSelectionQuery<R>- Specified by:
setLockModein interfaceSqmQueryImplementor<R>- Specified by:
setLockModein interfacejakarta.persistence.TypedQuery<R>- Overrides:
setLockModein classAbstractSelectionQuery<R>- See Also:
AbstractSelectionQuery.setHibernateLockMode(org.hibernate.LockMode)
-
getLockMode
public jakarta.persistence.LockModeType getLockMode()
- Specified by:
getLockModein interfacejakarta.persistence.Query
-
getFlushMode
public jakarta.persistence.FlushModeType getFlushMode()
Description copied from interface:CommonQueryContractThe JPAFlushModeTypein effect for this query. By default, the query inherits theFlushModeof theSessionfrom which it originates.- Specified by:
getFlushModein interfaceCommonQueryContract- Specified by:
getFlushModein interfacejakarta.persistence.Query- Overrides:
getFlushModein classAbstractSelectionQuery<R>- See Also:
CommonQueryContract.getHibernateFlushMode(),Session.getHibernateFlushMode()
-
collectHints
protected void collectHints(Map<String,Object> hints)
- Overrides:
collectHintsin classAbstractSelectionQuery<R>
-
setHint
public SqmQueryImplementor<R> setHint(String hintName, Object value)
Description copied from interface:CommonQueryContractApply hints to the query.- Specified by:
setHintin interfaceCommonQueryContract- Specified by:
setHintin interfacejakarta.persistence.Query- Specified by:
setHintin interfaceQuery<R>- Specified by:
setHintin interfaceSelectionQuery<R>- Specified by:
setHintin interfaceSqmQueryImplementor<R>- Specified by:
setHintin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setHintin classAbstractSelectionQuery<R>
-
applyLockTimeoutHint
protected void applyLockTimeoutHint(Integer timeout)
- Overrides:
applyLockTimeoutHintin classAbstractCommonQueryContract
-
applyLockTimeoutHint
protected void applyLockTimeoutHint(int timeout)
- Overrides:
applyLockTimeoutHintin classAbstractCommonQueryContract
-
applyHibernateLockMode
protected void applyHibernateLockMode(LockMode value)
- Overrides:
applyHibernateLockModein classAbstractCommonQueryContract
-
applyLockModeType
protected void applyLockModeType(jakarta.persistence.LockModeType value)
- Overrides:
applyLockModeTypein classAbstractCommonQueryContract
-
applyAliasSpecificLockModeHint
protected void applyAliasSpecificLockModeHint(String hintName, Object value)
- Overrides:
applyAliasSpecificLockModeHintin classAbstractCommonQueryContract
-
applyFollowOnLockingHint
protected void applyFollowOnLockingHint(Boolean followOnLocking)
- Overrides:
applyFollowOnLockingHintin classAbstractCommonQueryContract
-
applyGraph
public SqmQueryImplementor<R> applyGraph(RootGraph graph, GraphSemantic semantic)
Description copied from interface:QueryApply the given graph using the given semantic- Specified by:
applyGraphin interfaceQuery<R>- Specified by:
applyGraphin interfaceSqmQueryImplementor<R>- Parameters:
graph- The graph the apply.semantic- The semantic to use when applying the graph- Returns:
- this - for method chaining
-
list
public List<R> list()
Description copied from interface:SelectionQueryExecute 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:
listin interfaceQuery<R>- Specified by:
listin interfaceSelectionQuery<R>- Overrides:
listin classAbstractSelectionQuery<R>- Returns:
- the result list
-
scroll
public ScrollableResultsImplementor<R> scroll()
Description copied from interface:SelectionQueryReturns scrollable access to the query results. This form callsSelectionQuery.scroll(ScrollMode)usingDialect.defaultScrollMode()- Specified by:
scrollin interfaceQuery<R>- Specified by:
scrollin interfaceQueryImplementor<R>- Specified by:
scrollin interfaceSelectionQuery<R>- Overrides:
scrollin classAbstractSelectionQuery<R>
-
scroll
public ScrollableResultsImplementor<R> scroll(ScrollMode scrollMode)
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>
-
stream
public Stream<R> 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
-
uniqueResult
public R uniqueResult()
Description copied from interface:SelectionQueryExecute the query and return the single result of the query, ornullif the query returns no results.- Specified by:
uniqueResultin interfaceQuery<R>- Specified by:
uniqueResultin interfaceSelectionQuery<R>- Overrides:
uniqueResultin classAbstractSelectionQuery<R>- Returns:
- the single result or
null
-
getSingleResult
public R 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 interfacejakarta.persistence.Query- Specified by:
getSingleResultin interfaceQuery<R>- Specified by:
getSingleResultin interfaceSelectionQuery<R>- Specified by:
getSingleResultin interfacejakarta.persistence.TypedQuery<R>- Overrides:
getSingleResultin classAbstractSelectionQuery<R>- Returns:
- the single result, only if there is exactly one
-
uniqueResultOptional
public Optional<R> uniqueResultOptional()
Description copied from interface:SelectionQueryExecute the query and return the single result of the query, as anOptional.- Specified by:
uniqueResultOptionalin interfaceQuery<R>- Specified by:
uniqueResultOptionalin interfaceSelectionQuery<R>- Overrides:
uniqueResultOptionalin classAbstractSelectionQuery<R>- Returns:
- the single result as an
Optional
-
toMemento
public NamedQueryMemento toMemento(String name)
Description copied from interface:NameableQueryConvert the query into the memento- Specified by:
toMementoin interfaceNameableQuery- Specified by:
toMementoin interfaceSqmQueryImplementor<R>
-
unwrap
public <T> T unwrap(Class<T> cls)
- Specified by:
unwrapin interfacejakarta.persistence.Query
-
setComment
public SqmQueryImplementor<R> setComment(String comment)
Description copied from interface:CommonQueryContractSet a comment for this query.- Specified by:
setCommentin interfaceCommonQueryContract- Specified by:
setCommentin interfaceQuery<R>- Specified by:
setCommentin interfaceSqmQueryImplementor<R>- Overrides:
setCommentin classAbstractCommonQueryContract- Parameters:
comment- The human-readable comment- Returns:
this, for method chaining- See Also:
Query.setComment(String)
-
setCacheMode
public SqmQueryImplementor<R> setCacheMode(CacheMode cacheMode)
Description copied from interface:SelectionQuerySet the current CacheMode in effect for this query.- Specified by:
setCacheModein interfaceQuery<R>- Specified by:
setCacheModein interfaceSelectionQuery<R>- Specified by:
setCacheModein interfaceSqmQueryImplementor<R>- Overrides:
setCacheModein classAbstractSelectionQuery<R>- See Also:
SelectionQuery.getCacheMode(),Session.setCacheMode(org.hibernate.CacheMode)
-
setCacheable
public SqmQueryImplementor<R> setCacheable(boolean cacheable)
Description copied from interface:SelectionQueryEnable/disable second level query (result) caching for this query.- Specified by:
setCacheablein interfaceQuery<R>- Specified by:
setCacheablein interfaceSelectionQuery<R>- Specified by:
setCacheablein interfaceSqmQueryImplementor<R>- Overrides:
setCacheablein classAbstractSelectionQuery<R>- See Also:
SelectionQuery.isCacheable()
-
setCacheRegion
public SqmQueryImplementor<R> setCacheRegion(String cacheRegion)
Description copied from interface:SelectionQuerySet the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()).nullindicates to use the default region.- Specified by:
setCacheRegionin interfaceQuery<R>- Specified by:
setCacheRegionin interfaceSelectionQuery<R>- Specified by:
setCacheRegionin interfaceSqmQueryImplementor<R>- Overrides:
setCacheRegionin classAbstractSelectionQuery<R>- See Also:
SelectionQuery.getCacheRegion()
-
setTimeout
public SqmQueryImplementor<R> setTimeout(int timeout)
Description copied from interface:CommonQueryContractSet 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:
setTimeoutin interfaceCommonQueryContract- Specified by:
setTimeoutin interfaceQuery<R>- Specified by:
setTimeoutin interfaceSelectionQuery<R>- Specified by:
setTimeoutin interfaceSqmQueryImplementor<R>- Overrides:
setTimeoutin classAbstractSelectionQuery<R>- Parameters:
timeout- the timeout in seconds- Returns:
this, for method chaining- See Also:
CommonQueryContract.getTimeout()
-
setFetchSize
public SqmQueryImplementor<R> setFetchSize(int fetchSize)
Description copied from interface:SelectionQuerySets a JDBC fetch size hint for the query.- Specified by:
setFetchSizein interfaceQuery<R>- Specified by:
setFetchSizein interfaceSelectionQuery<R>- Specified by:
setFetchSizein interfaceSqmQueryImplementor<R>- Overrides:
setFetchSizein classAbstractSelectionQuery<R>- Parameters:
fetchSize- the fetch size hint- Returns:
this, for method chaining- See Also:
SelectionQuery.getFetchSize()
-
setReadOnly
public SqmQueryImplementor<R> setReadOnly(boolean readOnly)
Description copied from interface:SelectionQuerySet the read-only/modifiable mode for entities and proxies loaded by this Query. This setting overrides the default setting for the persistence context.- Specified by:
setReadOnlyin interfaceQuery<R>- Specified by:
setReadOnlyin interfaceSelectionQuery<R>- Specified by:
setReadOnlyin interfaceSqmQueryImplementor<R>- Overrides:
setReadOnlyin classAbstractSelectionQuery<R>- Parameters:
readOnly-trueindicates that entities and proxies loaded by the query are to be put in read-only mode;falseindicates that entities and proxies loaded by the query will be put in modifiable mode- Returns:
this, for method chaining- See Also:
To set the default read-only/modifiable setting used for entities and proxies that are loaded into the session:,PersistenceContext.setDefaultReadOnly(boolean),Read-only entities are not dirty-checked and snapshots of persistent state are not maintained. Read-only entities can be modified, but changes are not persisted. When a proxy is initialized, the loaded entity will have the same read-only/modifiable setting as the uninitialized proxy has, regardless of the session's current setting. The read-only/modifiable setting has no impact on entities/proxies returned by the query that existed in the session beforeQuery the query was executed.
-
setProperties
public SqmQueryImplementor<R> setProperties(Object bean)
Description copied from interface:CommonQueryContractBind 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:
setPropertiesin interfaceCommonQueryContract- Specified by:
setPropertiesin interfaceMutationQuery- Specified by:
setPropertiesin interfaceQuery<R>- Specified by:
setPropertiesin interfaceQueryImplementor<R>- Specified by:
setPropertiesin interfaceSelectionQuery<R>- Specified by:
setPropertiesin interfaceSqmQuery- Specified by:
setPropertiesin interfaceSqmQueryImplementor<R>- Overrides:
setPropertiesin classAbstractSelectionQuery<R>- Parameters:
bean- any JavaBean or POJO- Returns:
this, for method chaining
-
setProperties
public SqmQueryImplementor<R> setProperties(Map bean)
Description copied from interface:CommonQueryContractBind the values of the givenMapto named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.- Specified by:
setPropertiesin interfaceCommonQueryContract- Specified by:
setPropertiesin interfaceMutationQuery- Specified by:
setPropertiesin interfaceQuery<R>- Specified by:
setPropertiesin interfaceQueryImplementor<R>- Specified by:
setPropertiesin interfaceSelectionQuery<R>- Specified by:
setPropertiesin interfaceSqmQuery- Specified by:
setPropertiesin interfaceSqmQueryImplementor<R>- Overrides:
setPropertiesin classAbstractSelectionQuery<R>- Parameters:
bean- aMapof names to arguments- Returns:
this, for method chaining
-
setParameter
public SqmQueryImplementor<R> setParameter(String name, Object value)
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 interfacejakarta.persistence.Query- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
CommonQueryContract.setParameter(String, Object, Class),CommonQueryContract.setParameter(String, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(String name, P value, Class<P> javaType)
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenClassreference to attempt to infer theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameter(String, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
BindableType.parameterType(Class),CommonQueryContract.setParameter(String, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(String name, P value, BindableType<P> type)
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>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
BindableType.parameterType(java.lang.Class<T>)
-
setParameter
public SqmQueryImplementor<R> setParameter(String name, Instant value, jakarta.persistence.TemporalType temporalType)
Description copied from interface:CommonQueryContractBind anInstantto the named query parameter using just the portion indicated by the givenTemporalType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>
-
setParameter
public SqmQueryImplementor<R> setParameter(int position, Object value)
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 interfacejakarta.persistence.Query- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
CommonQueryContract.setParameter(int, Object, Class),CommonQueryContract.setParameter(int, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(int position, P value, Class<P> javaType)
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameter(int, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
BindableType.parameterType(Class),CommonQueryContract.setParameter(int, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(int position, P value, BindableType<P> type)
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>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
BindableType.parameterType(java.lang.Class<T>)
-
setParameter
public SqmQueryImplementor<R> setParameter(int position, Instant value, jakarta.persistence.TemporalType temporalType)
Description copied from interface:CommonQueryContractBind anInstantto an ordinal query parameter using just the portion indicated by the givenTemporalType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value)
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>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<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> SqmQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, Class<P> javaType)
Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter, using the givenClassreference to attempt to infer theBindableTypeto use. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameter(QueryParameter, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be nulljavaType- aBindableTyperepresenting the type of the parameter- Returns:
this, for method chaining- See Also:
BindableType.parameterType(Class),CommonQueryContract.setParameter(QueryParameter, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<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>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<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
public <P> SqmQueryImplementor<R> setParameter(jakarta.persistence.Parameter<P> parameter, P value)
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfacejakarta.persistence.Query- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
Query.setParameter(Parameter, Object)
-
setParameter
public SqmQueryImplementor<R> setParameter(jakarta.persistence.Parameter<Calendar> param, Calendar value, jakarta.persistence.TemporalType temporalType)
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfacejakarta.persistence.Query- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
Query.setParameter(Parameter, Calendar, TemporalType)
-
setParameter
public SqmQueryImplementor<R> setParameter(jakarta.persistence.Parameter<Date> param, Date value, jakarta.persistence.TemporalType temporalType)
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfacejakarta.persistence.Query- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
Query.setParameter(Parameter, Date, TemporalType)
-
setParameter
public SqmQueryImplementor<R> setParameter(String name, Calendar value, jakarta.persistence.TemporalType temporalType)
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfacejakarta.persistence.Query- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
Query.setParameter(String, Calendar, TemporalType)
-
setParameter
public SqmQueryImplementor<R> setParameter(String name, Date value, jakarta.persistence.TemporalType temporalType)
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfacejakarta.persistence.Query- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
Query.setParameter(String, Date, TemporalType)
-
setParameter
public SqmQueryImplementor<R> setParameter(int position, Calendar value, jakarta.persistence.TemporalType temporalType)
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfacejakarta.persistence.Query- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
Query.setParameter(int, Calendar, TemporalType)
-
setParameter
public SqmQueryImplementor<R> setParameter(int position, Date value, jakarta.persistence.TemporalType temporalType)
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfacejakarta.persistence.Query- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfacejakarta.persistence.TypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
Query.setParameter(int, Date, TemporalType)
-
setParameterList
public SqmQueryImplementor<R> setParameterList(String name, Collection values)
Description copied from interface:CommonQueryContractBind 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:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
CommonQueryContract.setParameterList(java.lang.String, java.util.Collection, BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, Class<P> javaType)
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenClassreference to attempt to infer theBindableTypeIf unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
BindableType.parameterType(Class),CommonQueryContract.setParameterList(java.lang.String, java.util.Collection, BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public SqmQueryImplementor<R> setParameterList(String name, Object[] values)
Description copied from interface:CommonQueryContractBind 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:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(String name, P[] values, Class<P> javaType)
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the given Class reference to attempt to determine theBindableTypeto use. If unable to determine an appropriateBindableType,CommonQueryContract.setParameterList(String, Collection)is used- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
BindableType.parameterType(Class),CommonQueryContract.setParameterList(java.lang.String, Object[], BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(String name, P[] values, BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public SqmQueryImplementor<R> setParameterList(int position, Collection values)
Description copied from interface:CommonQueryContractBind 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:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, Class<P> javaType)
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
BindableType.parameterType(Class),CommonQueryContract.setParameterList(int, Collection, BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public SqmQueryImplementor<R> setParameterList(int position, Object[] values)
Description copied from interface:CommonQueryContractBind 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:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(int position, P[] values, Class<P> javaType)
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
BindableType.parameterType(Class),CommonQueryContract.setParameterList(int, Object[], BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(int position, P[] values, BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values)
Description copied from interface:CommonQueryContractBind 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:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType)
Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theBindableTypeto use. If unable to infer an appropriateBindableType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
BindableType.parameterType(Class),CommonQueryContract.setParameterList(QueryParameter, java.util.Collection, BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values)
Description copied from interface:CommonQueryContractBind 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
QueryParameterand the type of the first given argument.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType)
Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theBindableTypeto use. If unable to infer an appropriateBindableType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
BindableType.parameterType(Class),CommonQueryContract.setParameterList(QueryParameter, Object[], BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setOptionalId
public void setOptionalId(Serializable id)
- Specified by:
setOptionalIdin interfaceQueryImplementor<R>
-
setOptionalEntityName
public void setOptionalEntityName(String entityName)
- Specified by:
setOptionalEntityNamein interfaceQueryImplementor<R>
-
setOptionalObject
public void setOptionalObject(Object optionalObject)
- Specified by:
setOptionalObjectin interfaceQueryImplementor<R>
-
-