|
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.DaoHelperForJndi
public class DaoHelperForJndi
Implementation of SimpleDaoHelper interface. This
class creates PreparedStatement from JNDI DataSource.
To use this implementation, the JNDI DataSource must be
found by:
SimpleDaoHelper| Constructor Summary | |
|---|---|
DaoHelperForJndi()
The constructor. |
|
| Method Summary | |
|---|---|
void |
closeResource(java.sql.ResultSet res,
java.sql.PreparedStatement ps,
java.sql.Connection con,
boolean isOK)
Close the specified ResultSet, PreparedStatment and Connection. |
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 DaoHelperForJndi()
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.
But, to make your code portable between the implementations,
please specify the correct value.
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.