ccc.migration
Class DbUtilsDB

java.lang.Object
  extended by ccc.migration.DbUtilsDB
All Implemented Interfaces:
DB

public class DbUtilsDB
extends java.lang.Object
implements DB

Implementation of DB interface, based on Apache's DbUtils library.

Author:
Civic Computing Ltd.

Constructor Summary
DbUtilsDB(javax.sql.DataSource ds)
          Constructor.
 
Method Summary
<T> T
select(SqlQuery<T> q, java.lang.Object... param)
          Execute a SQL query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbUtilsDB

public DbUtilsDB(javax.sql.DataSource ds)
Constructor.

Parameters:
ds - JDBC datasource for the database.
Method Detail

select

public <T> T select(SqlQuery<T> q,
                    java.lang.Object... param)
Execute a SQL query.

Specified by:
select in interface DB
Type Parameters:
T - The type of result the select method will return.
Parameters:
q - The SQL query.
param - The queries parameters.
Returns:
An instance of type T.


Copyright © 2010. All Rights Reserved.