com.ontotext.ordi
Interface Connection

All Superinterfaces:
WarningAware, Wrapper
All Known Subinterfaces:
TConnection, WsmoConnection
All Known Implementing Classes:
ConnectionImpl, RDBMSConnection, RemoteWsmoConnection, TConnectionImpl, TQueryConnectionImpl, TRREEConnection, WsmoConnectionImpl

public interface Connection
extends Wrapper, WarningAware

A connection (session) to specific data provider. The Connection interface define common functionality to be supported by specific data provider.

Author:
vassil

Method Summary
 void close()
          Releases all resources hold by this instance.
 void commit()
          Commits all operations part of the current transaction.
 DataSource getDataSource()
          Gets the DataSource this session is using.
 IsolationLevel getTransactionIsolationLevel()
          Gets the isolation level of the current transaction.
 boolean isAutoCommit()
          Checks if the the current session is in auto-commit mode.
 boolean isOpen()
          Checks if this session is opened.
 boolean isReadOnly()
          Checks if the current session to data provider is read-only.
 void rollback()
          Rollbacks all operations part of the current transaction.
 void setAutoCommit(boolean mode)
          Sets the commit mode of the current transaction.
 void setTransactionIsolationLevel(IsolationLevel isolationLevel)
          Sets the isolation level of the current transaction.
 
Methods inherited from interface com.ontotext.ordi.Wrapper
isWrapperFor, unwrap
 
Methods inherited from interface com.ontotext.ordi.WarningAware
clearWarnings, getWarning
 

Method Detail

isAutoCommit

boolean isAutoCommit()
Checks if the the current session is in auto-commit mode.

Returns:
true if it is auto-commit mode.

setAutoCommit

void setAutoCommit(boolean mode)
                   throws ORDIException
Sets the commit mode of the current transaction.

Parameters:
mode - true for auto-commit, otherwise false
Throws:
ORDIException

rollback

void rollback()
              throws ORDIException
Rollbacks all operations part of the current transaction.

Throws:
ORDIException

commit

void commit()
            throws ORDIException
Commits all operations part of the current transaction.

Throws:
ORDIException

getTransactionIsolationLevel

IsolationLevel getTransactionIsolationLevel()
Gets the isolation level of the current transaction.

Returns:
isolation level

setTransactionIsolationLevel

void setTransactionIsolationLevel(IsolationLevel isolationLevel)
                                  throws ORDIException
Sets the isolation level of the current transaction.

Parameters:
isolationLevel - to be used
Throws:
ORDIException

isReadOnly

boolean isReadOnly()
Checks if the current session to data provider is read-only.

Returns:
true if read-only

isOpen

boolean isOpen()
Checks if this session is opened.

Returns:
true if closed, false otherwise.

close

void close()
           throws ORDIException
Releases all resources hold by this instance.

Throws:
ORDIException

getDataSource

DataSource getDataSource()
Gets the DataSource this session is using.

Returns:
data source that created this sessions


Copyright © 2008. All Rights Reserved.