org.ferris.yahoo.finance.jmce.handler
Class AbstractHandlerBySql

java.lang.Object
  extended by org.ferris.yahoo.finance.jmce.handler.AbstractHandlerBySql
Direct Known Subclasses:
DayEndPriceHandlerBySql, EmailAddressHandlerBySql, FuturesExpirationsHandlerBySql, YearEndPriceHandlerBySql

public class AbstractHandlerBySql
extends Object

Author:
Michael Remijan [mjremijan@yahoo.com]

Constructor Summary
AbstractHandlerBySql()
           
 
Method Summary
 void close(Connection conn, Statement stmt, ResultSet rs)
           
protected  ResultSet executeQuery(PreparedStatement stmt)
           
protected  int executeUpdate(PreparedStatement stmt)
           
 Connection getConnection()
           
 DataSource getDataSource()
           
protected  PreparedStatement prepareStatement(Connection conn, String sql)
           
 void setDataSource(DataSource dataSource)
           
protected  PreparedStatement setDate(PreparedStatement stmt, int idx, Date value)
           
protected  PreparedStatement setDouble(PreparedStatement stmt, int idx, double value)
           
protected  PreparedStatement setInt(PreparedStatement stmt, int idx, int value)
           
protected  PreparedStatement setString(PreparedStatement stmt, int idx, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHandlerBySql

public AbstractHandlerBySql()
Method Detail

getDataSource

public DataSource getDataSource()
Returns:
the datasource

setDataSource

public void setDataSource(DataSource dataSource)
Parameters:
datasource - the datasource to set

getConnection

public Connection getConnection()

close

public void close(Connection conn,
                  Statement stmt,
                  ResultSet rs)

prepareStatement

protected PreparedStatement prepareStatement(Connection conn,
                                             String sql)

setInt

protected PreparedStatement setInt(PreparedStatement stmt,
                                   int idx,
                                   int value)

setDouble

protected PreparedStatement setDouble(PreparedStatement stmt,
                                      int idx,
                                      double value)

setString

protected PreparedStatement setString(PreparedStatement stmt,
                                      int idx,
                                      String value)

setDate

protected PreparedStatement setDate(PreparedStatement stmt,
                                    int idx,
                                    Date value)

executeQuery

protected ResultSet executeQuery(PreparedStatement stmt)

executeUpdate

protected int executeUpdate(PreparedStatement stmt)


Copyright © May 23, 2006-2012 The Ferris Foundation. All Rights Reserved.