org.objectweb.telosys.dal.dao
Interface DatabaseSession

All Known Implementing Classes:
DummyDatabaseSession, StandardDatabaseSession

public interface DatabaseSession

Database session interface


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
 

Method Detail

getId

public long getId()
Returns the database session unique id

Returns:
Since:
v 1.0.2

isDummy

public boolean isDummy()
Returns true if the session is a "dummy session" (without real connection)

Returns:

getDatabaseId

public int getDatabaseId()
Returns the database id of the session
0 to N for a real session
-1 for a dummy session

Returns:

getConnection

public java.sql.Connection getConnection()
Returns the database connection of the session
A dummy session returns null

Returns:

commit

public void commit()
            throws TelosysException
Do a commit on the session connection

Throws:
TelosysException

rollback

public void rollback()
              throws TelosysException
Do a rollback on the session connection

Throws:
TelosysException

close

public void close()
           throws TelosysException
Close the session connection

Throws:
TelosysException