dbXML API

## com.dbxml.db.core.query
Interface ResultSet

All Known Implementing Classes:
  ResultSetBase

public interface ResultSet

The ResultSet interface is a set interface that allows the developer to iterate over a set of DocumentTables. These DocumentTables are the result of a query, and can either be the entire original document, portions of an original document, or synthesized nodes produced by the query resolver.

Field Summary
`static int` `RESULT_ANYURI`
`static int` `RESULT_ATTRIBUTE`
`static int` `RESULT_BASE64BINARY`
`static int` `RESULT_BOOLEAN`
`static int` `RESULT_CDATA`
`static int` `RESULT_COMMENT`
`static int` `RESULT_DATE`
`static int` `RESULT_DATETIME`
`static int` `RESULT_DECIMAL`
`static int` `RESULT_DOCUMENT`
`static int` `RESULT_DOUBLE`
`static int` `RESULT_DURATION`
`static int` `RESULT_ELEMENT`
`static int` `RESULT_FLOAT`
`static int` `RESULT_GDAY`
`static int` `RESULT_GMONTH`
`static int` `RESULT_GMONTHDAY`
`static int` `RESULT_GYEAR`
`static int` `RESULT_GYEARMONTH`
`static int` `RESULT_HEXBINARY`
`static int` `RESULT_PROCINST`
`static int` `RESULT_QNAME`
`static int` `RESULT_STRING`
`static int` `RESULT_TEXT`
`static int` `RESULT_TIME`

Method Summary
`void` `close()` close releases this ResultSet object's database resources immediately instead of waiting for this to happen when it is automatically closed.
`Collection` `getCollection()` getCollection returns the top-level Collection context.
`int` `getCount()` getCount returns the number of records returned or modified by this query.
`Query` `getQuery()` getQuery returns the Query instance that produced this result set.
`DocumentTable` `getResult()` getResult returns the result as a DocumentTable structure.
`Collection` `getResultCollection()` getResultCollection returns the Collection context for the current result in the cursor.
`Key` `getResultKey()` getResultKey return the Key for the current result in the cursor.
`int` `getResultType()` getResultType returns the type of the object that the ResultSet cursor currently points to.
`boolean` `next()` next moves the cursor down one object from its current position.

Field Detail

### RESULT_DOCUMENT

    public static final int RESULT_DOCUMENT

See Also:
  Constant Field Values

### RESULT_ELEMENT

    public static final int RESULT_ELEMENT

See Also:
  Constant Field Values

### RESULT_ATTRIBUTE

    public static final int RESULT_ATTRIBUTE

See Also:
  Constant Field Values

### RESULT_PROCINST

    public static final int RESULT_PROCINST

See Also:
  Constant Field Values

### RESULT_COMMENT

    public static final int RESULT_COMMENT

See Also:
  Constant Field Values

### RESULT_TEXT

    public static final int RESULT_TEXT

See Also:
  Constant Field Values

### RESULT_CDATA

    public static final int RESULT_CDATA

See Also:
  Constant Field Values

### RESULT_STRING

    public static final int RESULT_STRING

See Also:
  Constant Field Values

### RESULT_BOOLEAN

    public static final int RESULT_BOOLEAN

See Also:
  Constant Field Values

### RESULT_DECIMAL

    public static final int RESULT_DECIMAL

See Also:
  Constant Field Values

### RESULT_FLOAT

    public static final int RESULT_FLOAT

See Also:
  Constant Field Values

### RESULT_DOUBLE

    public static final int RESULT_DOUBLE

See Also:
  Constant Field Values

### RESULT_DURATION

    public static final int RESULT_DURATION

See Also:
  Constant Field Values

### RESULT_DATETIME

    public static final int RESULT_DATETIME

See Also:
  Constant Field Values

### RESULT_TIME

    public static final int RESULT_TIME

See Also:
  Constant Field Values

### RESULT_DATE

    public static final int RESULT_DATE

See Also:
  Constant Field Values

### RESULT_GYEARMONTH

    public static final int RESULT_GYEARMONTH

See Also:
  Constant Field Values

### RESULT_GYEAR

    public static final int RESULT_GYEAR

See Also:
  Constant Field Values

### RESULT_GMONTHDAY

    public static final int RESULT_GMONTHDAY

See Also:
  Constant Field Values

### RESULT_GDAY

    public static final int RESULT_GDAY

See Also:
  Constant Field Values

### RESULT_GMONTH

    public static final int RESULT_GMONTH

See Also:
  Constant Field Values

### RESULT_HEXBINARY

    public static final int RESULT_HEXBINARY

See Also:
  Constant Field Values

### RESULT_BASE64BINARY

    public static final int RESULT_BASE64BINARY

See Also:
  Constant Field Values

### RESULT_ANYURI

    public static final int RESULT_ANYURI

See Also:
  Constant Field Values

### RESULT_QNAME

    public static final int RESULT_QNAME

See Also:
  Constant Field Values

Method Detail

### getCollection

    public Collection getCollection()
                             throws QueryException

  getCollection returns the top-level Collection context. Note that this may not be the collection that individual results belong to as the query may execute recursively over a Collection tree.

  Returns:
    The Collection context
  Throws:
    `QueryException`

### getQuery

    public Query getQuery()
                   throws QueryException

  getQuery returns the Query instance that produced this result set.

  Returns:
    The Query
  Throws:
    `QueryException`

### next

    public boolean next()
                 throws QueryException

  next moves the cursor down one object from its current position. A ResultSet cursor is initially positioned before the first object; the first call to the method next makes the first object the current object; the second call makes the second object the current object, and so on.

  Returns:
    true if there is another object, false otherwise
  Throws:
    `QueryException`

### close

    public void close()
               throws QueryException

  close releases this ResultSet object's database resources immediately instead of waiting for this to happen when it is automatically closed.

  Throws:
    `QueryException`

### getResultType

    public int getResultType()
                      throws QueryException

  getResultType returns the type of the object that the ResultSet cursor currently points to. Based on this value, an appropriate result accessor method can be chosen.

  Returns:
    the result type (ex: RESULT_DOCUMENT)
  Throws:
    `QueryException`

### getCount

    public int getCount()
                 throws QueryException

  getCount returns the number of records returned or modified by this query. If this count is not available, the query will return -1.

  Returns:
    The result/modified count
  Throws:
    `QueryException`

### getResult

    public DocumentTable getResult()
                            throws QueryException

  getResult returns the result as a DocumentTable structure.

  Returns:
    The result DocumentTable
  Throws:
    `QueryException`

### getResultCollection

    public Collection getResultCollection()
                                   throws QueryException

  getResultCollection returns the Collection context for the current result in the cursor.

  Returns:
    The Collection context
  Throws:
    `QueryException`

### getResultKey

    public Key getResultKey()
                     throws QueryException

  getResultKey return the Key for the current result in the cursor. Note that the key identifies the entire Document, while the result may only be a fragment, in which case, the key may be duplicated in the result set.

  Throws:
    `QueryException`

dbXML API

Copyright (c) 2004 The dbXML Group