Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.mdm.index.query
Class QMIterator

    java.lang.Object
      com.sun.mdm.index.query.QMIterator

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

public class QMIterator
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

The QMIterator class is called by the Query Manager to iterate through a composite object list.

See Also:
  Serialized Form

Constructor Summary
`QMIterator()` Creates a new instance of the QMIterator class.

Method Summary
`java.lang.Object` | `clone()` Clones the given instance of the QMIterator class.
`void` | `close()` Closes the connection to the database.
`(package private) AssemblerEngine` | `getAssemblerEngine()`
`java.lang.String` | `getRootObjectName()` Retrieves the name of the root object from an instance of QMIterator.
`boolean` | `hasNext()` Returns a Boolean indicator of whether the iterator contains a next object to retrieve.
`(package private) void` | `initCompile(SQLDescriptor[] sqlDesc, AssembleDescriptor assDesc)`
`(package private) void` | `initRun(java.sql.Connection con, java.sql.ResultSet[] resultSets, java.sql.Statement[] statements, int maxRows)`
`(package private) void` | `initRun(java.sql.Connection con, java.sql.ResultSet[] resultSets, java.sql.Statement[] statements, int maxRows, boolean closeDbConnection)` This method initializes the data structures that are used during run time and can be writeable.
`java.lang.Object` | `next()` Retrieves the next object constructed by the assembler engine.
`(package private) void` | `setAssemblerEngine(AssemblerEngine assEngine)`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### QMIterator

    public QMIterator()

  Creates a new instance of the QMIterator class.

  Parameters:
    None.
  Throws:
    None.

Method Detail

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Clones the given instance of the QMIterator class. This method is internal to the Query Manager framework.

  Parameters:
    None.

  Returns:
    `Object` - A copy of the given QMIterator object.
  Throws:
    `java.lang.CloneNotSupportedException` - Thrown to indicate that the object could not be cloned.

### close

    public void close()
               throws QMException

  Closes the connection to the database.

  Parameters:
    None.
  Returns:
    `void` - None.

  Throws:
    `QMException` - Thrown if an error occurs while closing the connection.

### getAssemblerEngine

    AssemblerEngine getAssemblerEngine()

### getRootObjectName

    public java.lang.String getRootObjectName()

  Retrieves the name of the root object from an instance of QMIterator.

  Parameters:
    None.

  Returns:
    `String` - The root object name.
  Throws:
    None.

### hasNext

    public boolean hasNext()
                    throws QMException

  Returns a Boolean indicator of whether the iterator contains a next object to retrieve.

  Parameters:
    None.

  Returns:
    `Boolean` - An indicator of whether there is another object to retrieve. True indicates there is an object to retrieve; false indicates there is not.
  Throws:
    `QMException` - Thrown if an error occurs while checking for the next object in the iterator. include

### initCompile

    void initCompile(SQLDescriptor[] sqlDesc,
                     AssembleDescriptor assDesc)
               throws QMException

  Throws:
    `QMException`

### initRun

    void initRun(java.sql.Connection con,
                 java.sql.ResultSet[] resultSets,
                 java.sql.Statement[] statements,
                 int maxRows)
           throws QMException

  Throws:
    `QMException`

### initRun

    void initRun(java.sql.Connection con,
                 java.sql.ResultSet[] resultSets,
                 java.sql.Statement[] statements,
                 int maxRows,
                 boolean closeDbConnection)
           throws QMException

  This method initializes the data structures that are used during run time and can be writeable.

  Parameters:
    `con` - Connection
    `resultSets` - ResultSet[]
    `statements` - Statement[]
    `maxRows` - maximum number of rows
    `closeDbConnection` - set to true if the database connection is to be closed by the AssemblerEngine, false if some other calling class is to close the database connection instead.
  Throws:
    `QMException` - QMException

### next

    public java.lang.Object next()
                          throws QMException

  Retrieves the next object constructed by the assembler engine.

  Parameters:
    None.

  Returns:
    `Object` - The next object in the iterator.
  Throws:
    `QMException` - Thrown if an error occurs while trying to retrieve the next object.

### setAssemblerEngine

    void setAssemblerEngine(AssemblerEngine assEngine)

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Sun Microsystems, Inc.