com.hp.ucmdb.discovery.library.clients.query
Class DbResultSet
java.lang.Object
com.hp.ucmdb.discovery.library.clients.query.ResultSet
com.hp.ucmdb.discovery.library.clients.query.DbResultSet
public class DbResultSet
- extends ResultSet
DbResultSet
represents a standard database ResultSet.
Most get methods and data interation and data navigation methods are implemented in this class.
The application must create a DbResultSet
when querying an SqlClient. See the example in SqlClient
.
- See Also:
ResultSet
,
SqlClient
Method Summary |
java.lang.String |
asString()
|
java.lang.String[][] |
asTable()
Returns the entire RecordSet |
void |
close()
Closes the ResultSet. |
boolean |
first()
Sets the first row in the ResultSet to be the active record. |
void |
setClient(SqlClient client)
|
Methods inherited from class com.hp.ucmdb.discovery.library.clients.query.ResultSet |
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, toString, wait, wait, wait |
DbResultSet
public DbResultSet(SqlClient client)
DbResultSet
public DbResultSet(java.sql.ResultSet rs,
java.sql.Statement st)
DbResultSet
public DbResultSet(SqlClient client,
java.sql.ResultSet rs,
java.sql.Statement st)
close
public void close()
throws java.sql.SQLException
- Description copied from class:
ResultSet
- Closes the ResultSet.
Caution: You must call
close
when finished working with a record set that was returned from a database.
- Specified by:
close
in class ResultSet
- Throws:
java.sql.SQLException
setClient
public void setClient(SqlClient client)
asTable
public java.lang.String[][] asTable()
throws java.lang.Exception
- Description copied from class:
ResultSet
- Returns the entire RecordSet
- Specified by:
asTable
in class ResultSet
- Returns:
- The query result as an array representing the rows where each row element contains an array of column values.
- Throws:
java.lang.Exception
first
public boolean first()
throws java.lang.Exception
- Description copied from class:
ResultSet
- Sets the first row in the ResultSet to be the active record.
- Overrides:
first
in class ResultSet
- Returns:
- true on success
- Throws:
java.lang.Exception
asString
public java.lang.String asString()
throws java.lang.Exception
- Throws:
java.lang.Exception
Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.