Class QueryImpl

All Implemented Interfaces:
Query
Direct Known Subclasses:
CollectionFilterImpl

public class QueryImpl extends AbstractQueryImpl
default implementation of the Query interface, for "ordinary" HQL queries (not collection filters)
See Also:
  • Constructor Details

  • Method Details

    • iterate

      public Iterator iterate() throws 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 ScrollableResults scroll() throws 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:
    • scroll

      public ScrollableResults scroll(ScrollMode scrollMode) throws 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:
    • list

      public List list() throws 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 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(String alias, 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
    • setLockOptions

      public Query setLockOptions(LockOptions lockOption)
      Description copied from interface: Query
      Set the lock options for the objects idententified by the given alias that appears in the FROM clause.
    • getLockOptions

      public LockOptions getLockOptions()
      Specified by:
      getLockOptions in class AbstractQueryImpl