Package org.hibernate.impl
Class QueryImpl
java.lang.Object
org.hibernate.impl.AbstractQueryImpl
org.hibernate.impl.QueryImpl
- All Implemented Interfaces:
Query
- Direct Known Subclasses:
CollectionFilterImpl
default implementation of the Query interface,
for "ordinary" HQL queries (not collection filters)
- See Also:
-
Field Summary
Fields inherited from class org.hibernate.impl.AbstractQueryImpl
parameterMetadata, session -
Constructor Summary
ConstructorsConstructorDescriptionQueryImpl(String queryString, SessionImplementor session, ParameterMetadata parameterMetadata) QueryImpl(String queryString, FlushMode flushMode, SessionImplementor session, ParameterMetadata parameterMetadata) -
Method Summary
Modifier and TypeMethodDescriptionintExecute the update or delete statement.iterate()Return the query results as an Iterator.list()Return the query results as a List.scroll()Return the query results as ScrollableResults.scroll(ScrollMode scrollMode) Return the query results as ScrollableResults.setLockMode(String alias, LockMode lockMode) Set the lockmode for the objects idententified by the given alias that appears in the FROM clause.setLockOptions(LockOptions lockOption) Set the lock options for the objects idententified by the given alias that appears in the FROM clause.Methods inherited from class org.hibernate.impl.AbstractQueryImpl
after, before, determineType, determineType, determineType, determineType, determineType, expandParameterLists, getCacheMode, getNamedParameterLists, getNamedParameters, getNamedParams, getParameterMetadata, getQueryParameters, getQueryString, getReturnAliases, getReturnTypes, getRowSelection, getSelection, getTypes, getValues, hasNamedParameters, isReadOnly, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBinary, setBinary, setBoolean, setBoolean, setByte, setByte, setCacheable, setCacheMode, setCacheRegion, setCalendar, setCalendar, setCalendarDate, setCalendarDate, setCharacter, setCharacter, setCollectionKey, setComment, setDate, setDate, setDouble, setDouble, setEntity, setEntity, setFetchSize, setFirstResult, setFloat, setFloat, setFlushMode, setInteger, setInteger, setLocale, setLocale, setLong, setLong, setMaxResults, setOptionalEntityName, setOptionalId, setOptionalObject, setParameter, setParameter, setParameter, setParameter, setParameterList, setParameterList, setParameterList, setParameterList, setParameters, setProperties, setProperties, setReadOnly, setResultTransformer, setSerializable, setSerializable, setShort, setShort, setString, setString, setText, setText, setTime, setTime, setTimeout, setTimestamp, setTimestamp, toString, typeArray, uniqueResult, valueArray, verifyParameters, verifyParameters
-
Constructor Details
-
QueryImpl
public QueryImpl(String queryString, FlushMode flushMode, SessionImplementor session, ParameterMetadata parameterMetadata) -
QueryImpl
public QueryImpl(String queryString, SessionImplementor session, ParameterMetadata parameterMetadata)
-
-
Method Details
-
iterate
Description copied from interface:QueryReturn 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:
- the result iterator
- Throws:
HibernateException
-
scroll
Description copied from interface:QueryReturn the query results as ScrollableResults. The scrollability of the returned results depends upon JDBC driver support for scrollable ResultSets.- Returns:
- the result iterator
- Throws:
HibernateException- See Also:
-
scroll
Description copied from interface:QueryReturn the query results as ScrollableResults. The scrollability of the returned results depends upon JDBC driver support for scrollable ResultSets.- Returns:
- the result iterator
- Throws:
HibernateException- See Also:
-
list
Description copied from interface:QueryReturn the query results as a List. If the query contains multiple results pre row, the results are returned in an instance of Object[].- Returns:
- the result list
- Throws:
HibernateException
-
executeUpdate
Description copied from interface:QueryExecute the update or delete statement. The semantics are compliant with the ejb3 Query.executeUpdate() method.- Returns:
- The number of entities updated or deleted.
- Throws:
HibernateException
-
setLockMode
Description copied from interface:QuerySet the lockmode for the objects idententified by the given alias that appears in the FROM clause.- Parameters:
alias- a query alias, or this for a collection filter
-
setLockOptions
Description copied from interface:QuerySet the lock options for the objects idententified by the given alias that appears in the FROM clause. -
getLockOptions
- Specified by:
getLockOptionsin classAbstractQueryImpl
-