public final class QueryParameters extends Object
Constructor and Description |
---|
QueryParameters() |
QueryParameters(Type[] positionalParameterTypes,
Object[] positionalParameterValues) |
QueryParameters(Type[] positionalParameterTypes,
Object[] positionalParameterValues,
LockOptions lockOptions,
RowSelection rowSelection,
boolean isReadOnlyInitialized,
boolean readOnly,
boolean cacheable,
String cacheRegion,
String comment,
List<String> queryHints,
boolean isLookupByNaturalKey,
ResultTransformer transformer) |
QueryParameters(Type[] positionalParameterTypes,
Object[] positionalParameterValues,
Map<String,TypedValue> namedParameters,
LockOptions lockOptions,
RowSelection rowSelection,
boolean isReadOnlyInitialized,
boolean readOnly,
boolean cacheable,
String cacheRegion,
String comment,
List<String> queryHints,
Serializable[] collectionKeys,
Object optionalObject,
String optionalEntityName,
Serializable optionalId,
ResultTransformer transformer) |
QueryParameters(Type[] positionalParameterTypes,
Object[] positionalParameterValues,
Map<String,TypedValue> namedParameters,
LockOptions lockOptions,
RowSelection rowSelection,
boolean isReadOnlyInitialized,
boolean readOnly,
boolean cacheable,
String cacheRegion,
String comment,
List<String> queryHints,
Serializable[] collectionKeys,
ResultTransformer transformer) |
QueryParameters(Type[] positionalParameterTypes,
Object[] positionalParameterValues,
Map<String,TypedValue> namedParameters,
Serializable[] collectionKeys) |
QueryParameters(Type[] positionalParameterTypes,
Object[] positionalParameterValues,
Object optionalObject,
String optionalEntityName,
Serializable optionalObjectId) |
QueryParameters(Type[] positionalParameterTypes,
Object[] positionalParameterValues,
Serializable[] collectionKeys) |
QueryParameters(Type type,
Object value) |
Modifier and Type | Method and Description |
---|---|
QueryParameters |
createCopyUsing(RowSelection selection) |
String |
getCacheRegion() |
Serializable[] |
getCollectionKeys() |
String |
getComment() |
Type[] |
getFilteredPositionalParameterTypes() |
Object[] |
getFilteredPositionalParameterValues() |
String |
getFilteredSQL() |
LockOptions |
getLockOptions() |
Map<String,TypedValue> |
getNamedParameters() |
String |
getOptionalEntityName() |
Serializable |
getOptionalId() |
Object |
getOptionalObject() |
Type[] |
getPositionalParameterTypes() |
Object[] |
getPositionalParameterValues() |
List<String> |
getQueryHints() |
HQLQueryPlan |
getQueryPlan() |
ResultTransformer |
getResultTransformer() |
RowSelection |
getRowSelection() |
ScrollMode |
getScrollMode() |
boolean |
hasAutoDiscoverScalarTypes() |
boolean |
hasRowSelection() |
boolean |
isCacheable() |
boolean |
isCallable() |
boolean |
isNaturalKeyLookup() |
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(SessionImplementor 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(String sql,
Map filters,
SessionFactoryImplementor factory) |
void |
processFilters(String sql,
SessionImplementor session) |
void |
setAutoDiscoverScalarTypes(boolean autodiscovertypes) |
void |
setCacheable(boolean b) |
void |
setCacheRegion(String cacheRegion) |
void |
setCallable(boolean callable) |
void |
setCollectionKeys(Serializable[] collectionKeys) |
void |
setComment(String comment) |
void |
setLockOptions(LockOptions lockOptions) |
void |
setNamedParameters(Map<String,TypedValue> map) |
void |
setNaturalKeyLookup(boolean isNaturalKeyLookup) |
void |
setOptionalEntityName(String optionalEntityName) |
void |
setOptionalId(Serializable optionalId) |
void |
setOptionalObject(Object optionalObject) |
void |
setPositionalParameterTypes(Type[] types) |
void |
setPositionalParameterValues(Object[] objects) |
void |
setQueryHints(List<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[] positionalParameterTypes, Object[] positionalParameterValues, Object optionalObject, String optionalEntityName, Serializable optionalObjectId)
public QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues)
public QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, Serializable[] collectionKeys)
public QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, Map<String,TypedValue> namedParameters, Serializable[] collectionKeys)
public QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, String cacheRegion, String comment, List<String> queryHints, boolean isLookupByNaturalKey, ResultTransformer transformer)
public QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, Map<String,TypedValue> namedParameters, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, String cacheRegion, String comment, List<String> queryHints, Serializable[] collectionKeys, ResultTransformer transformer)
public QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, Map<String,TypedValue> namedParameters, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, String cacheRegion, String comment, List<String> queryHints, Serializable[] collectionKeys, Object optionalObject, String optionalEntityName, Serializable optionalId, ResultTransformer transformer)
public boolean hasRowSelection()
public Map<String,TypedValue> getNamedParameters()
public Type[] getPositionalParameterTypes()
public Object[] getPositionalParameterValues()
public RowSelection getRowSelection()
public ResultTransformer getResultTransformer()
public void setNamedParameters(Map<String,TypedValue> map)
public void setPositionalParameterTypes(Type[] types)
public void setPositionalParameterValues(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 String getCacheRegion()
public void setCacheRegion(String cacheRegion)
public void validateParameters() throws QueryException
QueryException
public String getComment()
public void setComment(String comment)
public ScrollMode getScrollMode()
public void setScrollMode(ScrollMode scrollMode)
public Serializable[] getCollectionKeys()
public void setCollectionKeys(Serializable[] collectionKeys)
public String getOptionalEntityName()
public void setOptionalEntityName(String optionalEntityName)
public Serializable getOptionalId()
public void setOptionalId(Serializable optionalId)
public Object getOptionalObject()
public void setOptionalObject(Object optionalObject)
public boolean isReadOnlyInitialized()
setReadOnly(boolean)
,
isReadOnly(org.hibernate.engine.spi.SessionImplementor)
public boolean isReadOnly()
IllegalStateException
- if the read-only/modifiable setting has not been
initialized (i.e., isReadOnlyInitialized() == false).isReadOnlyInitialized()
,
isReadOnly(org.hibernate.engine.spi.SessionImplementor)
,
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(SessionImplementor 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(org.hibernate.engine.spi.SessionImplementor)
,
setReadOnly(boolean)
,
PersistenceContext.isDefaultReadOnly()
public void setCallable(boolean callable)
public boolean isCallable()
public boolean hasAutoDiscoverScalarTypes()
public void processFilters(String sql, SessionImplementor session)
public void processFilters(String sql, Map filters, SessionFactoryImplementor factory)
public String getFilteredSQL()
public 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)
Copyright © 2016 JBoss by Red Hat. All rights reserved.