|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoemware.core.dao.BaseDao
public abstract class BaseDao
The base dao object. If the reuse connection is set to true the object is no longer thread safe.
| Field Summary | |
|---|---|
protected java.sql.Connection |
mConn
|
protected javax.sql.DataSource |
mDataSource
|
protected boolean |
mReuseConn
|
| Constructor Summary | |
|---|---|
BaseDao()
|
|
BaseDao(javax.sql.DataSource pDataSource)
|
|
| Method Summary | |
|---|---|
protected void |
close(java.sql.ResultSet pResultSet,
java.sql.Statement pStatement)
Close the JDBC objects. |
protected void |
close(java.sql.ResultSet pResultSet,
java.sql.Statement pStatement,
java.sql.Connection pConnection)
Close the JDBC objects. |
protected void |
close(java.sql.Statement pStatement,
java.sql.Connection pConnection)
Close the JDBC objects. |
protected void |
closeConnection()
Close the JDBC connection. |
protected void |
closeConnection(java.sql.Connection pConnection)
Close the JDBC connection. |
protected void |
closeResultSet(java.sql.ResultSet pResultSet)
Close the result set. |
protected void |
closeStatement(java.sql.Statement pStatement)
Close the statement. |
protected java.sql.Connection |
getConnection()
Returns a connection from the data source. |
protected java.sql.Connection |
getConnection(java.lang.String pUsername,
java.lang.String pPassword,
java.lang.String pUrl,
java.lang.String pDriver)
Returns a connection. |
protected java.sql.Timestamp |
getNow()
Returns the current timestamp object. |
protected void |
setReuseConn(boolean pV)
Enable connection reuse. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean mReuseConn
protected java.sql.Connection mConn
protected javax.sql.DataSource mDataSource
| Constructor Detail |
|---|
public BaseDao()
public BaseDao(javax.sql.DataSource pDataSource)
| Method Detail |
|---|
protected final java.sql.Connection getConnection()
throws DaoException
DaoException
protected final java.sql.Connection getConnection(java.lang.String pUsername,
java.lang.String pPassword,
java.lang.String pUrl,
java.lang.String pDriver)
throws DaoException
pUsername - The username.pUrl - The url.pDriver - The driver.
DaoExceptionprotected final java.sql.Timestamp getNow()
protected final void close(java.sql.ResultSet pResultSet,
java.sql.Statement pStatement,
java.sql.Connection pConnection)
throws DaoException
pResultSet - The result set.pStatement - The statement.pConnection - The connection.
DaoException
protected final void close(java.sql.ResultSet pResultSet,
java.sql.Statement pStatement)
throws DaoException
pResultSet - The result set.pStatement - The statement.
DaoException
protected final void close(java.sql.Statement pStatement,
java.sql.Connection pConnection)
throws DaoException
pStatement - The statement.pConnection - The connection.
DaoException
protected final void closeConnection()
throws DaoException
DaoException
protected final void closeConnection(java.sql.Connection pConnection)
throws DaoException
pConnection - The connection.
DaoException
protected final void closeStatement(java.sql.Statement pStatement)
throws DaoException
pStatement - The statement.
DaoException
protected final void closeResultSet(java.sql.ResultSet pResultSet)
throws DaoException
pResultSet - The result set.
DaoExceptionprotected final void setReuseConn(boolean pV)
pV - Set to true to reuse.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||