com.uwyn.rife.database
Class DbPreparedStatementHandler<DataType>
java.lang.Object
com.uwyn.rife.database.DbResultSetHandler
com.uwyn.rife.database.DbPreparedStatementHandler<DataType>
- All Implemented Interfaces:
- Cloneable
public abstract class DbPreparedStatementHandler<DataType>
- extends DbResultSetHandler
By extending this class it's possible to easily customize the behaviour of
a large number of methods in the DbQueryManager class.
You're able to set the parameters of a DbPreparedStatement
before the actual execution of any logic by overriding the setParameters method.
If you need to customize the entire query execution, you can override
the performUpdate and performQuery methods. Note that these
methods are actually responsible for calling the setParameters method, so if you
override them you either have to call this method yourself or include the
code in the overridden method.
This class has both a default constructor and one that can take a data
object. This can be handy when using it as an extending anonymous inner
class when you need to use variables inside the inner class that are
cumbersome to change to final in the enclosing class.
- Since:
- 1.0
- Version:
- $Revision: 3634 $
- Author:
- Geert Bevin (gbevin[remove] at uwyn dot com)
- See Also:
DbPreparedStatement,
DbQueryManager
mData
protected DataType mData
DbPreparedStatementHandler
public DbPreparedStatementHandler()
DbPreparedStatementHandler
public DbPreparedStatementHandler(DataType data)
getData
public DataType getData()
setParameters
public void setParameters(DbPreparedStatement statement)
performUpdate
public int performUpdate(DbPreparedStatement statement)
performQuery
public void performQuery(DbPreparedStatement statement)
Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.