org.hibernate.impl
Class QueryImpl

java.lang.Object
  extended by org.hibernate.impl.AbstractQueryImpl
      extended by org.hibernate.impl.QueryImpl
All Implemented Interfaces:
Query

public class QueryImpl
extends org.hibernate.impl.AbstractQueryImpl

default implementation of the Query interface, for "ordinary" HQL queries (not collection filters)

Author:
gperrone
See Also:
CollectionFilterImpl

Field Summary
 
Fields inherited from class org.hibernate.impl.AbstractQueryImpl
parameterMetadata, session
 
Constructor Summary
QueryImpl(java.lang.String queryString, org.hibernate.FlushMode flushMode, org.hibernate.engine.SessionImplementor session, org.hibernate.engine.query.ParameterMetadata parameterMetadata)
           
QueryImpl(java.lang.String queryString, org.hibernate.engine.SessionImplementor session, org.hibernate.engine.query.ParameterMetadata parameterMetadata)
           
 
Method Summary
 int count()
          TODO documentation
 int executeUpdate()
          Execute the update or delete statement.
protected  java.util.Map getLockModes()
           
 java.util.Iterator iterate()
          Return the query results as an Iterator.
 java.util.List list()
          Return the query results as a List.
 org.hibernate.ScrollableResults scroll()
          Return the query results as ScrollableResults.
 org.hibernate.ScrollableResults scroll(org.hibernate.ScrollMode scrollMode)
          Return the query results as ScrollableResults.
 Query setLockMode(java.lang.String alias, org.hibernate.LockMode lockMode)
          Set the lockmode 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, getNamedParameterLists, getNamedParameters, getNamedParams, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryImpl

public QueryImpl(java.lang.String queryString,
                 org.hibernate.FlushMode flushMode,
                 org.hibernate.engine.SessionImplementor session,
                 org.hibernate.engine.query.ParameterMetadata parameterMetadata)

QueryImpl

public QueryImpl(java.lang.String queryString,
                 org.hibernate.engine.SessionImplementor session,
                 org.hibernate.engine.query.ParameterMetadata parameterMetadata)
Method Detail

iterate

public java.util.Iterator iterate()
                           throws org.hibernate.HibernateException
Description copied from interface: Query
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:
the result iterator
Throws:
HibernateException

scroll

public org.hibernate.ScrollableResults scroll()
                                       throws org.hibernate.HibernateException
Description copied from interface: Query
Return 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:
ScrollableResults

scroll

public org.hibernate.ScrollableResults scroll(org.hibernate.ScrollMode scrollMode)
                                       throws org.hibernate.HibernateException
Description copied from interface: Query
Return 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:
ScrollableResults, ScrollMode

list

public java.util.List list()
                    throws org.hibernate.HibernateException
Description copied from interface: Query
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:
the result list
Throws:
HibernateException

executeUpdate

public int executeUpdate()
                  throws org.hibernate.HibernateException
Description copied from interface: Query
Execute 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

public Query setLockMode(java.lang.String alias,
                         org.hibernate.LockMode lockMode)
Description copied from interface: Query
Set 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

getLockModes

protected java.util.Map getLockModes()
Specified by:
getLockModes in class org.hibernate.impl.AbstractQueryImpl

count

public int count()
TODO documentation

Returns:


Copyright © 2004-2009 The SmartWeb Team. All Rights Reserved.