|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.scooterframework.orm.sqldataexpress.connection.DatabaseConnectionContextImpl
public abstract class DatabaseConnectionContextImpl
DataSourceConnectionContext class
Field Summary | |
---|---|
protected java.lang.String |
afterConnectionClassName
|
protected java.lang.String |
afterConnectionMethodName
|
protected boolean |
autoCommit
|
protected java.lang.String |
beforeConnectionClassName
|
protected java.lang.String |
beforeConnectionMethodName
|
protected java.lang.String |
connectionName
|
protected java.lang.Integer |
loginTimeout
|
protected java.lang.String |
password
|
protected java.util.Properties |
properties
|
protected boolean |
readonly
|
protected java.util.Properties |
roles
|
protected java.lang.String |
schema
|
protected int |
transactionIsolationLevel
|
protected boolean |
useLoginAsSchema
|
protected boolean |
useLoginForConnection
|
protected java.lang.String |
username
|
protected java.lang.String |
vendor
|
Fields inherited from interface com.scooterframework.orm.sqldataexpress.connection.DatabaseConnectionContext |
---|
KEY_ACQUIRE_INCREMENT, KEY_AFTER_CONNECTION, KEY_AUTOCOMMIT, KEY_BEFORE_CONNECTION, KEY_CONNECTION_NAME, KEY_DATASOURCENAME, KEY_DRIVER, KEY_INITIAL_POOL_SIZE, KEY_LOGINTIMEOUT, KEY_MAX_IDLE_TIME, KEY_MAX_POOL_SIZE, KEY_MIN_POOL_SIZE, KEY_PASSWORD, KEY_READONLY, KEY_SCHEMA, KEY_TRANSACTION_ISOLATION_LEVEL, KEY_URL, KEY_USE_LOGIN_AS_SCHEMA, KEY_USE_LOGIN_FOR_CONNECTION, KEY_USERNAME, KEY_VENDOR |
Constructor Summary | |
---|---|
DatabaseConnectionContextImpl()
|
|
DatabaseConnectionContextImpl(java.util.Properties prop)
|
Method Summary | |
---|---|
protected java.lang.String |
checkVendor(java.lang.String input)
Help method to detect vendor from input string. |
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 |
setLoginTimeout(java.lang.Integer loginTimeout)
Sets the loginTimeout name of the database |
void |
setProperties(java.util.Properties properties)
Sets all database connection properties |
void |
setReadonly(boolean readonly)
Sets readonly connection |
boolean |
useLoginAsSchema()
Checks if using login id as schema. |
boolean |
useLoginForConnection()
Checks if using login username and password for making a connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String connectionName
protected java.lang.String beforeConnectionClassName
protected java.lang.String beforeConnectionMethodName
protected java.lang.String afterConnectionClassName
protected java.lang.String afterConnectionMethodName
protected java.lang.String username
protected java.lang.String password
protected java.lang.Integer loginTimeout
protected boolean readonly
protected boolean autoCommit
protected int transactionIsolationLevel
protected java.lang.String vendor
protected java.lang.String schema
protected boolean useLoginAsSchema
protected boolean useLoginForConnection
protected java.util.Properties properties
protected java.util.Properties roles
Constructor Detail |
---|
public DatabaseConnectionContextImpl()
public DatabaseConnectionContextImpl(java.util.Properties prop)
Method Detail |
---|
public java.lang.String getConnectionName()
getConnectionName
in interface DatabaseConnectionContext
public java.lang.String getBeforeConnectionClassName()
getBeforeConnectionClassName
in interface DatabaseConnectionContext
public java.lang.String getBeforeConnectionMethodName()
getBeforeConnectionMethodName
in interface DatabaseConnectionContext
public java.lang.String getAfterConnectionClassName()
getAfterConnectionClassName
in interface DatabaseConnectionContext
public java.lang.String getAfterConnectionMethodName()
getAfterConnectionMethodName
in interface DatabaseConnectionContext
public java.lang.String getUsername()
getUsername
in interface DatabaseConnectionContext
public java.lang.String getPassword()
getPassword
in interface DatabaseConnectionContext
public java.lang.Integer getLoginTimeout()
getLoginTimeout
in interface DatabaseConnectionContext
public void setLoginTimeout(java.lang.Integer loginTimeout)
public boolean isReadonly()
isReadonly
in interface DatabaseConnectionContext
public void setReadonly(boolean readonly)
setReadonly
in interface DatabaseConnectionContext
readonly
- true if read only connection is desiredpublic boolean isAutoCommit()
isAutoCommit
in interface DatabaseConnectionContext
public void setAutoCommit(boolean autoCommit)
setAutoCommit
in interface DatabaseConnectionContext
autoCommit
- true if auto-commit connection is desiredpublic java.lang.String getVendor()
getVendor
in interface DatabaseConnectionContext
public java.lang.String getSchema()
getSchema
in interface DatabaseConnectionContext
public boolean useLoginAsSchema()
useLoginAsSchema
in interface DatabaseConnectionContext
public boolean useLoginForConnection()
useLoginForConnection
in interface DatabaseConnectionContext
public boolean hasSpecifiedTransactionIsolationLevel()
hasSpecifiedTransactionIsolationLevel
in interface DatabaseConnectionContext
public int getTransactionIsolationLevel()
getTransactionIsolationLevel
in interface DatabaseConnectionContext
public java.util.Properties getProperties()
getProperties
in interface DatabaseConnectionContext
public void setProperties(java.util.Properties properties)
setProperties
in interface DatabaseConnectionContext
public java.util.Properties getConnectionRoles()
getConnectionRoles
in interface DatabaseConnectionContext
public void setConnectionRoles(java.util.Properties roles)
setConnectionRoles
in interface DatabaseConnectionContext
protected java.lang.String checkVendor(java.lang.String input)
Help method to detect vendor from input string. The input string could be one of the following:
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |