Top Description Fields Constructors Methods
org.hibernate.impl

public Class QueryImpl

extends AbstractQueryImpl
Class Inheritance
Known Direct Subclasses
org.hibernate.impl.CollectionFilterImpl
Imports
java.util.Iterator, .List, .Map, org.hibernate.FlushMode, .HibernateException, .LockMode, .Query, .ScrollMode, .ScrollableResults, .LockOptions, org.hibernate.engine.QueryParameters, .SessionImplementor, org.hibernate.engine.query.ParameterMetadata

default implementation of the Query interface, for "ordinary" HQL queries (not collection filters)
Author
Gavin King
See Also
CollectionFilterImpl

Field Summary

Modifier and TypeField and Description
private LockOptions
Inherited from org.hibernate.impl.AbstractQueryImpl:
parameterMetadatasession

Constructor Summary

AccessConstructor and Description
public
QueryImpl(String queryString, FlushMode flushMode, SessionImplementor session, ParameterMetadata parameterMetadata)

public
QueryImpl(String queryString, SessionImplementor session, ParameterMetadata parameterMetadata)

Method Summary

Modifier and TypeMethod and Description
public int
executeUpdate()

Implements org.hibernate.Query.executeUpdate.

Execute the update or delete statement.
public LockOptions
public Iterator<E>
iterate()

Implements org.hibernate.Query.iterate.

Return the query results as an Iterator.
public List<E>
list()

Implements org.hibernate.Query.list.

Return the query results as a List.
public ScrollableResults
scroll()

Implements org.hibernate.Query.scroll.

Return the query results as ScrollableResults.
public ScrollableResults
scroll(ScrollMode scrollMode)

Implements org.hibernate.Query.scroll.

Return the query results as ScrollableResults.
public Query
setLockMode(String
a query alias, or this for a collection filter
alias
,
LockMode lockMode)

Implements org.hibernate.Query.setLockMode.

Set the lockmode for the objects idententified by the given alias that appears in the FROM clause.
public Query
setLockOptions(LockOptions lockOption)

Implements org.hibernate.Query.setLockOptions.

Set the lock options for the objects idententified by the given alias that appears in the FROM clause.
Inherited from org.hibernate.impl.AbstractQueryImpl:
afterbeforedetermineTypedetermineTypedetermineTypedetermineTypedetermineTypeexpandParameterListsgetCacheModegetNamedParameterListsgetNamedParametersgetNamedParamsgetParameterMetadatagetQueryParametersgetQueryStringgetReturnAliasesgetReturnTypesgetRowSelectiongetSelectiongetSessiongetTypesgetValueshasNamedParametersisReadOnlysetBigDecimalsetBigDecimalsetBigIntegersetBigIntegersetBinarysetBinarysetBooleansetBooleansetBytesetBytesetCacheablesetCacheModesetCacheRegionsetCalendarsetCalendarsetCalendarDatesetCalendarDatesetCharactersetCharactersetCollectionKeysetCommentsetDatesetDatesetDoublesetDoublesetEntitysetEntitysetFetchSizesetFirstResultsetFloatsetFloatsetFlushModesetIntegersetIntegersetLocalesetLocalesetLongsetLongsetMaxResultssetOptionalEntityNamesetOptionalIdsetOptionalObjectsetParametersetParametersetParametersetParametersetParameterListsetParameterListsetParameterListsetParameterListsetParameterssetPropertiessetPropertiessetReadOnlysetResultTransformersetSerializablesetSerializablesetShortsetShortsetStringsetStringsetTextsetTextsetTimesetTimesetTimeoutsetTimestampsetTimestamptoStringtypeArrayuniqueElementuniqueResultvalueArrayverifyParametersverifyParameters

Field Detail

lockOptionsback to summary
private LockOptions lockOptions

Constructor Detail

QueryImplback to summary
public QueryImpl(String queryString, FlushMode flushMode, SessionImplementor session, ParameterMetadata parameterMetadata)
QueryImplback to summary
public QueryImpl(String queryString, SessionImplementor session, ParameterMetadata parameterMetadata)

Method Detail

executeUpdateback to summary
public int executeUpdate() throws HibernateException

Implements org.hibernate.Query.executeUpdate.

Doc from org.hibernate.Query.executeUpdate.

Execute the update or delete statement.

The semantics are compliant with the ejb3 Query.executeUpdate() method.
Returns:int

The number of entities updated or deleted.

getLockOptionsback to summary
public LockOptions getLockOptions()

Implements abstract org.hibernate.impl.AbstractQueryImpl.getLockOptions.

iterateback to summary
public Iterator<E> iterate() throws HibernateException

Implements org.hibernate.Query.iterate.

Doc from org.hibernate.Query.iterate.

Return the query results as an Iterator. If the query contains multiple results pre row, the results are returned in an instance of Object[].

Entities returned as results are initialized on demand. The first SQL query returns identifiers only.

Returns:Iterator<E>

the result iterator

listback to summary
public List<E> list() throws HibernateException

Implements org.hibernate.Query.list.

Doc from org.hibernate.Query.list.

Return the query results as a List. If the query contains multiple results pre row, the results are returned in an instance of Object[].

Returns:List<E>

the result list

scrollback to summary
public ScrollableResults scroll() throws HibernateException

Implements org.hibernate.Query.scroll.

Doc from org.hibernate.Query.scroll.

Return the query results as ScrollableResults. The scrollability of the returned results depends upon JDBC driver support for scrollable ResultSets.

Returns:ScrollableResults

the result iterator

scrollback to summary
public ScrollableResults scroll(ScrollMode scrollMode) throws HibernateException

Implements org.hibernate.Query.scroll.

Doc from org.hibernate.Query.scroll.

Return the query results as ScrollableResults. The scrollability of the returned results depends upon JDBC driver support for scrollable ResultSets.

Returns:ScrollableResults

the result iterator

setLockModeback to summary
public Query setLockMode(String alias, LockMode lockMode)

Implements org.hibernate.Query.setLockMode.

Doc from org.hibernate.Query.setLockMode.

Set the lockmode for the objects idententified by the given alias that appears in the FROM clause.

Parameters
alias:String

a query alias, or this for a collection filter

setLockOptionsback to summary
public Query setLockOptions(LockOptions lockOption)

Implements org.hibernate.Query.setLockOptions.

Doc from org.hibernate.Query.setLockOptions.

Set the lock options for the objects idententified by the given alias that appears in the FROM clause.