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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.enableit.db.DataSourceProxy

public class DataSourceProxy
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.2

Field Summary
static java.lang.String about
          CVS info about this class and its current version
protected static org.apache.log4j.Category cat
          The Log4J Category doing the logging.
 
Constructor Summary
DataSourceProxy()
           
 
Method Summary
static int executeDmlProcedure(java.lang.String dataSourceName, java.lang.String sp, java.util.List parms)
          Execute the supplied update procedure against a connection obtained from the named DataSource.
static java.util.List executeQuery(java.lang.String dataSourceName, java.lang.String sql)
          Execute the supplied SQL query against a connection obtained from the named DataSource.
static java.util.List executeQueryProcedure(java.lang.String dataSourceName, java.lang.String sp, java.util.List parms)
          Execute the supplied query procedure against a connection obtained from the named DataSource.
static int executeUpdate(java.lang.String dataSourceName, java.lang.String sql)
          Execute the supplied SQL update against a the supplied database connection.
static int executeUpdate(java.lang.String dataSourceName, java.lang.String sql, java.util.List parms)
          Execute the supplied SQL update against a connection obtained from the named DataSource.
static java.sql.Connection getConnection(java.lang.String dataSourceName)
          Get a connection from the named DataSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cat

protected static org.apache.log4j.Category cat
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

DataSourceProxy

public DataSourceProxy()
Method Detail

getConnection

public static java.sql.Connection getConnection(java.lang.String dataSourceName)
                                         throws DBException
Get a connection from the named DataSource. This method is intended for use by this class itself, but may be useful to other objects, in that case care must be taken to close the Connection properly.


executeQuery

public static java.util.List executeQuery(java.lang.String dataSourceName,
                                          java.lang.String sql)
                                   throws DBException
Execute the supplied SQL query against a connection obtained from the named DataSource.


executeUpdate

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


executeUpdate

public static int executeUpdate(java.lang.String dataSourceName,
                                java.lang.String sql,
                                java.util.List parms)
                         throws DBException
Execute the supplied SQL update against a connection obtained from the named DataSource.


executeDmlProcedure

public static int executeDmlProcedure(java.lang.String dataSourceName,
                                      java.lang.String sp,
                                      java.util.List parms)
                               throws DBException
Execute the supplied update procedure against a connection obtained from the named DataSource.


executeQueryProcedure

public static java.util.List executeQueryProcedure(java.lang.String dataSourceName,
                                                   java.lang.String sp,
                                                   java.util.List parms)
                                            throws DBException
Execute the supplied query procedure against a connection obtained from the named DataSource.