Package org.hibernate.engine
Class QueryParameters
java.lang.Object
org.hibernate.engine.QueryParameters
-
Constructor Summary
ConstructorsConstructorDescriptionQueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues) QueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues, Serializable[] collectionKeys) QueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues, Object optionalObject, String optionalEntityName, Serializable optionalObjectId) QueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues, Map namedParameters, Serializable[] collectionKeys) QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, Map namedParameters, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, String cacheRegion, String comment, Serializable[] collectionKeys, Object optionalObject, String optionalEntityName, Serializable optionalId, ResultTransformer transformer) QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, Map namedParameters, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, String cacheRegion, String comment, Serializable[] collectionKeys, ResultTransformer transformer) QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, String cacheRegion, String comment, boolean isLookupByNaturalKey, ResultTransformer transformer) QueryParameters(Type type, Object value) -
Method Summary
Modifier and TypeMethodDescriptioncreateCopyUsing(RowSelection selection) Type[]Object[]Type[]Object[]booleanbooleanbooleanbooleanbooleanbooleanShould 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.booleanisReadOnly(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.booleanHas the read-only/modifiable mode been explicitly set?voidprocessFilters(String sql, Map filters, SessionFactoryImplementor factory) voidprocessFilters(String sql, SessionImplementor session) voidsetAutoDiscoverScalarTypes(boolean autodiscovertypes) voidsetCacheable(boolean b) voidsetCacheRegion(String cacheRegion) voidsetCallable(boolean callable) voidsetCollectionKeys(Serializable[] collectionKeys) voidsetComment(String comment) voidsetLockOptions(LockOptions lockOptions) voidsetNamedParameters(Map map) voidsetNaturalKeyLookup(boolean isNaturalKeyLookup) voidsetOptionalEntityName(String optionalEntityName) voidsetOptionalId(Serializable optionalId) voidsetOptionalObject(Object optionalObject) voidsetPositionalParameterTypes(Type[] types) voidsetPositionalParameterValues(Object[] objects) voidsetReadOnly(boolean readOnly) Set the read-only/modifiable mode for entities and proxies loaded by the query.voidsetRowSelection(RowSelection selection) voidsetScrollMode(ScrollMode scrollMode) voidtraceParameters(SessionFactoryImplementor factory) void
-
Constructor Details
-
QueryParameters
public QueryParameters() -
QueryParameters
-
QueryParameters
public QueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues, Object optionalObject, String optionalEntityName, Serializable optionalObjectId) -
QueryParameters
-
QueryParameters
public QueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues, Serializable[] collectionKeys) -
QueryParameters
public QueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues, Map namedParameters, Serializable[] collectionKeys) -
QueryParameters
public QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, String cacheRegion, String comment, boolean isLookupByNaturalKey, ResultTransformer transformer) -
QueryParameters
public QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, Map namedParameters, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, String cacheRegion, String comment, Serializable[] collectionKeys, ResultTransformer transformer) -
QueryParameters
public QueryParameters(Type[] positionalParameterTypes, Object[] positionalParameterValues, Map namedParameters, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, String cacheRegion, String comment, Serializable[] collectionKeys, Object optionalObject, String optionalEntityName, Serializable optionalId, ResultTransformer transformer)
-
-
Method Details
-
hasRowSelection
public boolean hasRowSelection() -
getNamedParameters
-
getPositionalParameterTypes
-
getPositionalParameterValues
-
getRowSelection
-
getResultTransformer
-
setNamedParameters
-
setPositionalParameterTypes
-
setPositionalParameterValues
-
setRowSelection
-
getLockOptions
-
setLockOptions
-
traceParameters
- Throws:
HibernateException
-
isCacheable
public boolean isCacheable() -
setCacheable
public void setCacheable(boolean b) -
getCacheRegion
-
setCacheRegion
-
validateParameters
- Throws:
QueryException
-
getComment
-
setComment
-
getScrollMode
-
setScrollMode
-
getCollectionKeys
-
setCollectionKeys
-
getOptionalEntityName
-
setOptionalEntityName
-
getOptionalId
-
setOptionalId
-
getOptionalObject
-
setOptionalObject
-
isReadOnlyInitialized
public boolean isReadOnlyInitialized()Has the read-only/modifiable mode been explicitly set?- Returns:
- true, the read-only/modifiable mode was explicitly set false, the read-only/modifiable mode was not explicitly set
- See Also:
-
isReadOnly
public 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.- Returns:
- true, entities and proxies loaded by the Query will be put in read-only mode false, entities and proxies loaded by the Query will be put in modifiable mode
- Throws:
IllegalStateException- if the read-only/modifiable setting has not been initialized (i.e., isReadOnlyInitialized() == false).- See Also:
-
isReadOnly
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.- Returns:
- true, entities and proxies loaded by the query will be put in read-only mode false, entities and proxies loaded by the query will be put in modifiable mode
- See Also:
-
setReadOnly
public void setReadOnly(boolean readOnly) Set the read-only/modifiable mode for entities and proxies loaded by the query. *- See Also:
-
setCallable
public void setCallable(boolean callable) -
isCallable
public boolean isCallable() -
hasAutoDiscoverScalarTypes
public boolean hasAutoDiscoverScalarTypes() -
processFilters
-
processFilters
-
getFilteredSQL
-
getFilteredPositionalParameterValues
-
getFilteredPositionalParameterTypes
-
isNaturalKeyLookup
public boolean isNaturalKeyLookup() -
setNaturalKeyLookup
public void setNaturalKeyLookup(boolean isNaturalKeyLookup) -
setAutoDiscoverScalarTypes
public void setAutoDiscoverScalarTypes(boolean autodiscovertypes) -
createCopyUsing
-