|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.j256.ormlite.support.BaseConnectionSource
public abstract class BaseConnectionSource
Connection source base class which provides the save/clear mechanism using a thread local.
Constructor Summary | |
---|---|
BaseConnectionSource()
|
Method Summary | |
---|---|
protected boolean |
clearSpecial(DatabaseConnection connection,
Logger logger)
Clear the connection that was previously saved. |
protected DatabaseConnection |
getSavedConnection()
Returns the connection that has been saved or null if none. |
DatabaseConnection |
getSpecialConnection()
Return the currently saved connection or null if none. |
protected boolean |
isSavedConnection(DatabaseConnection connection)
Return true if the connection being released is the one that has been saved. |
protected boolean |
saveSpecial(DatabaseConnection connection)
Save this connection as our special connection to be returned by the getSavedConnection() method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.j256.ormlite.support.ConnectionSource |
---|
clearSpecialConnection, close, closeQuietly, getDatabaseType, getReadOnlyConnection, getReadWriteConnection, isOpen, releaseConnection, saveSpecialConnection |
Constructor Detail |
---|
public BaseConnectionSource()
Method Detail |
---|
public DatabaseConnection getSpecialConnection()
ConnectionSource
getSpecialConnection
in interface ConnectionSource
protected DatabaseConnection getSavedConnection()
protected boolean isSavedConnection(DatabaseConnection connection)
protected boolean saveSpecial(DatabaseConnection connection) throws SQLException
getSavedConnection()
method.
SQLException
protected boolean clearSpecial(DatabaseConnection connection, Logger logger)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |