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 QueryResults

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

All Implemented Interfaces:
  QueryConstants, java.io.Serializable

public class QueryResults
extends java.lang.Object
implements QueryConstants, java.io.Serializable

The QueryResults class is used for tuple creation and for late assembling of tuples. This is returned from QueryManager.execute() when QueryObject.setAssembleDescriptor is set to null. QueryResults wraps the java.sql.ResultSet class.

See Also:
  Serialized Form

Field Summary

Fields inherited from interface com.sun.mdm.index.query.QueryConstants
`MULTIPLE_QUERY, SINGLE_QUERY`

Constructor Summary
`(package private)` | `QueryResults(java.sql.Connection con, java.sql.ResultSet[] resultSets, java.sql.Statement[] statements, SQLDescriptor[] sqlDesc, int queryOption)` Creates a new instance of the QueryResults class.
`(package private)` | `QueryResults(java.sql.Connection con, java.sql.ResultSet[] resultSets, java.sql.Statement[] statements, SQLDescriptor[] sqlDesc, int queryOption, boolean closeDbConnection)` Creates a new instance of the QueryResults class.

Method Summary
`QMIterator` | `assemble()` Initiates the tuple assembly process.
`void` | `close()` Closes the instance of the QueryResults class.
`java.sql.ResultSet[]` | `getResultSets()` get the ResultSets
`void` | `setAssembleDescriptor(AssembleDescriptor assDesc)` Sets the assemble descriptor (AssembleDescriptor class) for the given query results object.

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

Constructor Detail

### QueryResults

    QueryResults(java.sql.Connection con,
                 java.sql.ResultSet[] resultSets,
                 java.sql.Statement[] statements,
                 SQLDescriptor[] sqlDesc,
                 int queryOption)

  Creates a new instance of the QueryResults class.

  Parameters:
    `con` - A connection to the database.
    `resultSets` - An array of query results.
    `statements` - An array of SQL statements.
    `sqlDesc` - An array of SQL descriptors.
    `queryOption` - An indicator of the query type. 1 indicates SINGLE_QUERY; 2 indicates MULTIPLE_QUERY. The default is SINGLE_QUERY.
  Throws:
    None.

### QueryResults

    QueryResults(java.sql.Connection con,
                 java.sql.ResultSet[] resultSets,
                 java.sql.Statement[] statements,
                 SQLDescriptor[] sqlDesc,
                 int queryOption,
                 boolean closeDbConnection)

  Creates a new instance of the QueryResults class.

  Parameters:
    `con` - A connection to the database.
    `resultSets` - An array of query results.
    `statements` - An array of SQL statements.
    `sqlDesc` - An array of SQL descriptors.
    `queryOption` - An indicator of the query type. 1 indicates SINGLE_QUERY; 2 indicates MULTIPLE_QUERY. The default is SINGLE_QUERY.
    `closeDbConnection` - Set to true if the database connection is to be closed by the Assmbler Engine, false otherwise.
  Throws:
    None.

Method Detail

### assemble

    public QMIterator assemble()
                        throws QMException

  Initiates the tuple assembly process. After performing an internal initialization, this method returns a QMIterator object, from which the tuples can then be retrieved.

  Parameters:
    None.

  Returns:
    `QMIterator` - An iterator of assembled tuples for the query results object.
  Throws:
    `QMException` - Thrown if an error occurs while assembling the tuple.

### close

    public void close()
               throws QMException

  Closes the instance of the QueryResults class.

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

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

### getResultSets

    public java.sql.ResultSet[] getResultSets()

  get the ResultSets

  Returns:
    ResultSet[]

### setAssembleDescriptor

    public void setAssembleDescriptor(AssembleDescriptor assDesc)

  Sets the assemble descriptor (AssembleDescriptor class) for the given query results object. The assemble descriptor contains information such as the query results composite object, iterator type, and the assembler to use.

  Parameters:
    `assDesc` - The assemble descriptor to use for this query object.
  Returns:
    `void` - None.
  Throws:
    None.

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.