com.hp.ucmdb.discovery.library.clients.query
Class QueryResultSet

java.lang.Object
  extended by com.hp.ucmdb.discovery.library.clients.query.ResultSet
      extended by com.hp.ucmdb.discovery.library.clients.query.QueryResultSet

public class QueryResultSet
extends ResultSet

QueryResultSet represents the results of a query on a non-database client, like WmiClient, SNMPClient, and others. The data is accessed by column index. Methods that get data by column name are not implemented in QueryResultSet.

See Also:
ResultSet

Constructor Summary
QueryResultSet(DynamicParserTable table, QueryClient client)
           
 
Method Summary
 java.lang.String asString()
           
 java.lang.String[][] asTable()
          Returns the entire result set as a two-dimensional array.
 void close()
          Closes the result set.
 java.lang.String toString()
          Returns the entire result set as a string.
 java.lang.String toXml()
          Returns the entire result set as an XML string.
 
Methods inherited from class com.hp.ucmdb.discovery.library.clients.query.ResultSet
first, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getString, getString, getTimestamp, getTimestamp, next
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryResultSet

public QueryResultSet(DynamicParserTable table,
                      QueryClient client)
Method Detail

close

public void close()
           throws java.lang.Exception
Closes the result set.

Caution: When working with a database you must call close when finished processing the record set.

Specified by:
close in class ResultSet
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Returns the entire result set as a string. The column values are separated by commas. The rows are separated with newline characters.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this result

toXml

public java.lang.String toXml()
Returns the entire result set as an XML string.

Returns:
The XML representation of this result

asTable

public java.lang.String[][] asTable()
Returns the entire result set as a two-dimensional array. The outer array represents rows. The inner array represents columns.

Specified by:
asTable in class ResultSet
Returns:
The result set in table representation

asString

public java.lang.String asString()
                          throws java.lang.Exception
Throws:
java.lang.Exception


Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.