de.topicmapslab.majortom.database.jdbc.model
Interface ISession

All Known Implementing Classes:
HSQLDBSession, MySqlSession, PostGreSqlSession, RDBMSSession, SessionImpl, SQL99Session

public interface ISession

Author:
Sven Krosse

Method Summary
 void close()
          Closing the current session instance
 void commit()
          Commit all changes of this session
 java.sql.Connection getConnection()
          Access to the internal connection
 IConnectionProvider getConnectionProvider()
          Returns the parent connection provider
<T extends IQueryProcessor>
T
getProcessor()
          Returns the internal query processor instance, which should be used to execute queries.
 JdbcTopicMapStore getTopicMapStore()
          Returns the topic map store instance
 boolean isAutoCommit()
          Checks if the session automatically commits all changes
 

Method Detail

getProcessor

<T extends IQueryProcessor> T getProcessor()
                                       throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Returns the internal query processor instance, which should be used to execute queries.

Returns:
the query processor
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if the connection is not established

close

void close()
           throws java.sql.SQLException
Closing the current session instance

Throws:
java.sql.SQLException

commit

void commit()
            throws java.sql.SQLException
Commit all changes of this session

Throws:
java.sql.SQLException - thrown if commit failed

getConnection

java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Access to the internal connection

Returns:
the connection
Throws:
java.sql.SQLException - thrown if connection cannot be established

getTopicMapStore

JdbcTopicMapStore getTopicMapStore()
Returns the topic map store instance

Returns:
the topic map store

getConnectionProvider

IConnectionProvider getConnectionProvider()
Returns the parent connection provider

Returns:
the connectionProvider the connection provider

isAutoCommit

boolean isAutoCommit()
Checks if the session automatically commits all changes

Returns:
true if the session commits automatically, false otherwise.