com.scooterframework.orm.sqldataexpress.connection
Interface DatabaseConnectionContext

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
DatabaseConnectionContextImpl, DataSourceConnectionContext, JdbcConnectionContext

public interface DatabaseConnectionContext
extends java.io.Serializable

DatabaseConnectionContext interface


Field Summary
static java.lang.String KEY_ACQUIRE_INCREMENT
           
static java.lang.String KEY_AFTER_CONNECTION
           
static java.lang.String KEY_AUTOCOMMIT
           
static java.lang.String KEY_BEFORE_CONNECTION
           
static java.lang.String KEY_CONNECTION_NAME
          Database connection properties keys
static java.lang.String KEY_DATASOURCENAME
           
static java.lang.String KEY_DRIVER
           
static java.lang.String KEY_INITIAL_POOL_SIZE
           
static java.lang.String KEY_LOGINTIMEOUT
           
static java.lang.String KEY_MAX_IDLE_TIME
           
static java.lang.String KEY_MAX_POOL_SIZE
           
static java.lang.String KEY_MIN_POOL_SIZE
           
static java.lang.String KEY_PASSWORD
           
static java.lang.String KEY_READONLY
           
static java.lang.String KEY_SCHEMA
           
static java.lang.String KEY_TRANSACTION_ISOLATION_LEVEL
           
static java.lang.String KEY_URL
           
static java.lang.String KEY_USE_LOGIN_AS_SCHEMA
           
static java.lang.String KEY_USE_LOGIN_FOR_CONNECTION
           
static java.lang.String KEY_USERNAME
           
static java.lang.String KEY_VENDOR
           
 
Method Summary
 java.lang.String getAfterConnectionClassName()
          Returns after-connection callback class.
 java.lang.String getAfterConnectionMethodName()
          Returns after-connection callback method.
 java.lang.String getBeforeConnectionClassName()
          Returns before-connection callback class.
 java.lang.String getBeforeConnectionMethodName()
          Returns before-connection callback method.
 java.lang.String getConnectionName()
          Returns database connection name
 java.util.Properties getConnectionRoles()
          Returns connection role name and password properties
 java.lang.Integer getLoginTimeout()
          Returns the maximum time in seconds that this data source can wait while attempting to connect to a database
 java.lang.String getPassword()
          Returns database password
 java.util.Properties getProperties()
          Returns all database connection properties
 java.lang.String getSchema()
          Returns the schema of the database connection
 int getTransactionIsolationLevel()
          Returns the specified transaction isolation level.
 java.lang.String getUsername()
          Returns database username
 java.lang.String getVendor()
          Returns the vendor name of the database
 boolean hasSpecifiedTransactionIsolationLevel()
          Checks if transaction isolation level is specified.
 boolean isAutoCommit()
          Checks if the connection is auto-commit.
 boolean isReadonly()
          Checks if the connection is readonly.
 void setAutoCommit(boolean autoCommit)
          Sets auto-commit connection
 void setConnectionRoles(java.util.Properties roles)
          Sets connection role name and password properties
 void setProperties(java.util.Properties properties)
          Sets all database connection properties
 void setReadonly(boolean readonly)
          Sets readonly connection
 boolean useLoginAsSchema()
          Checks whether to use login id as schema.
 boolean useLoginForConnection()
          Checks whether to use login username and password for making a connection.
 

Field Detail

KEY_CONNECTION_NAME

static final java.lang.String KEY_CONNECTION_NAME
Database connection properties keys

See Also:
Constant Field Values

KEY_DATASOURCENAME

static final java.lang.String KEY_DATASOURCENAME
See Also:
Constant Field Values

KEY_DRIVER

static final java.lang.String KEY_DRIVER
See Also:
Constant Field Values

KEY_URL

static final java.lang.String KEY_URL
See Also:
Constant Field Values

KEY_BEFORE_CONNECTION

static final java.lang.String KEY_BEFORE_CONNECTION
See Also:
Constant Field Values

KEY_AFTER_CONNECTION

static final java.lang.String KEY_AFTER_CONNECTION
See Also:
Constant Field Values

KEY_USERNAME

static final java.lang.String KEY_USERNAME
See Also:
Constant Field Values

KEY_PASSWORD

static final java.lang.String KEY_PASSWORD
See Also:
Constant Field Values

KEY_LOGINTIMEOUT

static final java.lang.String KEY_LOGINTIMEOUT
See Also:
Constant Field Values

KEY_READONLY

static final java.lang.String KEY_READONLY
See Also:
Constant Field Values

KEY_AUTOCOMMIT

static final java.lang.String KEY_AUTOCOMMIT
See Also:
Constant Field Values

KEY_TRANSACTION_ISOLATION_LEVEL

static final java.lang.String KEY_TRANSACTION_ISOLATION_LEVEL
See Also:
Constant Field Values

KEY_VENDOR

static final java.lang.String KEY_VENDOR
See Also:
Constant Field Values

KEY_SCHEMA

static final java.lang.String KEY_SCHEMA
See Also:
Constant Field Values

KEY_USE_LOGIN_AS_SCHEMA

static final java.lang.String KEY_USE_LOGIN_AS_SCHEMA
See Also:
Constant Field Values

KEY_USE_LOGIN_FOR_CONNECTION

static final java.lang.String KEY_USE_LOGIN_FOR_CONNECTION
See Also:
Constant Field Values

KEY_MAX_POOL_SIZE

static final java.lang.String KEY_MAX_POOL_SIZE
See Also:
Constant Field Values

KEY_MIN_POOL_SIZE

static final java.lang.String KEY_MIN_POOL_SIZE
See Also:
Constant Field Values

KEY_ACQUIRE_INCREMENT

static final java.lang.String KEY_ACQUIRE_INCREMENT
See Also:
Constant Field Values

KEY_INITIAL_POOL_SIZE

static final java.lang.String KEY_INITIAL_POOL_SIZE
See Also:
Constant Field Values

KEY_MAX_IDLE_TIME

static final java.lang.String KEY_MAX_IDLE_TIME
See Also:
Constant Field Values
Method Detail

getConnectionName

java.lang.String getConnectionName()
Returns database connection name

Returns:
String

getBeforeConnectionClassName

java.lang.String getBeforeConnectionClassName()
Returns before-connection callback class.


getBeforeConnectionMethodName

java.lang.String getBeforeConnectionMethodName()
Returns before-connection callback method.


getAfterConnectionClassName

java.lang.String getAfterConnectionClassName()
Returns after-connection callback class.


getAfterConnectionMethodName

java.lang.String getAfterConnectionMethodName()
Returns after-connection callback method.


getUsername

java.lang.String getUsername()
Returns database username


getPassword

java.lang.String getPassword()
Returns database password


getLoginTimeout

java.lang.Integer getLoginTimeout()
Returns the maximum time in seconds that this data source can wait while attempting to connect to a database


isReadonly

boolean isReadonly()
Checks if the connection is readonly.

Returns:
true if readonly connection

setReadonly

void setReadonly(boolean readonly)
Sets readonly connection

Parameters:
readonly - true if read only connection is desired

isAutoCommit

boolean isAutoCommit()
Checks if the connection is auto-commit.

Returns:
true if auto-commit connection

setAutoCommit

void setAutoCommit(boolean autoCommit)
Sets auto-commit connection

Parameters:
autoCommit - true if auto-commit connection is desired

getVendor

java.lang.String getVendor()
Returns the vendor name of the database

Returns:
String

getSchema

java.lang.String getSchema()
Returns the schema of the database connection

Returns:
String

useLoginAsSchema

boolean useLoginAsSchema()
Checks whether to use login id as schema.

Returns:
true if using login id as schema

useLoginForConnection

boolean useLoginForConnection()
Checks whether to use login username and password for making a connection.

Returns:
true if using username and password for making a connection

hasSpecifiedTransactionIsolationLevel

boolean hasSpecifiedTransactionIsolationLevel()
Checks if transaction isolation level is specified. If not, the database's default transaction isolation level is used.

Returns:
true if specified

getTransactionIsolationLevel

int getTransactionIsolationLevel()
Returns the specified transaction isolation level.

Returns:
String

getProperties

java.util.Properties getProperties()
Returns all database connection properties


setProperties

void setProperties(java.util.Properties properties)
Sets all database connection properties


getConnectionRoles

java.util.Properties getConnectionRoles()
Returns connection role name and password properties


setConnectionRoles

void setConnectionRoles(java.util.Properties roles)
Sets connection role name and password properties