|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.pow2.dao.ConnectionProvider
ConnectionProvider base class.
To create a ConnectionProvider for your preferred ConnectionPooler,
extend this calss and implement initialize
and
getConnection
methods.
Field Summary | |
protected org.apache.log4j.Category |
cat
Log4j category |
protected ConnectionProviderPrefs |
prefs
ConnectionProvider preferences |
Constructor Summary | |
ConnectionProvider()
Constructor for the ConnectionProvider object. |
Method Summary | |
protected abstract Connection |
getConnection()
Get a JDBC Connection. |
protected Connection |
getConnection(int isolationLevel)
Get a "transactional" JDBC connection. |
protected String |
getLastToken(String str,
String tokenSeparator)
Get the last token from the input string. |
ConnectionProviderPrefs |
getPrefs()
Gets the prefs attribute of the ConnectionProvider object |
protected abstract void |
init()
Initialize the connection pool provider. |
void |
setPrefs(ConnectionProviderPrefs prefs)
Sets the prefs attribute of the ConnectionProvider object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.log4j.Category cat
protected ConnectionProviderPrefs prefs
Constructor Detail |
public ConnectionProvider() throws Exception
Exception
- Description of the ExceptionMethod Detail |
public ConnectionProviderPrefs getPrefs()
public void setPrefs(ConnectionProviderPrefs prefs)
prefs
- The new prefs valueprotected abstract void init() throws Exception
Exception
- Description of the Exceptionprotected abstract Connection getConnection() throws SQLException
SQLException
- Description of the Exceptionprotected Connection getConnection(int isolationLevel) throws SQLException
isolationLevel
- the isolation level to set the connection to
SQLException
- if any error occursprotected String getLastToken(String str, String tokenSeparator)
str
- the string containing the tokentokenSeparator
- the token separator string (i.e.: "'", ":", etc)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |