public class CriteriaQueryTypeQueryAdapter<X> extends java.lang.Object implements QueryImplementor<X>
| Constructor and Description |
|---|
CriteriaQueryTypeQueryAdapter(SessionImplementor entityManager,
QueryImplementor<X> jpqlQuery,
java.util.Map<javax.persistence.criteria.ParameterExpression<?>,ExplicitParameterInfo<?>> explicitParameterInfoMap) |
| Modifier and Type | Method and Description |
|---|---|
QueryImplementor |
addQueryHint(java.lang.String hint)
Add a DB query hint to the SQL.
|
Type |
determineProperBooleanType(int position,
java.lang.Object value,
Type defaultType) |
Type |
determineProperBooleanType(java.lang.String name,
java.lang.Object value,
Type defaultType) |
int |
executeUpdate() |
CacheMode |
getCacheMode()
Obtain the CacheMode in effect for this query.
|
java.lang.String |
getCacheRegion()
Obtain the name of the second level query cache region in which query results will be stored (if they are
cached, see the discussion on
Query.isCacheable() for more information). |
java.lang.String |
getComment()
Obtain the comment currently associated with this query.
|
java.lang.Integer |
getFetchSize()
Obtain the JDBC fetch size hint in effect for this query.
|
int |
getFirstResult() |
javax.persistence.FlushModeType |
getFlushMode()
For users of the Hibernate native APIs, we've had to rename this method
as defined by Hibernate historically because the JPA contract defines a method of the same
name, but returning the JPA
FlushModeType rather than Hibernate's FlushMode. |
FlushMode |
getHibernateFlushMode()
Obtain the FlushMode in effect for this query.
|
java.util.Map<java.lang.String,java.lang.Object> |
getHints() |
javax.persistence.LockModeType |
getLockMode() |
LockOptions |
getLockOptions()
Obtains the LockOptions in effect for this query.
|
int |
getMaxResults() |
java.lang.String[] |
getNamedParameters()
Return the names of all named parameters of the query.
|
javax.persistence.Parameter<?> |
getParameter(int position) |
<T> javax.persistence.Parameter<T> |
getParameter(int position,
java.lang.Class<T> type) |
javax.persistence.Parameter<?> |
getParameter(java.lang.String name) |
<T> javax.persistence.Parameter<T> |
getParameter(java.lang.String name,
java.lang.Class<T> type) |
ParameterMetadata |
getParameterMetadata()
Access to information about query parameters.
|
java.util.Set<javax.persistence.Parameter<?>> |
getParameters() |
java.lang.Object |
getParameterValue(int position) |
<T> T |
getParameterValue(javax.persistence.Parameter<T> param) |
java.lang.Object |
getParameterValue(java.lang.String name) |
QueryProducerImplementor |
getProducer()
Get the QueryProducer this Query originates from.
|
RowSelection |
getQueryOptions()
"QueryOptions" is a better name, I think, than "RowSelection" -> 6.0
|
java.lang.String |
getQueryString()
Get the query string.
|
java.util.List<X> |
getResultList() |
java.lang.String[] |
getReturnAliases() |
Type[] |
getReturnTypes()
Return the Hibernate types of the query results.
|
X |
getSingleResult() |
java.lang.Integer |
getTimeout()
Obtain the query timeout in seconds.
|
boolean |
isBound(javax.persistence.Parameter<?> param) |
boolean |
isCacheable()
Are the results of this query eligible for second level query caching? This is different that second level
caching of any returned entities and collections.
|
protected boolean |
isNativeQuery() |
boolean |
isReadOnly()
Should entities and proxies loaded by this Query be put in read-only mode? If the
read-only/modifiable setting was not initialized, then the default
read-only/modifiable setting for the persistence context is returned instead.
|
java.util.Iterator<X> |
iterate()
Return the query results as an Iterator.
|
java.util.List<X> |
list()
Return the query results as a List.
|
ScrollableResults |
scroll()
Return the query results as ScrollableResults.
|
ScrollableResults |
scroll(ScrollMode scrollMode)
Return the query results as ScrollableResults.
|
QueryImplementor |
setCacheable(boolean cacheable)
Enable/disable second level query (result) caching for this query.
|
QueryImplementor<X> |
setCacheMode(CacheMode cacheMode)
(Re)set the current CacheMode in effect for this query.
|
QueryImplementor |
setCacheRegion(java.lang.String cacheRegion)
Set the name of the cache region where query results should be cached (if cached at all).
|
QueryImplementor |
setComment(java.lang.String comment)
Set the comment for this query.
|
QueryImplementor<X> |
setEntity(int position,
java.lang.Object val)
Bind an instance of a mapped persistent class to a JDBC-style query parameter.
|
QueryImplementor<X> |
setEntity(java.lang.String name,
java.lang.Object val)
Bind an instance of a mapped persistent class to a named query parameter.
|
QueryImplementor |
setFetchSize(int fetchSize)
Sets a JDBC fetch size hint for the query.
|
QueryImplementor<X> |
setFirstResult(int i) |
QueryImplementor |
setFlushMode(FlushMode flushMode)
(Re)set the current FlushMode in effect for this query.
|
QueryImplementor<X> |
setFlushMode(javax.persistence.FlushModeType flushModeType) |
QueryImplementor<X> |
setHibernateFlushMode(FlushMode flushMode)
(Re)set the current FlushMode in effect for this query.
|
QueryImplementor<X> |
setHint(java.lang.String name,
java.lang.Object value) |
QueryImplementor<X> |
setLockMode(javax.persistence.LockModeType lockModeType) |
QueryImplementor |
setLockMode(java.lang.String alias,
LockMode lockMode)
Set the LockMode to use for specific alias (as defined in the query's FROM clause).
|
QueryImplementor |
setLockOptions(LockOptions lockOptions)
Set the lock options for the query.
|
QueryImplementor<X> |
setMaxResults(int maxResult) |
void |
setOptionalEntityName(java.lang.String entityName) |
void |
setOptionalId(java.io.Serializable id) |
void |
setOptionalObject(java.lang.Object optionalObject) |
QueryImplementor<X> |
setParameter(int i,
java.util.Calendar calendar,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(int i,
java.util.Date date,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(int position,
java.time.Instant value,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(int position,
java.time.LocalDateTime value,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(int i,
java.lang.Object o)
Bind a positional query parameter using its inferred Type.
|
QueryImplementor<X> |
setParameter(int position,
java.lang.Object val,
Type type)
Bind a value to a JDBC-style query parameter.
|
QueryImplementor<X> |
setParameter(int position,
java.time.OffsetDateTime value,
javax.persistence.TemporalType temporalType) |
<P> QueryImplementor<X> |
setParameter(int position,
P val,
javax.persistence.TemporalType temporalType)
Bind a positional query parameter as some form of date/time using
the indicated temporal-type.
|
QueryImplementor<X> |
setParameter(int position,
java.time.ZonedDateTime value,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(javax.persistence.Parameter<java.util.Calendar> param,
java.util.Calendar calendar,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(javax.persistence.Parameter<java.util.Date> param,
java.util.Date date,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(javax.persistence.Parameter<java.time.Instant> param,
java.time.Instant value,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(javax.persistence.Parameter<java.time.LocalDateTime> param,
java.time.LocalDateTime value,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(javax.persistence.Parameter<java.time.OffsetDateTime> param,
java.time.OffsetDateTime value,
javax.persistence.TemporalType temporalType) |
<T> QueryImplementor<X> |
setParameter(javax.persistence.Parameter<T> param,
T t) |
QueryImplementor<X> |
setParameter(javax.persistence.Parameter<java.time.ZonedDateTime> param,
java.time.ZonedDateTime value,
javax.persistence.TemporalType temporalType) |
<P> QueryImplementor<X> |
setParameter(QueryParameter<P> parameter,
P val,
javax.persistence.TemporalType temporalType)
Bind a query parameter as some form of date/time using the indicated
temporal-type.
|
<P> QueryImplementor<X> |
setParameter(QueryParameter<P> parameter,
P value,
Type type)
Bind a query parameter using the supplied Type
|
<T> QueryImplementor<X> |
setParameter(QueryParameter<T> parameter,
T val)
Bind a query parameter using its inferred Type.
|
QueryImplementor<X> |
setParameter(java.lang.String name,
java.util.Calendar calendar,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(java.lang.String name,
java.util.Date date,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(java.lang.String name,
java.time.Instant value,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(java.lang.String name,
java.time.LocalDateTime value,
javax.persistence.TemporalType temporalType) |
QueryImplementor<X> |
setParameter(java.lang.String name,
java.lang.Object value)
Bind a named query parameter using its inferred Type.
|
QueryImplementor<X> |
setParameter(java.lang.String name,
java.lang.Object val,
Type type)
Bind a named query parameter using the supplied Type
|
QueryImplementor<X> |
setParameter(java.lang.String name,
java.time.OffsetDateTime value,
javax.persistence.TemporalType temporalType) |
<P> QueryImplementor<X> |
setParameter(java.lang.String name,
P val,
javax.persistence.TemporalType temporalType)
Bind a named query parameter as some form of date/time using
the indicated temporal-type.
|
QueryImplementor<X> |
setParameter(java.lang.String name,
java.time.ZonedDateTime value,
javax.persistence.TemporalType temporalType) |
<P> QueryImplementor<X> |
setParameterList(QueryParameter<P> parameter,
java.util.Collection<P> values)
Bind multiple values to a query parameter using its inferred Type.
|
QueryImplementor<X> |
setParameterList(java.lang.String name,
java.util.Collection values)
Bind multiple values to a named query parameter.
|
QueryImplementor<X> |
setParameterList(java.lang.String name,
java.util.Collection values,
Type type)
Bind multiple values to a named query parameter.
|
QueryImplementor<X> |
setParameterList(java.lang.String name,
java.lang.Object[] values)
Bind multiple values to a named query parameter.
|
QueryImplementor<X> |
setParameterList(java.lang.String name,
java.lang.Object[] values,
Type type)
Bind multiple values to a named query parameter.
|
QueryImplementor |
setProperties(java.util.Map map)
Bind the values of the given Map for each named parameters of the query,
matching key names with parameter names and mapping value types to
Hibernate types using heuristics.
|
QueryImplementor<X> |
setProperties(java.lang.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.
|
QueryImplementor |
setReadOnly(boolean readOnly)
Set the read-only/modifiable mode for entities and proxies
loaded by this Query.
|
QueryImplementor<X> |
setResultTransformer(ResultTransformer transformer)
Set a strategy for handling the query results.
|
QueryImplementor |
setTimeout(int timeout)
Set the query timeout in seconds.
|
java.util.stream.Stream<X> |
stream()
Retrieve a Stream over the query results.
|
X |
uniqueResult()
Convenience method to return a single instance that matches
the query, or
null if the query returns no results. |
java.util.Optional<X> |
uniqueResultOptional() |
<T> T |
unwrap(java.lang.Class<T> cls) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResultStream, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBinary, setBinary, setBoolean, setBoolean, setByte, setByte, setCalendar, setCalendar, setCalendarDate, setCalendarDate, setCharacter, setCharacter, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInteger, setInteger, setLocale, setLocale, setLong, setLong, setParameters, setSerializable, setSerializable, setShort, setShort, setString, setString, setText, setText, setTime, setTime, setTimestamp, setTimestamppublic CriteriaQueryTypeQueryAdapter(SessionImplementor entityManager, QueryImplementor<X> jpqlQuery, java.util.Map<javax.persistence.criteria.ParameterExpression<?>,ExplicitParameterInfo<?>> explicitParameterInfoMap)
public java.util.List<X> getResultList()
getResultList in interface javax.persistence.QuerygetResultList in interface javax.persistence.TypedQuery<X>public X uniqueResult()
Querynull if the query returns no results.public java.util.Optional<X> uniqueResultOptional()
public java.util.stream.Stream<X> stream()
Query
You should call BaseStream.close() after processing the stream
so that the underlying resources are deallocated right away.
public java.util.List<X> list()
Querypublic QueryImplementor<X> setCacheMode(CacheMode cacheMode)
QuerysetCacheMode in interface BasicQueryContractcacheMode - The new CacheMode to use.this, for method chainingQuery.getCacheMode()public boolean isCacheable()
QuerySessionFactory for this to happen. Usually that is
controlled by the hibernate.cache.use_query_cache configuration setting.isCacheable in interface BasicQueryContracttrue if the query results are eligible for caching, false otherwise.AvailableSettings.USE_QUERY_CACHEpublic X getSingleResult()
getSingleResult in interface javax.persistence.QuerygetSingleResult in interface javax.persistence.TypedQuery<X>public ParameterMetadata getParameterMetadata()
Querypublic java.lang.String[] getNamedParameters()
Querypublic int getMaxResults()
getMaxResults in interface javax.persistence.Querypublic QueryImplementor<X> setMaxResults(int maxResult)
setMaxResults in interface javax.persistence.QuerysetMaxResults in interface javax.persistence.TypedQuery<X>public int getFirstResult()
getFirstResult in interface javax.persistence.Querypublic QueryImplementor<X> setFirstResult(int i)
setFirstResult in interface javax.persistence.QuerysetFirstResult in interface javax.persistence.TypedQuery<X>public java.util.Map<java.lang.String,java.lang.Object> getHints()
getHints in interface javax.persistence.Querypublic QueryImplementor<X> setHint(java.lang.String name, java.lang.Object value)
setHint in interface javax.persistence.QuerysetHint in interface javax.persistence.TypedQuery<X>protected boolean isNativeQuery()
public java.lang.String getQueryString()
Querypublic FlushMode getHibernateFlushMode()
QuerygetHibernateFlushMode in interface BasicQueryContractFlushModepublic javax.persistence.FlushModeType getFlushMode()
QueryFlushModeType rather than Hibernate's FlushMode. For
the former behavior, use Query.getHibernateFlushMode() instead.getFlushMode in interface javax.persistence.Querypublic CacheMode getCacheMode()
QuerygetCacheMode in interface BasicQueryContractSession.getCacheMode(),
CacheModepublic Type[] getReturnTypes()
QuerygetReturnTypes in interface BasicQueryContractpublic LockOptions getLockOptions()
QueryLockOptionspublic RowSelection getQueryOptions()
Querypublic QueryImplementor<X> setFlushMode(javax.persistence.FlushModeType flushModeType)
setFlushMode in interface javax.persistence.QuerysetFlushMode in interface javax.persistence.TypedQuery<X>public QueryImplementor setFlushMode(FlushMode flushMode)
QuerysetFlushMode in interface BasicQueryContractflushMode - The new FlushMode to use.this, for method chainingQuery.getHibernateFlushMode()public QueryImplementor<X> setHibernateFlushMode(FlushMode flushMode)
QuerysetHibernateFlushMode in interface BasicQueryContractflushMode - The new FlushMode to use.this, for method chainingQuery.getHibernateFlushMode()public QueryImplementor setCacheable(boolean cacheable)
QuerysetCacheable in interface BasicQueryContractcacheable - Should the query results be cacheable?this, for method chainingQuery.isCacheable()public java.lang.String getCacheRegion()
QueryQuery.isCacheable() for more information). null indicates that the
default region should be used.getCacheRegion in interface BasicQueryContractnull indicates
the default region.public QueryImplementor setCacheRegion(java.lang.String cacheRegion)
QuerysetCacheRegion in interface BasicQueryContractcacheRegion - the name of a query cache region, or null to indicate that the default region
should be used.this, for method chainingQuery.getCacheRegion()public java.lang.Integer getTimeout()
QueryStatement.setQueryTimeout(int). Zero indicates no timeout.getTimeout in interface BasicQueryContractStatement.getQueryTimeout(),
Statement.setQueryTimeout(int)public QueryImplementor setTimeout(int timeout)
QuerysetTimeout in interface BasicQueryContracttimeout - the timeout in secondsthis, for method chainingQuery.getTimeout()public java.lang.Integer getFetchSize()
QueryStatement.setFetchSize(int). As defined b y JDBC, this value is a hint to the
driver to indicate how many rows to fetch from the database when more rows are needed.
NOTE : JDBC expressly defines this value as a hint. It may or may not have any effect on the actual
query execution and ResultSet processing depending on the driver.getFetchSize in interface BasicQueryContractStatement.getFetchSize(),
Statement.setFetchSize(int)public QueryImplementor setLockOptions(LockOptions lockOptions)
QueryQuery.setLockMode(String, LockMode).lockOptions - The lock options to apply to the query.this, for method chainingQuery.getLockOptions()public QueryImplementor setLockMode(java.lang.String alias, LockMode lockMode)
QueryLockOptions.
The effect of these alias-specific LockModes is somewhat dependent on the driver/database in use. Generally
speaking, for maximum portability, this method should only be used to mark that the rows corresponding to
the given alias should be included in pessimistic locking (LockMode.PESSIMISTIC_WRITE).alias - a query alias, or "this" for a collection filterlockMode - The lock mode to apply.this, for method chainingQuery.getLockOptions()public java.lang.String getComment()
Queryhibernate.use_sql_comments config setting), this comment will also be added
to the SQL query sent to the database. Often useful for identifying the source of troublesome queries on the
database side.public QueryImplementor setComment(java.lang.String comment)
Querycomment - The human-readable commentthis, for method chainingQuery.getComment()public QueryImplementor addQueryHint(java.lang.String hint)
QueryQueryHint, which is specific
to the JPA implementation and ignores DB vendor-specific hints. Instead, these are intended solely for the
vendor-specific hints, such as Oracle's optimizers. Multiple query hints are supported; the Dialect will
determine concatenation and placement.hint - The database specific query hint to add.public java.util.Iterator<X> iterate()
Querypublic ScrollableResults scroll()
Query
You should call ScrollableResults.close() after processing the ScrollableResults
so that the underlying resources are deallocated right away.
ScrollableResultspublic ScrollableResults scroll(ScrollMode scrollMode)
Query
You should call ScrollableResults.close() after processing the ScrollableResults
so that the underlying resources are deallocated right away.
scrollMode - The scroll modeScrollableResults,
ScrollModepublic QueryImplementor setFetchSize(int fetchSize)
QuerysetFetchSize in interface BasicQueryContractfetchSize - the fetch size hintthis, for method chainingQuery.getFetchSize()public boolean isReadOnly()
QueryisReadOnly in interface BasicQueryContracttrue if the entities and proxies loaded by the query will be put
in read-only mode; false otherwise (they will be modifiable)Query.setReadOnly(boolean),
The read-only/modifiable setting has no impact on entities/proxies returned by the
query that existed in the session before the query was executed.public javax.persistence.LockModeType getLockMode()
getLockMode in interface javax.persistence.Querypublic QueryImplementor<X> setLockMode(javax.persistence.LockModeType lockModeType)
setLockMode in interface javax.persistence.QuerysetLockMode in interface javax.persistence.TypedQuery<X>public QueryImplementor setReadOnly(boolean readOnly)
QuerysetReadOnly in interface BasicQueryContractreadOnly - true indicates that entities and proxies loaded by the query
are to be put in read-only mode; false indicates that entities and proxies
loaded by the query will be put in modifiable modethis, for method chainingTo set the default read-only/modifiable setting used for
entities and proxies that are loaded into the session:,
PersistenceContext.setDefaultReadOnly(boolean),
Read-only entities are not dirty-checked and snapshots of persistent
state are not maintained. Read-only entities can be modified, but
changes are not persisted.
When a proxy is initialized, the loaded entity will have the same
read-only/modifiable setting as the uninitialized
proxy has, regardless of the session's current setting.
The read-only/modifiable setting has no impact on entities/proxies
returned by the query that existed in the session before the query was executed.public Type determineProperBooleanType(int position, java.lang.Object value, Type defaultType)
public Type determineProperBooleanType(java.lang.String name, java.lang.Object value, Type defaultType)
public java.lang.String[] getReturnAliases()
public java.util.Set<javax.persistence.Parameter<?>> getParameters()
getParameters in interface javax.persistence.Querypublic boolean isBound(javax.persistence.Parameter<?> param)
isBound in interface javax.persistence.Querypublic <T> T getParameterValue(javax.persistence.Parameter<T> param)
getParameterValue in interface javax.persistence.Querypublic <T> QueryImplementor<X> setParameter(javax.persistence.Parameter<T> param, T t)
setParameter in interface javax.persistence.QuerysetParameter in interface javax.persistence.TypedQuery<X>public QueryImplementor<X> setParameter(javax.persistence.Parameter<java.util.Calendar> param, java.util.Calendar calendar, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.QuerysetParameter in interface javax.persistence.TypedQuery<X>public QueryImplementor<X> setParameter(javax.persistence.Parameter<java.util.Date> param, java.util.Date date, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.QuerysetParameter in interface javax.persistence.TypedQuery<X>public <T> T unwrap(java.lang.Class<T> cls)
unwrap in interface javax.persistence.Querypublic java.lang.Object getParameterValue(java.lang.String name)
getParameterValue in interface javax.persistence.Querypublic javax.persistence.Parameter<?> getParameter(java.lang.String name)
getParameter in interface javax.persistence.Querypublic <T> javax.persistence.Parameter<T> getParameter(java.lang.String name,
java.lang.Class<T> type)
getParameter in interface javax.persistence.Querypublic QueryImplementor<X> setParameter(java.lang.String name, java.lang.Object value)
QueryQuery.setParameter(String, Object, Type)
should be used insteadsetParameter in interface javax.persistence.QuerysetParameter in interface javax.persistence.TypedQuery<X>name - the parameter namevalue - the (possibly-null) parameter valuethis, for method chainingpublic QueryImplementor<X> setParameter(java.lang.String name, java.util.Calendar calendar, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.QuerysetParameter in interface javax.persistence.TypedQuery<X>public QueryImplementor<X> setParameter(java.lang.String name, java.util.Date date, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.QuerysetParameter in interface javax.persistence.TypedQuery<X>public QueryImplementor<X> setEntity(java.lang.String name, java.lang.Object val)
QueryQuery.setParameter(String, Object) for null values.name - the name of the parameterval - a non-null instance of a persistent classthis, for method chainingpublic QueryImplementor<X> setParameter(java.lang.String name, java.lang.Object val, Type type)
Queryname - the name of the parameterval - the possibly-null parameter valuetype - the Hibernate typethis, for method chainingpublic <T> QueryImplementor<X> setParameter(QueryParameter<T> parameter, T val)
QueryQuery.setParameter(QueryParameter, Object, Type)
should be used insteadparameter - The query parameter mementoval - the possibly-null parameter valuethis, for method chainingpublic <P> QueryImplementor<X> setParameter(QueryParameter<P> parameter, P val, javax.persistence.TemporalType temporalType)
Queryparameter - The query parameter mementoval - the possibly-null parameter valuetemporalType - the temporal-type to use in binding the date/timethis, for method chainingpublic <P> QueryImplementor<X> setParameter(java.lang.String name, P val, javax.persistence.TemporalType temporalType)
Queryname - the parameter nameval - the possibly-null parameter valuetemporalType - the temporal-type to use in binding the date/timethis, for method chainingpublic <P> QueryImplementor<X> setParameterList(QueryParameter<P> parameter, java.util.Collection<P> values)
Queryparameter - the parameter mementovalues - a collection of values to listthis, for method chainingpublic QueryImplementor<X> setParameterList(java.lang.String name, java.util.Collection values)
Queryname - the name of the parametervalues - a collection of values to listthis, for method chainingpublic QueryImplementor<X> setParameterList(java.lang.String name, java.util.Collection values, Type type)
Queryname - the name of the parametervalues - a collection of values to listtype - the Hibernate type of the valuesthis, for method chainingpublic QueryImplementor<X> setParameterList(java.lang.String name, java.lang.Object[] values, Type type)
Queryname - the name of the parametervalues - a collection of values to listtype - the Hibernate type of the valuesthis, for method chainingpublic QueryImplementor<X> setParameterList(java.lang.String name, java.lang.Object[] values)
Queryname - the name of the parametervalues - a collection of values to listthis, for method chainingpublic <P> QueryImplementor<X> setParameter(QueryParameter<P> parameter, P value, Type type)
Queryparameter - The query parameter mementovalue - the possibly-null parameter valuetype - the Hibernate typethis, for method chainingpublic QueryImplementor<X> setParameter(javax.persistence.Parameter<java.time.Instant> param, java.time.Instant value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(javax.persistence.Parameter<java.time.LocalDateTime> param, java.time.LocalDateTime value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(javax.persistence.Parameter<java.time.ZonedDateTime> param, java.time.ZonedDateTime value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(javax.persistence.Parameter<java.time.OffsetDateTime> param, java.time.OffsetDateTime value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(java.lang.String name, java.time.Instant value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(java.lang.String name, java.time.LocalDateTime value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(java.lang.String name, java.time.ZonedDateTime value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(java.lang.String name, java.time.OffsetDateTime value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setResultTransformer(ResultTransformer transformer)
Querytransformer - The transformer to applypublic QueryImplementor<X> setProperties(java.lang.Object bean)
Querybean - any JavaBean or POJOthis, for method chainingpublic QueryImplementor setProperties(java.util.Map map)
Querymap - a java.util.Mapthis, for method chainingpublic QueryProducerImplementor getProducer()
QuerygetProducer in interface QueryImplementor<X>public void setOptionalId(java.io.Serializable id)
setOptionalId in interface QueryImplementor<X>public void setOptionalEntityName(java.lang.String entityName)
setOptionalEntityName in interface QueryImplementor<X>public void setOptionalObject(java.lang.Object optionalObject)
setOptionalObject in interface QueryImplementor<X>public QueryImplementor<X> setParameter(int position, java.time.LocalDateTime value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(int position, java.time.Instant value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(int position, java.time.ZonedDateTime value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(int position, java.time.OffsetDateTime value, javax.persistence.TemporalType temporalType)
public QueryImplementor<X> setParameter(int position, java.lang.Object val, Type type)
Queryposition - the position of the parameter in the query
string, numbered from 0.val - the possibly-null parameter valuetype - the Hibernate typethis, for method chainingpublic QueryImplementor<X> setEntity(int position, java.lang.Object val)
QueryQuery.setParameter(int, Object) for null values.position - the position of the parameter in the query
string, numbered from 0.val - a non-null instance of a persistent classthis, for method chainingpublic <P> QueryImplementor<X> setParameter(int position, P val, javax.persistence.TemporalType temporalType)
Queryposition - the position of the parameter in the query
string, numbered from 0.val - the possibly-null parameter valuetemporalType - the temporal-type to use in binding the date/timethis, for method chainingpublic int executeUpdate()
executeUpdate in interface javax.persistence.Querypublic QueryImplementor<X> setParameter(int i, java.lang.Object o)
QueryQuery.setParameter(int, Object, Type)
should be used insteadsetParameter in interface javax.persistence.QuerysetParameter in interface javax.persistence.TypedQuery<X>i - the position of the parameter in the query
string, numbered from 0.o - the possibly-null parameter valuethis, for method chainingpublic QueryImplementor<X> setParameter(int i, java.util.Calendar calendar, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.QuerysetParameter in interface javax.persistence.TypedQuery<X>public QueryImplementor<X> setParameter(int i, java.util.Date date, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.QuerysetParameter in interface javax.persistence.TypedQuery<X>public java.lang.Object getParameterValue(int position)
getParameterValue in interface javax.persistence.Querypublic javax.persistence.Parameter<?> getParameter(int position)
getParameter in interface javax.persistence.Querypublic <T> javax.persistence.Parameter<T> getParameter(int position,
java.lang.Class<T> type)
getParameter in interface javax.persistence.QueryCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.