public final class

QueryParameters

extends Object
java.lang.Object
   ↳ org.hibernate.engine.QueryParameters

Summary

Public Constructors
QueryParameters()
QueryParameters(Type type, Object value)
QueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues, Object optionalObject, String optionalEntityName, Serializable optionalObjectId)
QueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues)
QueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues, Serializable[] collectionKeys)
QueryParameters(Type[] positionalParameterTypes, Object[] postionalParameterValues, Map namedParameters, Serializable[] collectionKeys)
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[] 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, 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)
Public Methods
QueryParameters createCopyUsing(RowSelection selection)
String getCacheRegion()
Serializable[] getCollectionKeys()
String getComment()
Type[] getFilteredPositionalParameterTypes()
Object[] getFilteredPositionalParameterValues()
String getFilteredSQL()
LockOptions getLockOptions()
Map getNamedParameters()
String getOptionalEntityName()
Serializable getOptionalId()
Object getOptionalObject()
Type[] getPositionalParameterTypes()
Object[] getPositionalParameterValues()
ResultTransformer getResultTransformer()
RowSelection getRowSelection()
ScrollMode getScrollMode()
boolean hasAutoDiscoverScalarTypes()
boolean hasRowSelection()
boolean isCacheable()
boolean isCallable()
boolean isNaturalKeyLookup()
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 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 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 setCacheRegion(String cacheRegion)
void setCacheable(boolean b)
void setCallable(boolean callable)
void setCollectionKeys(Serializable[] collectionKeys)
void setComment(String comment)
void setLockOptions(LockOptions lockOptions)
void setNamedParameters(Map 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 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()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public QueryParameters ()

public QueryParameters (Type type, Object value)

public QueryParameters (Type[] positionalParameterTypes, Object[] postionalParameterValues, Object optionalObject, String optionalEntityName, Serializable optionalObjectId)

public QueryParameters (Type[] positionalParameterTypes, Object[] postionalParameterValues)

public QueryParameters (Type[] positionalParameterTypes, Object[] postionalParameterValues, Serializable[] collectionKeys)

public QueryParameters (Type[] positionalParameterTypes, Object[] postionalParameterValues, Map namedParameters, Serializable[] collectionKeys)

public QueryParameters (Type[] positionalParameterTypes, Object[] positionalParameterValues, LockOptions lockOptions, RowSelection rowSelection, boolean isReadOnlyInitialized, boolean readOnly, boolean cacheable, String cacheRegion, String comment, boolean isLookupByNaturalKey, ResultTransformer transformer)

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)

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)

Public Methods

public QueryParameters createCopyUsing (RowSelection selection)

public String getCacheRegion ()

public Serializable[] getCollectionKeys ()

public String getComment ()

public Type[] getFilteredPositionalParameterTypes ()

public Object[] getFilteredPositionalParameterValues ()

public String getFilteredSQL ()

public LockOptions getLockOptions ()

public Map getNamedParameters ()

public String getOptionalEntityName ()

public Serializable getOptionalId ()

public Object getOptionalObject ()

public Type[] getPositionalParameterTypes ()

public Object[] getPositionalParameterValues ()

public ResultTransformer getResultTransformer ()

public RowSelection getRowSelection ()

public ScrollMode getScrollMode ()

public boolean hasAutoDiscoverScalarTypes ()

public boolean hasRowSelection ()

public boolean isCacheable ()

public boolean isCallable ()

public boolean isNaturalKeyLookup ()

public 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.

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

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).

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

public void processFilters (String sql, Map filters, SessionFactoryImplementor factory)

public void processFilters (String sql, SessionImplementor session)

public void setAutoDiscoverScalarTypes (boolean autodiscovertypes)

public void setCacheRegion (String cacheRegion)

public void setCacheable (boolean b)

public void setCallable (boolean callable)

public void setCollectionKeys (Serializable[] collectionKeys)

public void setComment (String comment)

public void setLockOptions (LockOptions lockOptions)

public void setNamedParameters (Map map)

public void setNaturalKeyLookup (boolean isNaturalKeyLookup)

public void setOptionalEntityName (String optionalEntityName)

public void setOptionalId (Serializable optionalId)

public void setOptionalObject (Object optionalObject)

public void setPositionalParameterTypes (Type[] types)

public void setPositionalParameterValues (Object[] objects)

public void setReadOnly (boolean readOnly)

Set the read-only/modifiable mode for entities and proxies loaded by the query. *

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

public void setRowSelection (RowSelection selection)

public void setScrollMode (ScrollMode scrollMode)

public void traceParameters (SessionFactoryImplementor factory)

public void validateParameters ()