dbXML API

com.dbxml.db.client.local
Class ResultSetClientImpl

java.lang.Object
  extended bycom.dbxml.db.client.local.ResultSetClientImpl
All Implemented Interfaces:
ResultSetClient

public final class ResultSetClientImpl
extends java.lang.Object
implements ResultSetClient

ResultSetClientImpl


Constructor Summary
ResultSetClientImpl(CollectionClient col, ResultSet rs)
           
 
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.
 ResultSet getInternalResultSet()
           
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetClientImpl

public ResultSetClientImpl(CollectionClient col,
                           ResultSet rs)
Method Detail

getInternalResultSet

public ResultSet getInternalResultSet()

getCollection

public CollectionClient getCollection()
                               throws dbXMLException
Description copied from interface: ResultSetClient
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.

Specified by:
getCollection in interface ResultSetClient
Returns:
The Collection context
Throws:
dbXMLException

getQueryStyle

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

Specified by:
getQueryStyle in interface ResultSetClient
Returns:
The Query style
Throws:
dbXMLException

getQueryString

public java.lang.String getQueryString()
                                throws dbXMLException
Description copied from interface: ResultSetClient
getQueryString returns the String that was used to create the Query instance.

Specified by:
getQueryString in interface ResultSetClient
Returns:
The Query String
Throws:
dbXMLException

next

public boolean next()
             throws dbXMLException
Description copied from interface: ResultSetClient
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.

Specified by:
next in interface ResultSetClient
Returns:
true if there is another object, false otherwise
Throws:
dbXMLException

close

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

Specified by:
close in interface ResultSetClient
Throws:
dbXMLException

getCount

public int getCount()
             throws dbXMLException
Description copied from interface: ResultSetClient
getCount returns the number of records returned or modified by this query. If this count is not available, the query will return -1.

Specified by:
getCount in interface ResultSetClient
Returns:
The result/modified count
Throws:
dbXMLException

getResult

public org.w3c.dom.Node getResult()
                           throws dbXMLException
Description copied from interface: ResultSetClient
getResult returns the result as a DOM Node structure.

Specified by:
getResult in interface ResultSetClient
Returns:
The result Node
Throws:
dbXMLException

getResultAsText

public java.lang.String getResultAsText()
                                 throws dbXMLException
Description copied from interface: ResultSetClient
getResultAsText returns the result as a Text String.

Specified by:
getResultAsText in interface ResultSetClient
Returns:
The result String
Throws:
dbXMLException

getResultCollection

public CollectionClient getResultCollection()
                                     throws dbXMLException
Description copied from interface: ResultSetClient
getResultCollection returns the Collection context for the current result in the cursor.

Specified by:
getResultCollection in interface ResultSetClient
Returns:
The Collection context
Throws:
dbXMLException

getResultKey

public java.lang.String getResultKey()
                              throws dbXMLException
Description copied from interface: ResultSetClient
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.

Specified by:
getResultKey in interface ResultSetClient
Throws:
dbXMLException

dbXML API

Copyright (c) 2004 The dbXML Group