|
SPT RWT Application API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.rwt.AbstractQueryExecutor
public abstract class AbstractQueryExecutor
A utility class to execute SQL statement (only one statement allowed).
© Copyright 2007 Sans Pareil Technologies, Inc.
BatchQueryExecutor| Field Summary | |
|---|---|
protected ConnectionManager |
manager
The manager to use to fetch database connections. |
| Constructor Summary | |
|---|---|
protected |
AbstractQueryExecutor(ConnectionManager manager)
Create a new instance using the specified manager to fetch connections. |
| Method Summary | |
|---|---|
protected Statement |
createStatement(Connection connection)
Create a Statement for the specified
SQL statement(s) and return it. |
protected String |
getClobValue(Clob clob,
int length)
Return the value that is to be displayed for a Clob
type. |
protected Rows |
processResultSet(Statement statement,
int page,
int rowsPerPage,
int maxColumnLength)
Create a Rows object that represent the rows in the result
set within the specified row range. |
protected String |
processText(String text,
int length)
Return the value that is to be displayed for a text value. |
protected Rows |
processUpdateCount(Statement statement)
Return a Rows object that represents the
updateCount obtained by executing a Statement. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ConnectionManager manager
| Constructor Detail |
|---|
protected AbstractQueryExecutor(ConnectionManager manager)
manager - The connection manager to use.| Method Detail |
|---|
protected Statement createStatement(Connection connection)
throws SQLException
Statement for the specified
SQL statement(s) and return it.
connection - The database connection to use.
SQLException - If errors are encountered while creating the
statement.
protected Rows processResultSet(Statement statement,
int page,
int rowsPerPage,
int maxColumnLength)
throws SQLException
Rows object that represent the rows in the result
set within the specified row range.
statement - The statement whose result set to process.page - The page number being retrieved. Page number is specified
using zero based indexing as opposed to 1 based.rowsPerPage - The number of rows to display per page.maxColumnLength - The maximum number of characters to retrieve
from CLOB type columns to avoid memory issues.
SQLException - If errors are encountered while executing the
statement(s) and fetching the results.getClobValue(java.sql.Clob, int)
protected Rows processUpdateCount(Statement statement)
throws SQLException
Rows object that represents the
updateCount obtained by executing a Statement.
statement - The statement from which update count is to be
retrieved.
SQLException - If errors are encountered while fetching the
update count from statement.
protected String getClobValue(Clob clob,
int length)
throws SQLException
Clob
type.
clob - The CLOB whose content is to be retrieved.length - The maximum number of characters to display.
SQLException - If errors are encountered while fetching the
content of the CLOB.
protected String processText(String text,
int length)
text - The text content that is to be processed.length - The maximum number of characters to display
|
SPT RWT Application API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||