Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enableit.db
Class DatabaseProxy  view DatabaseProxy download DatabaseProxy.java

java.lang.Object
  extended byorg.enableit.db.DatabaseProxy
Direct Known Subclasses:
GenericDBProxy

public class DatabaseProxy
extends java.lang.Object

Proxy class to wrap database access in a simple form. The user is required to provide their own Connection

Version:
v1.0

Field Summary
static java.lang.String about
          CVS info about this class and its current version
static int LIST
          Valid Object type for result set returns
protected static org.apache.log4j.Category logger
          The Log4J Category doing the logging.
static int SQL_RESULT_SET
          Valid Object type for result set returns.
 
Constructor Summary
DatabaseProxy()
           
 
Method Summary
static int executeDmlProcedure(java.sql.Connection conn, java.lang.String sp, java.util.List parms)
          Execute the supplied stored procedure against the supplied database connection.
static java.util.ArrayList executeQuery(java.sql.Connection conn, java.lang.String sql)
          Execute the supplied SQL query against the supplied database connection.
static java.lang.Object executeQuery(java.sql.Connection conn, java.lang.String sql, int returnType)
          Deprecated. 
use executeQuery(conn:Connection, sql:String):java.util.ArrayList instead
static java.util.List executeQuery(java.sql.Connection conn, java.lang.String sql, java.util.List parms)
          Execute the supplied SQL query against the supplied database connection.
static java.lang.Object executeQueryProcedure(java.sql.Connection conn, java.lang.String sp, java.util.List parms, int returnType)
          Execute the supplied stored procedure against the supplied database connection.
static int executeUpdate(java.sql.Connection conn, java.lang.String sql)
          Execute the supplied SQL update query against a the supplied database connection.
static int executeUpdate(java.sql.Connection conn, java.lang.String sql, java.util.List parms)
          Execute the supplied SQL update query against a the supplied database connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIST

public static final int LIST
Valid Object type for result set returns

See Also:
Constant Field Values

SQL_RESULT_SET

public static final int SQL_RESULT_SET
Valid Object type for result set returns. When returning references to a java.sql.ResultSet the developer must take care to ensure that the reference and the Connection that created it are correctly closed to avoid a memory leak.

See Also:
Constant Field Values

logger

protected static org.apache.log4j.Category logger
The Log4J Category doing the logging. Same Category is used throughout the library.


about

public static final java.lang.String about
CVS info about this class and its current version

See Also:
Constant Field Values
Constructor Detail

DatabaseProxy

public DatabaseProxy()
Method Detail

executeQuery

public static java.util.ArrayList executeQuery(java.sql.Connection conn,
                                               java.lang.String sql)
                                        throws DBException
Execute the supplied SQL query against the supplied database connection.


executeQuery

public static java.util.List executeQuery(java.sql.Connection conn,
                                          java.lang.String sql,
                                          java.util.List parms)
                                   throws DBException
Execute the supplied SQL query against the supplied database connection.


executeQuery

public static java.lang.Object executeQuery(java.sql.Connection conn,
                                            java.lang.String sql,
                                            int returnType)
                                     throws DBException
Deprecated. 
use executeQuery(conn:Connection, sql:String):java.util.ArrayList instead

Execute the supplied SQL query against the supplied database connection.


executeUpdate

public static int executeUpdate(java.sql.Connection conn,
                                java.lang.String sql)
                         throws DBException
Execute the supplied SQL update query against a the supplied database connection.


executeUpdate

public static int executeUpdate(java.sql.Connection conn,
                                java.lang.String sql,
                                java.util.List parms)
                         throws java.sql.SQLException,
                                DBException
Execute the supplied SQL update query against a the supplied database connection.


executeDmlProcedure

public static int executeDmlProcedure(java.sql.Connection conn,
                                      java.lang.String sp,
                                      java.util.List parms)
                               throws DBException
Execute the supplied stored procedure against the supplied database connection.


executeQueryProcedure

public static java.lang.Object executeQueryProcedure(java.sql.Connection conn,
                                                     java.lang.String sp,
                                                     java.util.List parms,
                                                     int returnType)
                                              throws DBException
Execute the supplied stored procedure against the supplied database connection.