com.scooterframework.orm.sqldataexpress.connection
Class UserDatabaseConnectionImpl

java.lang.Object
  extended by com.scooterframework.orm.sqldataexpress.connection.UserDatabaseConnectionImpl
All Implemented Interfaces:
UserDatabaseConnection
Direct Known Subclasses:
DataSourceConnection, JdbcConnection

public abstract class UserDatabaseConnectionImpl
extends java.lang.Object
implements UserDatabaseConnection

Abstract UserDatabaseConnectionImpl class


Field Summary
 
Fields inherited from interface com.scooterframework.orm.sqldataexpress.connection.UserDatabaseConnection
DATASOURCE_CONNECTION, JDBC_CONNECTION
 
Constructor Summary
UserDatabaseConnectionImpl(DatabaseConnectionContext dcc)
           
UserDatabaseConnectionImpl(java.lang.String connectionName, DatabaseConnectionContext dcc)
           
 
Method Summary
 boolean connectionIsOpen()
          Return status
protected abstract  java.sql.Connection createConnection()
          Create a connection based on specific database connection context.
 boolean getAutoCommit()
          Retrieves the current auto-commit mode for this Connection object.
 java.sql.Connection getConnection()
          Return the underneath connection.
 java.lang.String getConnectionName()
          Return the connection name.
 DatabaseConnectionContext getDatabaseConnectionContext()
          Return the underlying DatabaseConnectionContext.
 void setAutoCommit(boolean autoCommit)
          Sets this connection's auto-commit mode to the given state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.scooterframework.orm.sqldataexpress.connection.UserDatabaseConnection
getConnectionType
 

Constructor Detail

UserDatabaseConnectionImpl

public UserDatabaseConnectionImpl(DatabaseConnectionContext dcc)

UserDatabaseConnectionImpl

public UserDatabaseConnectionImpl(java.lang.String connectionName,
                                  DatabaseConnectionContext dcc)
Method Detail

getConnectionName

public java.lang.String getConnectionName()
Return the connection name.

Specified by:
getConnectionName in interface UserDatabaseConnection

getConnection

public java.sql.Connection getConnection()
Return the underneath connection.

Specified by:
getConnection in interface UserDatabaseConnection
Throws:
java.sql.SQLException

connectionIsOpen

public boolean connectionIsOpen()
Return status


getDatabaseConnectionContext

public DatabaseConnectionContext getDatabaseConnectionContext()
Return the underlying DatabaseConnectionContext.

Specified by:
getDatabaseConnectionContext in interface UserDatabaseConnection

getAutoCommit

public boolean getAutoCommit()
Retrieves the current auto-commit mode for this Connection object.

Specified by:
getAutoCommit in interface UserDatabaseConnection
Returns:
the current state of this Connection object's auto-commit mode

setAutoCommit

public void setAutoCommit(boolean autoCommit)
Sets this connection's auto-commit mode to the given state.

Specified by:
setAutoCommit in interface UserDatabaseConnection
Parameters:
autoCommit - true to enable auto-commit mode; false to disable it
See Also:
getAutoCommit()

createConnection

protected abstract java.sql.Connection createConnection()
Create a connection based on specific database connection context.

Returns:
Connection