java.lang.Objectorg.objectweb.telosys.common.TelosysObject
org.objectweb.telosys.dal.dao.StandardDatabaseSession
Constructor Summary | |
StandardDatabaseSession(int iDatabaseId,
java.sql.Connection con)
Constructor for a real database dession |
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 |
boolean |
isDummy()
Returns true if the session is a "dummy session" (without real connection) |
void |
rollback()
Do a rollback on the session connection |
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, toString, wait, wait, wait |
Constructor Detail |
public StandardDatabaseSession(int iDatabaseId, java.sql.Connection con) throws TelosysException
iDatabaseId
- con
-
TelosysException
Method Detail |
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