Interface QueryResults

  • All Superinterfaces:
    java.util.Enumeration<java.lang.Object>
    All Known Implementing Classes:
    OQLQueryImpl.OQLEnumeration, SimpleQueryExecutor.SimpleQueryResults

    public interface QueryResults
    extends java.util.Enumeration<java.lang.Object>
    An iteration of the results of a query. This interface provides the ability to move forward only in the result set and pick the next result and close it.
    Version:
    $Revision: 8141 $ $Date: 2004-05-03 16:05:30 -0600 (Mon, 03 May 2004) $
    Author:
    Assaf Arkin
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean absolute​(int row)
      moves the result of the query to the absolute position in the resultset.
      void close()
      Closes the result set and releases all resources held by it.
      boolean hasMore()
      Returns true if there are any more results in the result set.
      java.lang.Object next()
      Returns the next result in the result set.
      int size()
      Finds the size of the resulting resultset from the query.
      • Methods inherited from interface java.util.Enumeration

        asIterator, hasMoreElements, nextElement
    • Method Detail

      • hasMore

        boolean hasMore()
                 throws PersistenceException
        Returns true if there are any more results in the result set. If an error occured reading the last result, an exception will be thrown and the result set cannot be used further.
        Returns:
        True if there are any more results in the result set
        Throws:
        PersistenceException - An error with the persistence engine
      • next

        java.lang.Object next()
                       throws PersistenceException,
                              java.util.NoSuchElementException
        Returns the next result in the result set. If there are no more results (a previous cal to hasMore() returns false) this method will throw an exceptin. If an error occured reading the last result, an exception will be thrown and the result set cannot be used further.
        Returns:
        The next result in the result set
        Throws:
        PersistenceException - An error with the persistence engine
        java.util.NoSuchElementException - There are no more results in the result set
      • close

        void close()
        Closes the result set and releases all resources held by it.
      • absolute

        boolean absolute​(int row)
                  throws PersistenceException
        moves the result of the query to the absolute position in the resultset.
        Parameters:
        row - The row to move to
        Returns:
        ???
        Throws:
        PersistenceException - A persistence error occured
      • size

        int size()
          throws PersistenceException
        Finds the size of the resulting resultset from the query.
        Returns:
        Size of the resulting result set.
        Throws:
        PersistenceException - A persistence error occured