public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery
addSynchronizedQuerySpace(java.lang.String)
, addSynchronizedEntityName(java.lang.String)
and
addSynchronizedEntityClass(java.lang.Class)
. This allows Hibernate to know how to properly deal with
auto-flush checking as well as cached query results if the results of the query are being
cached.
QueryProducer.createNativeQuery(String, String)
addEntity(java.lang.String)
, addRoot(java.lang.String, java.lang.String)
, addJoin(java.lang.String, java.lang.String)
,
addFetch(java.lang.String, java.lang.String, java.lang.String)
and addScalar(java.lang.String)
methods
Modifier and Type | Interface and Description |
---|---|
static interface |
NativeQuery.FetchReturn
Allows access to further control how join fetch returns are mapped back
from result sets.
|
static interface |
NativeQuery.InstantiationResultNode<J> |
static interface |
NativeQuery.ResultNode
Simple unification interface for all returns from the various `#addXYZ` methods .
|
static interface |
NativeQuery.ReturnableResultNode
ResultNode which can be a query result
|
static interface |
NativeQuery.ReturnProperty
Allows access to further control how properties within a root or join
fetch are mapped back from the result set.
|
static interface |
NativeQuery.RootReturn
Allows access to further control how root returns are mapped back from
result sets.
|
Modifier and Type | Method and Description |
---|---|
NativeQuery<T> |
addAttributeResult(String columnAlias,
Class<?> entityJavaType,
String attributePath)
Defines a result based on a specified attribute.
|
NativeQuery<T> |
addAttributeResult(String columnAlias,
SingularAttribute<?,?> attribute)
Defines a result based on a specified attribute.
|
NativeQuery<T> |
addAttributeResult(String columnAlias,
String entityName,
String attributePath)
Defines a result based on a specified attribute.
|
NativeQuery<T> |
addEntity(Class entityType)
Declare a "root" entity, without specifying an alias.
|
NativeQuery<T> |
addEntity(String entityName)
Declare a "root" entity, without specifying an alias.
|
NativeQuery<T> |
addEntity(String tableAlias,
Class entityType)
Declare a "root" entity.
|
NativeQuery<T> |
addEntity(String tableAlias,
Class entityClass,
LockMode lockMode)
Declare a "root" entity, specifying a lock mode.
|
NativeQuery<T> |
addEntity(String tableAlias,
String entityName)
Declare a "root" entity.
|
NativeQuery<T> |
addEntity(String tableAlias,
String entityName,
LockMode lockMode)
Declare a "root" entity, specifying a lock mode.
|
NativeQuery.FetchReturn |
addFetch(String tableAlias,
String ownerTableAlias,
String joinPropertyName)
Declare a join fetch result.
|
<J> NativeQuery.InstantiationResultNode<J> |
addInstantiation(Class<J> targetJavaType) |
NativeQuery<T> |
addJoin(String tableAlias,
String path)
Declare a join fetch result.
|
NativeQuery<T> |
addJoin(String tableAlias,
String path,
LockMode lockMode)
Declare a join fetch result, specifying a lock mode.
|
NativeQuery<T> |
addJoin(String tableAlias,
String ownerTableAlias,
String joinPropertyName)
Declare a join fetch result.
|
NativeQuery<T> |
addQueryHint(String hint)
Add a DB query hint to the SQL.
|
NativeQuery.RootReturn |
addRoot(String tableAlias,
Class entityType)
Add a new root return mapping, returning a
NativeQuery.RootReturn to allow further definition. |
NativeQuery.RootReturn |
addRoot(String tableAlias,
String entityName)
Add a new root return mapping, returning a
NativeQuery.RootReturn to allow
further definition. |
NativeQuery<T> |
addScalar(String columnAlias)
Declare a scalar query result.
|
NativeQuery<T> |
addScalar(String columnAlias,
BasicDomainType type)
Declare a scalar query result.
|
NativeQuery<T> |
addScalar(String columnAlias,
Class<?> javaType)
Declare a scalar query result using the specified result type.
|
<C> NativeQuery<T> |
addScalar(String columnAlias,
Class<C> relationalJavaType,
AttributeConverter<?,C> converter)
Declare a scalar query result with an explicit conversion
|
<C> NativeQuery<T> |
addScalar(String columnAlias,
Class<C> relationalJavaType,
Class<? extends AttributeConverter<?,C>> converter)
Declare a scalar query result with an explicit conversion
|
<O,R> NativeQuery<T> |
addScalar(String columnAlias,
Class<O> domainJavaType,
Class<R> jdbcJavaType,
AttributeConverter<O,R> converter)
Declare a scalar query result with an explicit conversion
|
<O,R> NativeQuery<T> |
addScalar(String columnAlias,
Class<O> domainJavaType,
Class<R> jdbcJavaType,
Class<? extends AttributeConverter<O,R>> converter)
Declare a scalar query result with an explicit conversion
|
NativeQuery<T> |
addSynchronizedEntityClass(Class entityClass)
Adds an entity for (a) auto-flush checking and (b) query result cache invalidation checking.
|
NativeQuery<T> |
addSynchronizedEntityName(String entityName)
Adds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking.
|
NativeQuery<T> |
addSynchronizedQuerySpace(String querySpace)
Adds a query space.
|
NativeQuery<T> |
setCacheable(boolean cacheable)
Enable/disable second level query (result) caching for this query.
|
NativeQuery<T> |
setCacheMode(CacheMode cacheMode)
(Re)set the current CacheMode in effect for this query.
|
NativeQuery<T> |
setCacheRegion(String cacheRegion)
Set the name of the cache region where query results should be cached (if cached at all).
|
NativeQuery<T> |
setComment(String comment)
Set the comment for this query.
|
NativeQuery<T> |
setFetchSize(int fetchSize)
Sets a JDBC fetch size hint for the query.
|
NativeQuery<T> |
setFirstResult(int startPosition) |
NativeQuery<T> |
setFlushMode(FlushModeType flushMode) |
NativeQuery<T> |
setHibernateFlushMode(FlushMode flushMode)
(Re)set the current FlushMode in effect for this query.
|
NativeQuery<T> |
setHint(String hintName,
Object value) |
NativeQuery<T> |
setLockMode(LockModeType lockMode) |
NativeQuery<T> |
setLockMode(String alias,
LockMode lockMode)
Set the LockMode to use for specific alias (as defined in the query's FROM clause).
|
NativeQuery<T> |
setLockOptions(LockOptions lockOptions)
Set the lock options for the query.
|
NativeQuery<T> |
setMaxResults(int maxResult) |
NativeQuery<T> |
setParameter(int position,
Calendar value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(int position,
Date value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(int position,
Instant value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(int position,
LocalDateTime value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(int position,
Object value)
Bind a positional query parameter using its inferred Type.
|
NativeQuery<T> |
setParameter(int position,
Object val,
AllowableParameterType type)
Bind a value to a JDBC-style query parameter.
|
NativeQuery<T> |
setParameter(int position,
Object val,
TemporalType temporalType)
Bind a positional query parameter as some form of date/time using
the indicated temporal-type.
|
NativeQuery<T> |
setParameter(int position,
OffsetDateTime value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(int position,
ZonedDateTime value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(Parameter<Calendar> param,
Calendar value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(Parameter<Date> param,
Date value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(Parameter<Instant> param,
Instant value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(Parameter<LocalDateTime> param,
LocalDateTime value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(Parameter<OffsetDateTime> param,
OffsetDateTime value,
TemporalType temporalType) |
<P> NativeQuery<T> |
setParameter(Parameter<P> param,
P value) |
NativeQuery<T> |
setParameter(Parameter<ZonedDateTime> param,
ZonedDateTime value,
TemporalType temporalType) |
<P> NativeQuery<T> |
setParameter(QueryParameter<P> parameter,
P val)
Bind a query parameter using its inferred Type.
|
<P> NativeQuery<T> |
setParameter(QueryParameter<P> parameter,
P val,
AllowableParameterType type)
Bind a query parameter using the supplied Type
|
<P> NativeQuery<T> |
setParameter(QueryParameter<P> parameter,
P val,
TemporalType temporalType)
Bind a query parameter as some form of date/time using the indicated
temporal-type.
|
NativeQuery<T> |
setParameter(String name,
Calendar value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(String name,
Date value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(String name,
Instant value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(String name,
LocalDateTime value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(String name,
Object value)
Bind a named query parameter using its inferred Type.
|
NativeQuery<T> |
setParameter(String name,
Object val,
AllowableParameterType type)
Bind a named query parameter using the supplied Type
|
NativeQuery<T> |
setParameter(String name,
Object val,
TemporalType temporalType)
Bind a named query parameter as some form of date/time using
the indicated temporal-type.
|
NativeQuery<T> |
setParameter(String name,
OffsetDateTime value,
TemporalType temporalType) |
NativeQuery<T> |
setParameter(String name,
ZonedDateTime value,
TemporalType temporalType) |
NativeQuery<T> |
setParameterList(int position,
Collection values)
Bind multiple values to a positional query parameter.
|
NativeQuery<T> |
setParameterList(int position,
Collection values,
AllowableParameterType type)
Bind multiple values to a positional query parameter.
|
NativeQuery<T> |
setParameterList(int position,
Collection values,
Class type)
Bind multiple values to a positional query parameter.
|
NativeQuery<T> |
setParameterList(int position,
Object[] values)
Bind multiple values to a named query parameter.
|
NativeQuery<T> |
setParameterList(int position,
Object[] values,
AllowableParameterType type)
Bind multiple values to a named query parameter.
|
<P> NativeQuery<T> |
setParameterList(QueryParameter<P> parameter,
Collection<P> values)
Bind multiple values to a query parameter using its inferred Type.
|
NativeQuery<T> |
setParameterList(String name,
Collection values)
Bind multiple values to a named query parameter.
|
NativeQuery<T> |
setParameterList(String name,
Collection values,
AllowableParameterType type)
Bind multiple values to a named query parameter.
|
NativeQuery<T> |
setParameterList(String name,
Collection values,
Class type)
Bind multiple values to a named query parameter.
|
NativeQuery<T> |
setParameterList(String name,
Object[] values)
Bind multiple values to a named query parameter.
|
NativeQuery<T> |
setParameterList(String name,
Object[] values,
AllowableParameterType type)
Bind multiple values to a named query parameter.
|
NativeQuery<T> |
setProperties(Map bean)
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.
|
NativeQuery<T> |
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.
|
NativeQuery<T> |
setReadOnly(boolean readOnly)
Set the read-only/modifiable mode for entities and proxies
loaded by this Query.
|
NativeQuery<T> |
setResultListTransformer(ResultListTransformer transformer) |
NativeQuery<T> |
setResultTransformer(ResultTransformer transformer) |
NativeQuery<T> |
setTimeout(int timeout)
Set the query timeout in seconds.
|
NativeQuery<T> |
setTupleTransformer(TupleTransformer<T> transformer) |
applyFetchGraph, applyGraph, applyLoadGraph, getComment, getLockOptions, getParameterMetadata, getQueryOptions, getQueryString, getResultList, getSession, getSingleResult, list, scroll, scroll, stream, uniqueResult, uniqueResultOptional
getResultStream
executeUpdate, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound, unwrap
getCacheMode, getCacheRegion, getFetchSize, getHibernateFlushMode, getTimeout, isCacheable, isReadOnly
getSynchronizedQuerySpaces
NativeQuery<T> addScalar(String columnAlias)
<return-scalar/>
in hbm.xml
or
ColumnResult
in annotationscolumnAlias
- The column alias in the result-set to be processed
as a scalar resultthis
, for method chainingNativeQuery<T> addScalar(String columnAlias, BasicDomainType type)
<return-scalar/>
in hbm.xml
or
ColumnResult
in annotationscolumnAlias
- The column alias in the result-set to be processed
as a scalar resulttype
- The Hibernate type as which to treat the value.this
, for method chainingNativeQuery<T> addScalar(String columnAlias, Class<?> javaType)
this
, for method chaining<C> NativeQuery<T> addScalar(String columnAlias, Class<C> relationalJavaType, AttributeConverter<?,C> converter)
relationalJavaType
- The Java type expected by the converter as its
"relational" type.converter
- The conversion to apply. Consumes the JDBC value based
on `relationalJavaType`.this
, for method chaining<O,R> NativeQuery<T> addScalar(String columnAlias, Class<O> domainJavaType, Class<R> jdbcJavaType, AttributeConverter<O,R> converter)
jdbcJavaType
- The Java type expected by the converter as its "relational model" type.domainJavaType
- The Java type expected by the converter as its "object model" type.converter
- The conversion to apply. Consumes the JDBC value based on `relationalJavaType`.this
, for method chaining<C> NativeQuery<T> addScalar(String columnAlias, Class<C> relationalJavaType, Class<? extends AttributeConverter<?,C>> converter)
relationalJavaType
- The Java type expected by the converter as its
"relational" type.converter
- The conversion to apply. Consumes the JDBC value based
on `relationalJavaType`.this
, for method chaining<O,R> NativeQuery<T> addScalar(String columnAlias, Class<O> domainJavaType, Class<R> jdbcJavaType, Class<? extends AttributeConverter<O,R>> converter)
jdbcJavaType
- The Java type expected by the converter as its "relational model" type.domainJavaType
- The Java type expected by the converter as its "object model" type.converter
- The conversion to apply. Consumes the JDBC value based on `jdbcJavaType`.this
, for method chaining<J> NativeQuery.InstantiationResultNode<J> addInstantiation(Class<J> targetJavaType)
NativeQuery<T> addAttributeResult(String columnAlias, Class<?> entityJavaType, String attributePath)
this
, for method chainingNativeQuery<T> addAttributeResult(String columnAlias, String entityName, String attributePath)
this
, for method chainingNativeQuery<T> addAttributeResult(String columnAlias, SingularAttribute<?,?> attribute)
this
, for method chainingNativeQuery.RootReturn addRoot(String tableAlias, String entityName)
NativeQuery.RootReturn
to allow
further definition.tableAlias
- The SQL table alias to map to this entityentityName
- The name of the entity.NativeQuery.RootReturn addRoot(String tableAlias, Class entityType)
NativeQuery.RootReturn
to allow further definition.tableAlias
- The SQL table alias to map to this entityentityType
- The java type of the entity.NativeQuery<T> addEntity(String entityName)
addRoot(java.lang.String, java.lang.String)
if you need further control of the mappingentityName
- The entity name that is the root return of the query.this
, for method chainingNativeQuery<T> addEntity(String tableAlias, String entityName)
tableAlias
- The SQL table aliasentityName
- The entity namethis
, for method chainingNativeQuery<T> addEntity(String tableAlias, String entityName, LockMode lockMode)
tableAlias
- The SQL table aliasentityName
- The entity namelockMode
- The lock mode for this return.this
, for method chainingNativeQuery<T> addEntity(Class entityType)
entityType
- The java type of the entity to add as a rootthis
, for method chainingNativeQuery<T> addEntity(String tableAlias, Class entityType)
tableAlias
- The SQL table aliasentityType
- The java type of the entity to add as a rootthis
, for method chainingNativeQuery<T> addEntity(String tableAlias, Class entityClass, LockMode lockMode)
tableAlias
- The SQL table aliasentityClass
- The entity ClasslockMode
- The lock mode for this return.this
, for method chainingNativeQuery.FetchReturn addFetch(String tableAlias, String ownerTableAlias, String joinPropertyName)
tableAlias
- The SQL table alias for the data to be mapped to this fetchownerTableAlias
- Identify the table alias of the owner of this association. Should match the alias of a
previously added root or fetchjoinPropertyName
- The name of the property being join fetched.NativeQuery<T> addJoin(String tableAlias, String path)
tableAlias
- The SQL table alias for the data to be mapped to this fetchpath
- The association path ([owner-alias].[property-name]).this
, for method chainingNativeQuery<T> addJoin(String tableAlias, String ownerTableAlias, String joinPropertyName)
tableAlias
- The SQL table alias for the data to be mapped to this fetchownerTableAlias
- Identify the table alias of the owner of this association. Should match the alias of a
previously added root or fetchjoinPropertyName
- The name of the property being join fetched.this
, for method chainingNativeQuery<T> addJoin(String tableAlias, String path, LockMode lockMode)
tableAlias
- The SQL table alias for the data to be mapped to this fetchpath
- The association path ([owner-alias].[property-name]).lockMode
- The lock mode for this return.this
, for method chainingNativeQuery<T> addSynchronizedQuerySpace(String querySpace)
SynchronizeableQuery
addSynchronizedQuerySpace
in interface SynchronizeableQuery
querySpace
- The query space to be auto-flushed for this query.this
, for method chainingNativeQuery<T> addSynchronizedEntityName(String entityName) throws MappingException
SynchronizeableQuery
SynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String)
for all tables associated with the given entity.addSynchronizedEntityName
in interface SynchronizeableQuery
entityName
- The name of the entity upon whose defined query spaces we should additionally synchronize.this
, for method chainingMappingException
- Indicates the given name could not be resolved as an entityNativeQuery<T> addSynchronizedEntityClass(Class entityClass) throws MappingException
SynchronizeableQuery
SynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String)
for all tables associated with the given entity.addSynchronizedEntityClass
in interface SynchronizeableQuery
entityClass
- The class of the entity upon whose defined query spaces we should additionally synchronize.this
, for method chainingMappingException
- Indicates the given class could not be resolved as an entityNativeQuery<T> setHibernateFlushMode(FlushMode flushMode)
CommonQueryContract
setHibernateFlushMode
in interface CommonQueryContract
flushMode
- The new FlushMode to use.this
, for method chainingSession.getHibernateFlushMode()
,
CommonQueryContract.getHibernateFlushMode()
NativeQuery<T> setFlushMode(FlushModeType flushMode)
setFlushMode
in interface Query
setFlushMode
in interface TypedQuery<T>
NativeQuery<T> setCacheMode(CacheMode cacheMode)
CommonQueryContract
setCacheMode
in interface CommonQueryContract
cacheMode
- The new CacheMode to use.this
, for method chainingCommonQueryContract.getCacheMode()
NativeQuery<T> setCacheable(boolean cacheable)
CommonQueryContract
setCacheable
in interface CommonQueryContract
cacheable
- Should the query results be cacheable?this
, for method chainingCommonQueryContract.isCacheable()
NativeQuery<T> setCacheRegion(String cacheRegion)
CommonQueryContract
setCacheRegion
in interface CommonQueryContract
cacheRegion
- the name of a query cache region, or null
to indicate that the default region
should be used.this
, for method chainingCommonQueryContract.getCacheRegion()
NativeQuery<T> setTimeout(int timeout)
CommonQueryContract
setTimeout
in interface CommonQueryContract
timeout
- the timeout in secondsthis
, for method chainingCommonQueryContract.getTimeout()
NativeQuery<T> setFetchSize(int fetchSize)
CommonQueryContract
setFetchSize
in interface CommonQueryContract
fetchSize
- the fetch size hintthis
, for method chainingCommonQueryContract.getFetchSize()
NativeQuery<T> setReadOnly(boolean readOnly)
CommonQueryContract
setReadOnly
in interface CommonQueryContract
readOnly
- true
indicates that entities and proxies loaded by the query
are to be put in read-only mode; false
indicates that entities and proxies
loaded by the query will be put in modifiable 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 beforeQuery the query was executed.
NativeQuery<T> setLockOptions(LockOptions lockOptions)
Query
Query.setLockMode(String, LockMode)
.lockOptions
- The lock options to apply to the query.this
, for method chainingQuery.getLockOptions()
NativeQuery<T> setLockMode(String alias, LockMode lockMode)
Query
The alias-specific lock modes specified here are added to the query's internal
LockOptions
.
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()
NativeQuery<T> setComment(String comment)
Query
comment
- The human-readable commentthis
, for method chainingQuery.getComment()
NativeQuery<T> addQueryHint(String hint)
Query
QueryHint
and Query.getHints()
, 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.NativeQuery<T> setMaxResults(int maxResult)
setMaxResults
in interface Query
setMaxResults
in interface TypedQuery<T>
NativeQuery<T> setFirstResult(int startPosition)
setFirstResult
in interface Query
setFirstResult
in interface TypedQuery<T>
NativeQuery<T> setHint(String hintName, Object value)
setHint
in interface Query
setHint
in interface TypedQuery<T>
NativeQuery<T> setLockMode(LockModeType lockMode)
setLockMode
in interface Query
setLockMode
in interface TypedQuery<T>
NativeQuery<T> setTupleTransformer(TupleTransformer<T> transformer)
NativeQuery<T> setResultListTransformer(ResultListTransformer transformer)
NativeQuery<T> setResultTransformer(ResultTransformer transformer)
NativeQuery<T> setParameter(String name, Object value)
Query
Query.setParameter(String, Object, AllowableParameterType)
should be used insteadsetParameter
in interface Query
setParameter
in interface TypedQuery<T>
name
- the parameter namevalue
- the (possibly-null) parameter valuethis
, for method chainingNativeQuery<T> setParameter(int position, Object value)
Query
Query.setParameter(int, Object, AllowableParameterType)
should be used insteadsetParameter
in interface Query
setParameter
in interface TypedQuery<T>
position
- the position of the parameter in the query
string, numbered from 0.value
- the possibly-null parameter valuethis
, for method chaining<P> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val)
Query
Query.setParameter(QueryParameter, Object, AllowableParameterType)
should be used insteadparameter
- The query parameter mementoval
- the possibly-null parameter valuethis
, for method chainingNativeQuery<T> setParameter(Parameter<Instant> param, Instant value, TemporalType temporalType)
NativeQuery<T> setParameter(Parameter<LocalDateTime> param, LocalDateTime value, TemporalType temporalType)
NativeQuery<T> setParameter(Parameter<ZonedDateTime> param, ZonedDateTime value, TemporalType temporalType)
NativeQuery<T> setParameter(Parameter<OffsetDateTime> param, OffsetDateTime value, TemporalType temporalType)
NativeQuery<T> setParameter(String name, Instant value, TemporalType temporalType)
NativeQuery<T> setParameter(String name, LocalDateTime value, TemporalType temporalType)
NativeQuery<T> setParameter(String name, ZonedDateTime value, TemporalType temporalType)
NativeQuery<T> setParameter(String name, OffsetDateTime value, TemporalType temporalType)
NativeQuery<T> setParameter(int position, Instant value, TemporalType temporalType)
NativeQuery<T> setParameter(int position, LocalDateTime value, TemporalType temporalType)
NativeQuery<T> setParameter(int position, ZonedDateTime value, TemporalType temporalType)
NativeQuery<T> setParameter(int position, OffsetDateTime value, TemporalType temporalType)
<P> NativeQuery<T> setParameter(Parameter<P> param, P value)
setParameter
in interface Query
setParameter
in interface TypedQuery<T>
NativeQuery<T> setParameter(String name, Object val, TemporalType temporalType)
Query
name
- the parameter nameval
- the possibly-null parameter valuetemporalType
- the temporal-type to use in binding the date/timethis
, for method chainingNativeQuery<T> setParameter(int position, Object val, TemporalType temporalType)
Query
position
- 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 chaining<P> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val, TemporalType temporalType)
Query
parameter
- The query parameter mementoval
- the possibly-null parameter valuetemporalType
- the temporal-type to use in binding the date/timethis
, for method chainingNativeQuery<T> setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<T>
NativeQuery<T> setParameter(Parameter<Date> param, Date value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<T>
NativeQuery<T> setParameter(String name, Calendar value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<T>
NativeQuery<T> setParameter(int position, Calendar value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<T>
NativeQuery<T> setParameter(String name, Date value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<T>
NativeQuery<T> setParameter(int position, Date value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<T>
<P> NativeQuery<T> setParameterList(QueryParameter<P> parameter, Collection<P> values)
Query
parameter
- the parameter mementovalues
- a collection of values to listthis
, for method chainingNativeQuery<T> setParameterList(String name, Collection values)
Query
name
- the name of the parametervalues
- a collection of values to listthis
, for method chainingNativeQuery<T> setParameterList(String name, Collection values, AllowableParameterType type)
Query
name
- the name of the parametervalues
- a collection of values to listtype
- the Hibernate allowable parameter type of the valuesthis
, for method chainingNativeQuery<T> setParameterList(String name, Object[] values, AllowableParameterType type)
Query
name
- the name of the parametervalues
- a collection of values to listtype
- the Hibernate type of the valuesthis
, for method chainingNativeQuery<T> setParameterList(String name, Object[] values)
Query
name
- the name of the parametervalues
- a collection of values to listthis
, for method chainingNativeQuery<T> setParameter(String name, Object val, AllowableParameterType type)
Query
name
- the name of the parameterval
- the possibly-null parameter valuetype
- the Hibernate allowable parameter typethis
, for method chainingNativeQuery<T> setParameter(int position, Object val, AllowableParameterType type)
Query
position
- the position of the parameter in the query
string, numbered from 0.val
- the possibly-null parameter valuetype
- the Hibernate allowable parameter typethis
, for method chaining<P> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val, AllowableParameterType type)
Query
parameter
- The query parameter mementoval
- the possibly-null parameter valuetype
- the Hibernate allowable parameter typethis
, for method chainingNativeQuery<T> setParameterList(int position, Collection values)
Query
position
- the parameter positional labelvalues
- a collection of values to listthis
, for method chainingNativeQuery<T> setParameterList(String name, Collection values, Class type)
Query
name
- the name of the parametervalues
- a collection of values to listthis
, for method chainingNativeQuery<T> setParameterList(int position, Collection values, Class type)
Query
position
- the parameter positional labelvalues
- a collection of values to listthis
, for method chainingNativeQuery<T> setParameterList(int position, Collection values, AllowableParameterType type)
Query
position
- the parameter positional labelvalues
- a collection of values to listtype
- the Hibernate allowable parameter type of the valuesthis
, for method chainingNativeQuery<T> setParameterList(int position, Object[] values, AllowableParameterType type)
Query
position
- the parameter positional labelvalues
- a collection of values to listtype
- the Hibernate type of the valuesthis
, for method chainingNativeQuery<T> setParameterList(int position, Object[] values)
Query
position
- the parameter positional labelvalues
- a collection of values to listthis
, for method chainingNativeQuery<T> setProperties(Object bean)
Query
bean
- any JavaBean or POJOthis
, for method chainingNativeQuery<T> setProperties(Map bean)
Query
bean
- a java.util.Mapthis
, for method chainingCopyright © 2001-2021 Red Hat, Inc. All Rights Reserved.