java.lang.Objectorg.objectweb.telosys.common.TelosysObject
org.objectweb.telosys.dal.dao.DummyDatabaseSession
Dummy database session used when working without a real database connection
Constructor Summary | |
DummyDatabaseSession()
Constructor for a "dummy database session" (without a real database connection) |
Method Summary | |
void |
close()
Close the session connection |
void |
commit()
Do a commit on the session connection |
java.sql.Connection |
getConnection()
Returns the database connection of the session A dummy session returns null |
int |
getDatabaseId()
Returns the database id of the session 0 to N for a real session -1 for a dummy session |
long |
getId()
Returns the database session unique id |
boolean |
isDummy()
Returns true if the session is a "dummy session" (without real connection) |
void |
rollback()
Do a rollback on the session connection |
java.lang.String |
toString()
|
Methods inherited from class org.objectweb.telosys.common.TelosysObject |
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DummyDatabaseSession()
Method Detail |
public long getId()
DatabaseSession
getId
in interface DatabaseSession
public boolean isDummy()
DatabaseSession
isDummy
in interface DatabaseSession
public int getDatabaseId()
DatabaseSession
getDatabaseId
in interface DatabaseSession
public java.sql.Connection getConnection()
DatabaseSession
getConnection
in interface DatabaseSession
public void commit() throws TelosysException
DatabaseSession
commit
in interface DatabaseSession
TelosysException
public void rollback() throws TelosysException
DatabaseSession
rollback
in interface DatabaseSession
TelosysException
public void close() throws TelosysException
DatabaseSession
close
in interface DatabaseSession
TelosysException
public java.lang.String toString()