dbXML API

com.dbxml.db.client
Interface ResultSetClient

All Known Implementing Classes:
ResultSetClientImpl, TextResultSetClient

public interface ResultSetClient

ResultSetClient is the standard interface for iterating over the results of a query against a CollectionClient.


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.
 CollectionClient getCollection()
          getCollection returns the top-level Collection context.
 int getCount()
          getCount returns the number of records returned or modified by this query.
 java.lang.String getQueryString()
          getQueryString returns the String that was used to create the Query instance.
 java.lang.String getQueryStyle()
          getQueryStyle returns the QueryStyle (ex: XPath) for this Query instance.
 org.w3c.dom.Node getResult()
          getResult returns the result as a DOM Node structure.
 java.lang.String getResultAsText()
          getResultAsText returns the result as a Text String.
 CollectionClient getResultCollection()
          getResultCollection returns the Collection context for the current result in the cursor.
 java.lang.String getResultKey()
          getResultKey return the Key for the current result in the cursor.
 boolean next()
          next moves the cursor down one object from its current position.
 

Method Detail

getCollection

public CollectionClient getCollection()
                               throws dbXMLException
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:
dbXMLException

getQueryStyle

public java.lang.String getQueryStyle()
                               throws dbXMLException
getQueryStyle returns the QueryStyle (ex: XPath) for this Query instance.

Returns:
The Query style
Throws:
dbXMLException

getQueryString

public java.lang.String getQueryString()
                                throws dbXMLException
getQueryString returns the String that was used to create the Query instance.

Returns:
The Query String
Throws:
dbXMLException

next

public boolean next()
             throws dbXMLException
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:
dbXMLException

close

public void close()
           throws dbXMLException
close releases this ResultSet object's database resources immediately instead of waiting for this to happen when it is automatically closed.

Throws:
dbXMLException

getCount

public int getCount()
             throws dbXMLException
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:
dbXMLException

getResult

public org.w3c.dom.Node getResult()
                           throws dbXMLException
getResult returns the result as a DOM Node structure.

Returns:
The result Node
Throws:
dbXMLException

getResultAsText

public java.lang.String getResultAsText()
                                 throws dbXMLException
getResultAsText returns the result as a Text String.

Returns:
The result String
Throws:
dbXMLException

getResultCollection

public CollectionClient getResultCollection()
                                     throws dbXMLException
getResultCollection returns the Collection context for the current result in the cursor.

Returns:
The Collection context
Throws:
dbXMLException

getResultKey

public java.lang.String getResultKey()
                              throws dbXMLException
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:
dbXMLException

dbXML API

Copyright (c) 2004 The dbXML Group