|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.util.SQLQueryResult
public class SQLQueryResult
This class performs a SQL (SELECT) query and provides access to the result set.
Nested Class Summary | |
---|---|
class |
SQLQueryResult.Row
This class represents a row. |
Field Summary | |
---|---|
protected String[] |
columnNames
|
protected int |
errorCode
|
protected String |
errorMessage
|
protected boolean |
isError
|
static String |
REVISION
|
protected List |
rowList
|
protected String |
sqlQuery
|
protected String |
sqlState
|
Constructor Summary | |
---|---|
SQLQueryResult(Connection conn,
String sqlQuery,
Object[] params,
int maxRows)
Constructs a new SQLQueryResult. |
|
SQLQueryResult(ResultSet rs)
Constructs a new SQLQueryResult. |
|
SQLQueryResult(String dataSource,
String sqlQuery,
int maxRows)
Constructs a new SQLQueryResult. |
|
SQLQueryResult(String dataSource,
String sqlQuery,
Object[] params,
int maxRows)
Constructs a new SQLQueryResult. |
|
SQLQueryResult(String dataSource,
String select,
String from,
String orderby,
String[] whereParams,
String[] whereValues,
boolean and,
int maxRows)
Constructs a new SQLQueryResult. |
Method Summary | |
---|---|
int |
getColumnCount()
Returns the column count |
String[] |
getColumnNames()
Returns the column names |
int |
getErrorCode()
Returns the error code |
String |
getErrorMessage()
Returns the error message |
int |
getRowCount()
Returns the count of rows. |
List |
getRowList()
Returns the list of rows. |
String |
getSQLQuery()
Returns the error sqlQuery |
String |
getSQLState()
Returns the SQL state |
boolean |
isEmpty()
Returns true if no result |
boolean |
isError()
Returns true if an error occured during the query process |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
protected String[] columnNames
protected List rowList
protected boolean isError
protected String errorMessage
protected int errorCode
protected String sqlState
protected String sqlQuery
Constructor Detail |
---|
public SQLQueryResult(String dataSource, String select, String from, String orderby, String[] whereParams, String[] whereValues, boolean and, int maxRows)
dataSource
- the name of the data source (eg. "jdbc/TestDB")select
- the table filed to select or *from
- the table name to work with.orderby
- the order by parameterwhereParams
- an array of parameterswhereValues
- an array of parameters valueand
- should be 'AND' or 'OR' between parametersmaxRows
- the max rows limit; zero means there is no limitpublic SQLQueryResult(String dataSource, String sqlQuery, int maxRows)
dataSource
- the name of the data source (eg. "jdbc/TestDB")sqlQuery
- the SQL (SELECT) querymaxRows
- the max rows limit; zero means there is no limitpublic SQLQueryResult(String dataSource, String sqlQuery, Object[] params, int maxRows)
dataSource
- the name of the data source (eg. "jdbc/TestDB")sqlQuery
- the SQL query (may be a parametrized SQL query)params
- the query parametersmaxRows
- the max rows limit; zero means there is no limitpublic SQLQueryResult(Connection conn, String sqlQuery, Object[] params, int maxRows)
conn
- the JDBC connectionsqlQuery
- the SQL query (may be a parametrized SQL query)params
- the query parametersmaxRows
- the max rows limit; zero means there is no limitpublic SQLQueryResult(ResultSet rs)
rs
- a JDBC ResultSetMethod Detail |
---|
public String[] getColumnNames()
public int getColumnCount()
public boolean isEmpty()
public List getRowList()
public int getRowCount()
public boolean isError()
public int getErrorCode()
SQLException.getErrorCode()
public String getSQLQuery()
public String getErrorMessage()
public String getSQLState()
SQLException.getSQLState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |