java.lang.Objectorg.objectweb.telosys.dal.dao.CurrentDatabaseSession
This class gives access to the current DatabaseSession associated with the current thread
The DatabaseSession is stored as a "thread-local variable" ( see ThreadLocal for more details )
Constructor Summary | |
CurrentDatabaseSession()
|
Method Summary | |
static DatabaseSession |
get()
Returns the DatabaseSession instance associated with the current thread. |
protected static DatabaseSession |
getInternal()
Returns the DatabaseSession instance associated with the current thread. |
protected static void |
remove()
Removes the DatabaseSession instance associated with the current thread. |
protected static boolean |
removeIfStored(DatabaseSession dbSession)
Removes the DatabaseSession instance associated with the current thread if it's the same instance as the given DatabaseSession. |
protected static void |
set(DatabaseSession dbSession)
Sets the DatabaseSession instance associated with the current thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CurrentDatabaseSession()
Method Detail |
public static final DatabaseSession get()
TelosysRuntimeException
- if no current DatabaseSessionprotected static final DatabaseSession getInternal()
protected static final void set(DatabaseSession dbSession)
dbSession
- protected static final boolean removeIfStored(DatabaseSession dbSession)
dbSession
-
protected static final void remove()