|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.location.db.RecordSet
public class RecordSet
The RecordSet object handles all the generic database retrieval for a SQL query. The idea is that you set it up with a connection, and set the query string that it will use to give to the database. Then, you iterate through the result set to create the objects you want to:
Field Summary | |
---|---|
protected java.sql.Connection |
connection
Connection object that will be used to retrieve data. |
protected static java.util.logging.Logger |
logger
|
protected java.lang.String |
queryString
The query string that will be executed on the database. |
Constructor Summary | |
---|---|
RecordSet(java.sql.Connection inConnection)
Use this constructor if you want a little more control of the process. |
|
RecordSet(java.sql.Connection inConnection,
java.lang.String query)
Does everything. |
Method Summary | |
---|---|
void |
close()
|
void |
getAllQuery()
Executes "select * from 'tableName'", or whatever the queryString is set to. |
java.sql.Connection |
getConnection()
|
java.lang.String |
getQueryString()
|
java.sql.ResultSet |
getResultSet()
Get the result set, after calling next. |
boolean |
next()
This function should be called to prepare the result set with the next record set of data. |
void |
setConnection(java.sql.Connection inConnection)
|
void |
setQueryString(java.lang.String inQueryString)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.logging.Logger logger
protected java.sql.Connection connection
protected java.lang.String queryString
Constructor Detail |
---|
public RecordSet(java.sql.Connection inConnection) throws java.sql.SQLException
java.sql.SQLException
public RecordSet(java.sql.Connection inConnection, java.lang.String query) throws java.sql.SQLException
java.sql.SQLException
Method Detail |
---|
public void getAllQuery() throws java.sql.SQLException
throws
- SQLException if something goes wrong with the query.
java.sql.SQLException
public boolean next() throws java.sql.SQLException
java.sql.SQLException
public java.sql.ResultSet getResultSet()
public void close() throws java.sql.SQLException
java.sql.SQLException
public java.sql.Connection getConnection()
public void setConnection(java.sql.Connection inConnection)
public java.lang.String getQueryString()
public void setQueryString(java.lang.String inQueryString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |