com.ontotext.ordi.tripleset
Class ConnectionImpl

java.lang.Object
  extended by com.ontotext.ordi.tripleset.WarningAwareImpl
      extended by com.ontotext.ordi.tripleset.ConnectionImpl
All Implemented Interfaces:
Connection, WarningAware, Wrapper
Direct Known Subclasses:
TConnectionImpl

public abstract class ConnectionImpl
extends WarningAwareImpl
implements Connection


Field Summary
protected  boolean isAutoCommit
           
protected  IsolationLevel isolationLevel
           
protected  DataSource source
           
 
Fields inherited from class com.ontotext.ordi.tripleset.WarningAwareImpl
warning
 
Constructor Summary
ConnectionImpl(DataSource source)
           
ConnectionImpl(DataSource source, IsolationLevel isolationLevel)
           
 
Method Summary
 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 isWrapperFor(Class<?> iface)
          Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.
 void setAutoCommit(boolean mode)
          Sets the commit mode of the current transaction.
 void setTransactionIsolationLevel(IsolationLevel isolationLevel)
          Sets the isolation level of the current transaction.
<T> T
unwrap(Class<T> iface)
          Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.
 
Methods inherited from class com.ontotext.ordi.tripleset.WarningAwareImpl
clearWarnings, getWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ontotext.ordi.Connection
close, commit, isOpen, isReadOnly, rollback
 
Methods inherited from interface com.ontotext.ordi.WarningAware
clearWarnings, getWarning
 

Field Detail

source

protected final DataSource source

isolationLevel

protected IsolationLevel isolationLevel

isAutoCommit

protected boolean isAutoCommit
Constructor Detail

ConnectionImpl

public ConnectionImpl(DataSource source)

ConnectionImpl

public ConnectionImpl(DataSource source,
                      IsolationLevel isolationLevel)
Method Detail

getDataSource

public DataSource getDataSource()
Description copied from interface: Connection
Gets the DataSource this session is using.

Specified by:
getDataSource in interface Connection
Returns:
data source that created this sessions

getTransactionIsolationLevel

public IsolationLevel getTransactionIsolationLevel()
Description copied from interface: Connection
Gets the isolation level of the current transaction.

Specified by:
getTransactionIsolationLevel in interface Connection
Returns:
isolation level

isAutoCommit

public boolean isAutoCommit()
Description copied from interface: Connection
Checks if the the current session is in auto-commit mode.

Specified by:
isAutoCommit in interface Connection
Returns:
true if it is auto-commit mode.

setAutoCommit

public void setAutoCommit(boolean mode)
                   throws ORDIException
Description copied from interface: Connection
Sets the commit mode of the current transaction.

Specified by:
setAutoCommit in interface Connection
Parameters:
mode - true for auto-commit, otherwise false
Throws:
ORDIException

setTransactionIsolationLevel

public void setTransactionIsolationLevel(IsolationLevel isolationLevel)
                                  throws ORDIException
Description copied from interface: Connection
Sets the isolation level of the current transaction.

Specified by:
setTransactionIsolationLevel in interface Connection
Parameters:
isolationLevel - to be used
Throws:
ORDIException

isWrapperFor

public boolean isWrapperFor(Class<?> iface)
                     throws ORDIException
Description copied from interface: Wrapper
Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.

Specified by:
isWrapperFor in interface Wrapper
Parameters:
iface - A Class defining an interface that the result must implement.
Returns:
an object that implements the interface. May be a proxy for the actual implementing object.
Throws:
ORDIException

unwrap

public <T> T unwrap(Class<T> iface)
         throws ORDIException
Description copied from interface: Wrapper
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

Specified by:
unwrap in interface Wrapper
Parameters:
iface - a Class defining an interface.
Returns:
true if this implements the interface or directly or indirectly wraps an object that does.
Throws:
ORDIException


Copyright © 2008. All Rights Reserved.