public final class QueryParameters
extends java.lang.Object
Constructor and Description |
---|
QueryParameters() |
QueryParameters(QueryParameterBindingsImpl queryParameterBindings,
LockOptions lockOptions,
RowSelection selection,
boolean isReadOnlyInitialized,
boolean readOnly,
boolean cacheable,
java.lang.String cacheRegion,
java.lang.String comment,
java.util.List<java.lang.String> dbHints,
java.io.Serializable[] collectionKeys,
java.lang.Object optionalObject,
java.lang.String optionalEntityName,
java.io.Serializable optionalId,
ResultTransformer resultTransformer) |
QueryParameters(Type[] positionalParameterTypes,
java.lang.Object[] positionalParameterValues) |
QueryParameters(Type[] positionalParameterTypes,
java.lang.Object[] positionalParameterValues,
LockOptions lockOptions,
RowSelection rowSelection,
boolean isReadOnlyInitialized,
boolean readOnly,
boolean cacheable,
java.lang.String cacheRegion,
java.lang.String comment,
java.util.List<java.lang.String> queryHints,
boolean isLookupByNaturalKey,
ResultTransformer transformer) |
QueryParameters(Type[] positionalParameterTypes,
java.lang.Object[] positionalParameterValues,
java.util.Map<java.lang.String,TypedValue> namedParameters,
LockOptions lockOptions,
RowSelection rowSelection,
boolean isReadOnlyInitialized,
boolean readOnly,
boolean cacheable,
java.lang.String cacheRegion,
java.lang.String comment,
java.util.List<java.lang.String> queryHints,
java.io.Serializable[] collectionKeys,
java.lang.Object optionalObject,
java.lang.String optionalEntityName,
java.io.Serializable optionalId,
ResultTransformer transformer) |
QueryParameters(Type[] positionalParameterTypes,
java.lang.Object[] positionalParameterValues,
java.util.Map<java.lang.String,TypedValue> namedParameters,
LockOptions lockOptions,
RowSelection rowSelection,
boolean isReadOnlyInitialized,
boolean readOnly,
boolean cacheable,
java.lang.String cacheRegion,
java.lang.String comment,
java.util.List<java.lang.String> queryHints,
java.io.Serializable[] collectionKeys,
ResultTransformer transformer) |
QueryParameters(Type[] positionalParameterTypes,
java.lang.Object[] positionalParameterValues,
java.util.Map<java.lang.String,TypedValue> namedParameters,
java.io.Serializable[] collectionKeys) |
QueryParameters(Type[] positionalParameterTypes,
java.lang.Object[] positionalParameterValues,
java.lang.Object optionalObject,
java.lang.String optionalEntityName,
java.io.Serializable optionalObjectId) |
QueryParameters(Type[] positionalParameterTypes,
java.lang.Object[] positionalParameterValues,
java.io.Serializable[] collectionKeys) |
QueryParameters(Type type,
java.lang.Object value) |
Modifier and Type | Method and Description |
---|---|
void |
bindDynamicParameter(Type paramType,
java.lang.Object paramValue) |
QueryParameters |
createCopyUsing(RowSelection selection) |
java.lang.String |
getCacheRegion() |
java.io.Serializable[] |
getCollectionKeys() |
java.lang.String |
getComment() |
Type[] |
getFilteredPositionalParameterTypes() |
java.lang.Object[] |
getFilteredPositionalParameterValues() |
java.lang.String |
getFilteredSQL() |
LockOptions |
getLockOptions() |
java.util.Map<java.lang.String,TypedValue> |
getNamedParameters() |
java.lang.String |
getOptionalEntityName() |
java.io.Serializable |
getOptionalId() |
java.lang.Object |
getOptionalObject() |
Type[] |
getPositionalParameterTypes() |
java.lang.Object[] |
getPositionalParameterValues() |
java.util.List<java.lang.String> |
getQueryHints() |
HQLQueryPlan |
getQueryPlan() |
ResultTransformer |
getResultTransformer() |
RowSelection |
getRowSelection() |
ScrollMode |
getScrollMode() |
boolean |
hasAutoDiscoverScalarTypes() |
boolean |
hasRowSelection() |
boolean |
isCacheable() |
boolean |
isCallable() |
boolean |
isNaturalKeyLookup() |
boolean |
isPassDistinctThrough()
Check if this query should pass the
distinct to the database. |
boolean |
isReadOnly()
Should entities and proxies loaded by the Query be put in read-only mode? The
read-only/modifiable setting must be initialized via QueryParameters#setReadOnly(boolean)
before calling this method.
|
boolean |
isReadOnly(SharedSessionContractImplementor session)
Should entities and proxies loaded by the Query be put in read-only mode? If the
read-only/modifiable setting was not initialized (i.e., QueryParameters#isReadOnlyInitialized() == false),
then the default read-only/modifiable setting for the persistence context is returned instead.
|
boolean |
isReadOnlyInitialized()
Has the read-only/modifiable mode been explicitly set?
|
void |
processFilters(java.lang.String sql,
java.util.Map filters,
SessionFactoryImplementor factory) |
void |
processFilters(java.lang.String sql,
SharedSessionContractImplementor session) |
void |
setAutoDiscoverScalarTypes(boolean autodiscovertypes) |
void |
setCacheable(boolean b) |
void |
setCacheRegion(java.lang.String cacheRegion) |
void |
setCallable(boolean callable) |
void |
setCollectionKeys(java.io.Serializable[] collectionKeys) |
void |
setComment(java.lang.String comment) |
void |
setLockOptions(LockOptions lockOptions) |
void |
setNamedParameters(java.util.Map<java.lang.String,TypedValue> map) |
void |
setNaturalKeyLookup(boolean isNaturalKeyLookup) |
void |
setOptionalEntityName(java.lang.String optionalEntityName) |
void |
setOptionalId(java.io.Serializable optionalId) |
void |
setOptionalObject(java.lang.Object optionalObject) |
void |
setPassDistinctThrough(boolean passDistinctThrough)
Set if this query should pass the
distinct to the database. |
void |
setPositionalParameterTypes(Type[] types) |
void |
setPositionalParameterValues(java.lang.Object[] objects) |
void |
setQueryHints(java.util.List<java.lang.String> queryHints) |
void |
setQueryPlan(HQLQueryPlan queryPlan) |
void |
setReadOnly(boolean readOnly)
Set the read-only/modifiable mode for entities and proxies loaded by the query.
|
void |
setRowSelection(RowSelection selection) |
void |
setScrollMode(ScrollMode scrollMode) |
void |
traceParameters(SessionFactoryImplementor factory) |
void |
validateParameters() |
public QueryParameters()
public QueryParameters(Type type, java.lang.Object value)
public QueryParameters(Type[] positionalParameterTypes, java.lang.Object[] positionalParameterValues, java.lang.Object optionalObject, java.lang.String optionalEntityName, java.io.Serializable optionalObjectId)
public QueryParameters(Type[] positionalParameterTypes, java.lang.Object[] positionalParameterValues)
public QueryParameters(Type[] positionalParameterTypes, java.lang.Object[] positionalParameterValues, java.io.Serializable[] collectionKeys)
public QueryParameters(Type[] positionalParameterTypes, java.lang.Object[] positionalParameterValues, java.util.Map<java.lang.String,TypedValue> namedParameters, java.io.Serializable[] collectionKeys)
public QueryParameters(Type[] positionalParameterTypes, java.lang.Object[] positionalParameterValues, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, java.lang.String cacheRegion, java.lang.String comment, java.util.List<java.lang.String> queryHints, boolean isLookupByNaturalKey, ResultTransformer transformer)
public QueryParameters(Type[] positionalParameterTypes, java.lang.Object[] positionalParameterValues, java.util.Map<java.lang.String,TypedValue> namedParameters, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, java.lang.String cacheRegion, java.lang.String comment, java.util.List<java.lang.String> queryHints, java.io.Serializable[] collectionKeys, ResultTransformer transformer)
public QueryParameters(Type[] positionalParameterTypes, java.lang.Object[] positionalParameterValues, java.util.Map<java.lang.String,TypedValue> namedParameters, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, java.lang.String cacheRegion, java.lang.String comment, java.util.List<java.lang.String> queryHints, java.io.Serializable[] collectionKeys, java.lang.Object optionalObject, java.lang.String optionalEntityName, java.io.Serializable optionalId, ResultTransformer transformer)
public QueryParameters(QueryParameterBindingsImpl queryParameterBindings, LockOptions lockOptions, RowSelection selection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, java.lang.String cacheRegion, java.lang.String comment, java.util.List<java.lang.String> dbHints, java.io.Serializable[] collectionKeys, java.lang.Object optionalObject, java.lang.String optionalEntityName, java.io.Serializable optionalId, ResultTransformer resultTransformer)
public boolean hasRowSelection()
public java.util.Map<java.lang.String,TypedValue> getNamedParameters()
public Type[] getPositionalParameterTypes()
public java.lang.Object[] getPositionalParameterValues()
public RowSelection getRowSelection()
public ResultTransformer getResultTransformer()
public void setNamedParameters(java.util.Map<java.lang.String,TypedValue> map)
public void setPositionalParameterTypes(Type[] types)
public void setPositionalParameterValues(java.lang.Object[] objects)
public void setRowSelection(RowSelection selection)
public LockOptions getLockOptions()
public void setLockOptions(LockOptions lockOptions)
public void traceParameters(SessionFactoryImplementor factory) throws HibernateException
HibernateException
public boolean isCacheable()
public void setCacheable(boolean b)
public java.lang.String getCacheRegion()
public void setCacheRegion(java.lang.String cacheRegion)
public void validateParameters() throws QueryException
QueryException
public java.lang.String getComment()
public void setComment(java.lang.String comment)
public java.util.List<java.lang.String> getQueryHints()
public void setQueryHints(java.util.List<java.lang.String> queryHints)
public ScrollMode getScrollMode()
public void setScrollMode(ScrollMode scrollMode)
public java.io.Serializable[] getCollectionKeys()
public void setCollectionKeys(java.io.Serializable[] collectionKeys)
public java.lang.String getOptionalEntityName()
public void setOptionalEntityName(java.lang.String optionalEntityName)
public java.io.Serializable getOptionalId()
public void setOptionalId(java.io.Serializable optionalId)
public java.lang.Object getOptionalObject()
public void setOptionalObject(java.lang.Object optionalObject)
public boolean isReadOnlyInitialized()
setReadOnly(boolean)
,
isReadOnly(SharedSessionContractImplementor)
public boolean isReadOnly()
java.lang.IllegalStateException
- if the read-only/modifiable setting has not been
initialized (i.e., isReadOnlyInitialized() == false).isReadOnlyInitialized()
,
isReadOnly(SharedSessionContractImplementor)
,
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 boolean isReadOnly(SharedSessionContractImplementor session)
session
- The originating sessiontrue
indicates that entities and proxies loaded by the query will be put in read-only mode;
false
indicates that entities and proxies loaded by the query will be put in modifiable modeisReadOnlyInitialized()
,
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 void setReadOnly(boolean readOnly)
readOnly
- if true
, entities and proxies loaded by the query will be put in read-only mode; if
false
, entities and proxies loaded by the query will be put in modifiable modeisReadOnlyInitialized()
,
isReadOnly(SharedSessionContractImplementor)
,
setReadOnly(boolean)
,
PersistenceContext.isDefaultReadOnly()
public void setCallable(boolean callable)
public boolean isCallable()
public boolean hasAutoDiscoverScalarTypes()
public boolean isPassDistinctThrough()
distinct
to the database.distinct
to the databasepublic void setPassDistinctThrough(boolean passDistinctThrough)
distinct
to the database.passDistinctThrough
- the query passes distinct
to the databasepublic void processFilters(java.lang.String sql, SharedSessionContractImplementor session)
public void processFilters(java.lang.String sql, java.util.Map filters, SessionFactoryImplementor factory)
public java.lang.String getFilteredSQL()
public java.lang.Object[] getFilteredPositionalParameterValues()
public Type[] getFilteredPositionalParameterTypes()
public boolean isNaturalKeyLookup()
public void setNaturalKeyLookup(boolean isNaturalKeyLookup)
public void setAutoDiscoverScalarTypes(boolean autodiscovertypes)
public QueryParameters createCopyUsing(RowSelection selection)
public HQLQueryPlan getQueryPlan()
public void setQueryPlan(HQLQueryPlan queryPlan)
public void bindDynamicParameter(Type paramType, java.lang.Object paramValue)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.