|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objecttoolbox.dao.JDBCAccess
public class JDBCAccess
Provides low level JDBC functionality.
| Constructor Summary | |
|---|---|
JDBCAccess()
Default constructor |
|
| Method Summary | |
|---|---|
int |
delete(java.lang.String delete,
java.lang.Object[] params,
java.sql.Connection conn)
Delete entries. |
java.util.List |
executeCallForList(java.lang.String callStr,
java.lang.Object[] params,
java.sql.Connection conn,
ListBuilder listBuilder)
Prepare and execute the given procedure call and return a List of result data. |
java.lang.Object[] |
executeCallForOutput(java.lang.String callStr,
java.lang.Object[] params,
java.lang.Object[] outParams,
int paramOffSet,
java.sql.Connection conn)
Prepare and execute the given procedure and return the registered output variables. |
java.lang.Object |
executeCallForStatus(java.lang.String callStr,
java.lang.Object[] params,
java.sql.Connection conn)
Prepare and execute the given procedure and return the return status value. |
int |
insert(java.lang.String insert,
java.lang.Object[] params,
int[] types,
java.sql.Connection conn)
Insert all the entries in the given list using the provided statement. |
java.lang.Object |
insertAndReturnKey(java.lang.String insert,
java.lang.Object[] params,
int[] types,
java.sql.Connection conn)
Insert all the entries in the given list using the given statement and return an auto-generated key. |
java.util.List |
select(java.lang.String select,
java.lang.Object[] params,
java.sql.Connection conn,
int maxRows,
ListBuilder listBuilder,
java.lang.Class returnType)
Executes the select statement returns a list of map instances. |
java.util.List |
select(java.lang.String select,
java.lang.Object[] params,
java.sql.Connection conn,
ListBuilder listBuilder,
java.lang.Class returnType)
Executes the select statement returns a list of map instances or the designated return type. |
int |
update(java.lang.String update,
java.lang.Object[] params,
int[] types,
java.sql.Connection conn)
Update all the entries in the given list using the given statement. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JDBCAccess()
| Method Detail |
|---|
public java.util.List select(java.lang.String select,
java.lang.Object[] params,
java.sql.Connection conn,
int maxRows,
ListBuilder listBuilder,
java.lang.Class returnType)
throws DaoException
select - The SQL select statement.params - Object array of parameters used by the select statementconn - Database connection.maxRows - Maximum number of rows that result may contain. A value
of 0 indicates no limit.listBuilder - ListBuilder to use when constructing the results.returnType - Class denoting return type.
DaoException - if the select from the databasae failed.
public java.util.List select(java.lang.String select,
java.lang.Object[] params,
java.sql.Connection conn,
ListBuilder listBuilder,
java.lang.Class returnType)
throws DaoException
select - The SQL select statement.params - Object array of parameters used by the select statementconn - Database connection.listBuilder - ListBuilder to use when constructing the results.returnType - Class denoting return type.
DaoException - if the select from the databasae failed.
public int insert(java.lang.String insert,
java.lang.Object[] params,
int[] types,
java.sql.Connection conn)
throws DaoException
insert - The SQL insert statement.params - Object array containing values to insert.types - int array containing SQL type information.conn - Database connection.
DaoException - if the insert to database failed.
public java.lang.Object insertAndReturnKey(java.lang.String insert,
java.lang.Object[] params,
int[] types,
java.sql.Connection conn)
throws DaoException
insert - SQL insert statement.params - Object array containing values to insert.types - int array containing SQL type information.conn - Database connection.
DaoException - if the insert to database failed.
public int update(java.lang.String update,
java.lang.Object[] params,
int[] types,
java.sql.Connection conn)
throws DaoException
update - SQL update statement.params - Object array containing parameters.types - int array containing SQL type information.conn - Database connection.
DaoException - if the insert to database failed.
public int delete(java.lang.String delete,
java.lang.Object[] params,
java.sql.Connection conn)
throws DaoException
delete - SQL delete statement.params - Object array containing the parameters for the delete
statement.conn - Database connection.
DaoException - if the delete from the database failed.
public java.lang.Object executeCallForStatus(java.lang.String callStr,
java.lang.Object[] params,
java.sql.Connection conn)
throws DaoException
callStr - String containing callable statement.params - Object array containing parameters.conn - Database connection.
DaoException
public java.lang.Object[] executeCallForOutput(java.lang.String callStr,
java.lang.Object[] params,
java.lang.Object[] outParams,
int paramOffSet,
java.sql.Connection conn)
throws DaoException
callStr - String containing callable statement.params - Object array containing parameters.outParams - Object array containing parameters.paramOffSet - The offset where the output parameters start.conn - Database connection.
DaoException
public java.util.List executeCallForList(java.lang.String callStr,
java.lang.Object[] params,
java.sql.Connection conn,
ListBuilder listBuilder)
throws DaoException
callStr - String containing callable statement.params - Object array containing parameters.conn - Database connection.listBuilder - ListBuilder to use when constructing the results.
DaoException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||