|
OOP SimpleDaoHelper Version 1.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bentofw.dao.SimpleDaoHelperImpl
com.bentofw.dao.DaoHelperForPooledStatement
public class DaoHelperForPooledStatement
Implementation of SimpleDaoHelper interface. This
class creates PreparedStatement from PooledStatement.
OOP PooledStatement is the Java API for the pooling
mechanism of JDBC PreparedStatement. Because the web
applications in the real world execute the same set of
PreparedStatement repeatedly, the pooling mechanism of
PreparedStatement results in the significant performance
improvement. In addition, its sophisticated Thread control
makes your web applications rely Thread Safe.
To use this implementation, please download and install
OOP PooledStatement.
All the configuration information should be supplied in
the property resource file.
This property resource file is:
SimpleDaoHelper| Constructor Summary | |
|---|---|
DaoHelperForPooledStatement()
The constructor. |
|
| Method Summary | |
|---|---|
void |
closeResource(java.sql.ResultSet res,
java.sql.PreparedStatement ps,
java.sql.Connection con,
boolean isOK)
This method closes only ResultSet. |
java.sql.Connection |
getConnection()
Return the JDBC Connection. |
java.sql.PreparedStatement |
getPrepareStatement(java.sql.Connection con,
java.lang.String sql)
Return the JDBC PreparedStatement for the given SQL statement. |
| Methods inherited from class com.bentofw.dao.SimpleDaoHelperImpl |
|---|
select, update |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DaoHelperForPooledStatement()
throws NestedException,
SimpleException
NestedException
SimpleException| Method Detail |
|---|
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface SimpleDaoHelpergetConnection in class SimpleDaoHelperImpljava.sql.SQLException
public java.sql.PreparedStatement getPrepareStatement(java.sql.Connection con,
java.lang.String sql)
throws java.sql.SQLException
getPrepareStatement in interface SimpleDaoHelpergetPrepareStatement in class SimpleDaoHelperImplcon - JDBC Connectionsql - SQL statement
java.sql.SQLException
public void closeResource(java.sql.ResultSet res,
java.sql.PreparedStatement ps,
java.sql.Connection con,
boolean isOK)
closeResource in interface SimpleDaoHelpercloseResource in class SimpleDaoHelperImplres - ResultSetps - PreparedStatementcon - ConnectionisOK - This parameter will be used only by
DaoHelperForPooledStatement, because the
PreparedStatement should not be pushed back to the pool if
something is wrong.
If SQLException is thrown while playing with
PreparedStatement, please specify false.
Otherwise, true.
|
OOP SimpleDaoHelper Version 1.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ALL CONTENTS COPYRIGHT 2005, OOP-Research Corporation. All rights reserved.
Any questions and comments are welcome to OOP-Research Corporation.