|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.toplink.sessions.DatasourceLogin
public abstract class DatasourceLogin
Purpose: Hold the configuration information necessary to connect to a datasource.
Description: This is an abstract class that defines the common datasource independent connection configuration. It is extended to support specific datasources such as JDBC, JCA, XML, etc.
Field Summary | |
---|---|
static int |
CONCURRENT_READ_WRITE
Reads and unit of work merges can occur concurrently. |
static int |
SYNCHRONIZED_READ_ON_WRITE
Reads and unit of work merges will be serialized. |
static int |
SYNCHRONIZED_WRITE
Reads can occur concurrently but unit of work merges will be serialized. |
static int |
SYNCRONIZED_OBJECT_LEVEL_READ_WRITE
Writes to the cache (merge, object build/refresh will be synchronized as will cache access (cloning) based on when access is required. |
static int |
SYNCRONIZED_OBJECT_LEVEL_READ_WRITE_DATABASE
Writes to the cache (merge, object build/refresh will be synchronized as will cache access (cloning) based on database transaction. |
static java.lang.String |
versionString
|
Constructor Summary | |
---|---|
DatasourceLogin()
Create a new login. |
|
DatasourceLogin(oracle.toplink.internal.databaseaccess.Platform databasePlatform)
ADVANCED: Create a new login for the given platform. |
Method Summary | |
---|---|
void |
addSequence(Sequence sequence)
Add sequence corresponding to the name |
void |
dontUseExternalConnectionPooling()
Do not use external connection pooling. |
void |
dontUseExternalTransactionController()
Let TopLink control transactions instead of some external transaction service such as JTS. |
int |
getCacheTransactionIsolation()
ADVANCED: By default concurrency is optimized and the cache is not locked more than required during reads or writes, This allows for virtual concurrent reading and writing and should never cause any problems. |
Connector |
getConnector()
ADVANCED: Return the connector that will instantiate the connection. |
oracle.toplink.internal.databaseaccess.Platform |
getDatasourcePlatform()
Return the datasource platform specific information. |
Sequence |
getDefaultSequence()
Get default sequence |
java.lang.String |
getPassword()
Return the password. |
java.lang.Object |
getProperty(java.lang.String name)
The properties are additional, driver-specific, connection information to be passed to the driver. |
Sequence |
getSequence(java.lang.String seqName)
Get sequence corresponding to the name |
int |
getSequencePreallocationSize()
Deprecated. use getDefaultSequence().getPreallocationSize() instead |
java.util.Map |
getSequences()
Returns a map of sequence names to Sequences (may be null). |
java.lang.String |
getTableQualifier()
Return the qualifier for the all of the tables referenced by TopLink. |
java.lang.String |
getUserName()
The user name is the database login name. |
static java.lang.String |
getVersion()
Return the TopLink version. |
boolean |
isConnectionHealthValidatedOnError()
This value defaults to false when not on a DatabaseLogin as the functionality has not been implemented for other datasource type. |
void |
removeAllSequences()
Remove all sequences but the default one. |
void |
removeProperty(java.lang.String propertyName)
Some drivers don't like the "user" and "password" properties. |
Sequence |
removeSequence(java.lang.String seqName)
Remove sequence corresponding to name. |
void |
setCacheTransactionIsolation(int cacheTransactionIsolation)
ADVANCED: By default concurrency is optimized and the cache is not locked more than required during reads or writes, This allows for virtual concurrent reading and writing and should never cause any problems. |
void |
setConnector(Connector connector)
Set the connector that will instantiate the connection. |
void |
setDatasourcePlatform(oracle.toplink.internal.databaseaccess.Platform platform)
Set the database platform specific information. |
void |
setDefaultNullValue(java.lang.Class type,
java.lang.Object value)
The default value to substitute for database NULLs can be configured on a per-class basis. |
void |
setDefaultSequence(Sequence sequence)
Set default sequence |
void |
setEncryptedPassword(java.lang.String password)
Set the encrypted password. |
void |
setEncryptionClassName(java.lang.String encryptionClassName)
Sets the encryption class name |
void |
setPassword(java.lang.String password)
Set the password. |
void |
setProperties(java.util.Properties properties)
The properties are additional, driver-specific, connection information to be passed to the JDBC driver. |
void |
setProperty(java.lang.String propertyName,
java.lang.Object propertyValue)
Some JDBC drivers require additional, driver-specific, properties. |
void |
setSelectSequenceNumberQuery(ValueReadQuery selectSequenceNumberQuery)
Deprecated. use ((QuerySequence)getDefaultSequence()).setSelectQuery(ValueReadQuery) instead |
void |
setSequencePreallocationSize(int size)
Deprecated. use getDefaultSequence().setPreallocationSize(int) instead |
void |
setTableQualifier(java.lang.String qualifier)
Set the default qualifier for all tables. |
void |
setTimestampQuery(ValueReadQuery timestampQuery)
Override the default query for returning a timestamp from the server. |
void |
setUpdateSequenceQuery(DataModifyQuery updateSequenceNumberQuery)
Deprecated. use ((QuerySequence)getDefaultSequence()).setUpdateQuery(DataModifyQuery) instead |
void |
setUserName(java.lang.String name)
The user name is the database login name. |
void |
setUsesExternalConnectionPooling(boolean usesExternalConnectionPooling)
Return whether TopLink uses some external connection pooling service such as a JDBC 2.0 driver. |
void |
setUsesExternalTransactionController(boolean usesExternalTransactionController)
Return whether TopLink uses some external transaction service such as JTS. |
boolean |
shouldUseExternalConnectionPooling()
Return whether TopLink uses some external connection pooling (e.g. |
boolean |
shouldUseExternalTransactionController()
Return whether TopLink uses some external transaction service such as JTS. |
java.lang.String |
toString()
Print all of the connection information. |
void |
useExternalConnectionPooling()
Use external connection pooling. |
void |
useExternalTransactionController()
Use an external transaction controller such as a JTS service |
void |
usePlatform(oracle.toplink.internal.databaseaccess.Platform platform)
ADVANCED: Set the database platform to be custom platform. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String versionString
public static final int CONCURRENT_READ_WRITE
DatasourceLogin
public static final int SYNCHRONIZED_WRITE
DatasourceLogin
public static final int SYNCHRONIZED_READ_ON_WRITE
DatasourceLogin
public static final int SYNCRONIZED_OBJECT_LEVEL_READ_WRITE
DatasourceLogin
public static final int SYNCRONIZED_OBJECT_LEVEL_READ_WRITE_DATABASE
DatasourceLogin
Constructor Detail |
---|
public DatasourceLogin()
public DatasourceLogin(oracle.toplink.internal.databaseaccess.Platform databasePlatform)
Method Detail |
---|
public int getCacheTransactionIsolation()
Setting are:
public Connector getConnector()
public oracle.toplink.internal.databaseaccess.Platform getDatasourcePlatform()
getDatasourcePlatform
in interface Login
public java.lang.Object getProperty(java.lang.String name)
NOTE: Do not set the password directly by getting the properties and setting the "password" property directly. Use the method DatabaseLogin.setPassword(String).
getProperty
in interface Login
public int getSequencePreallocationSize()
public java.lang.String getTableQualifier()
getTableQualifier
in interface Login
public java.lang.String getUserName()
getUserName
in interface Login
public static java.lang.String getVersion()
public void removeProperty(java.lang.String propertyName)
public void setCacheTransactionIsolation(int cacheTransactionIsolation)
Setting are:
public void setConnector(Connector connector)
DataSource
, use code
something like the following:
session.getLogin().setConnector(new JNDIConnector(context, dataSourceName));
session.login();
where the context
is an instance of a javax.naming.Context
and
the dataSourceName
refers to the name of the DataSource
within the context.
public void setDefaultNullValue(java.lang.Class type, java.lang.Object value)
public void setPassword(java.lang.String password)
setPassword
in interface Login
public java.lang.String getPassword()
getPassword
in interface Login
public void setEncryptedPassword(java.lang.String password)
public void setEncryptionClassName(java.lang.String encryptionClassName)
public void setDatasourcePlatform(oracle.toplink.internal.databaseaccess.Platform platform)
setDatasourcePlatform
in interface Login
public void usePlatform(oracle.toplink.internal.databaseaccess.Platform platform)
public void setProperties(java.util.Properties properties)
setProperties
in interface Login
public void setProperty(java.lang.String propertyName, java.lang.Object propertyValue)
setProperty
in interface Login
public void setSelectSequenceNumberQuery(ValueReadQuery selectSequenceNumberQuery)
public void setSequencePreallocationSize(int size)
public void setTableQualifier(java.lang.String qualifier)
public void setTimestampQuery(ValueReadQuery timestampQuery)
public void setUpdateSequenceQuery(DataModifyQuery updateSequenceNumberQuery)
public void setUserName(java.lang.String name)
setUserName
in interface Login
public void setUsesExternalConnectionPooling(boolean usesExternalConnectionPooling)
public void setUsesExternalTransactionController(boolean usesExternalTransactionController)
public void dontUseExternalConnectionPooling()
useExternalConnectionPooling()
public void dontUseExternalTransactionController()
useExternalTransactionController()
public boolean shouldUseExternalConnectionPooling()
shouldUseExternalConnectionPooling
in interface Login
useExternalConnectionPooling()
,
dontUseExternalConnectionPooling()
public boolean shouldUseExternalTransactionController()
shouldUseExternalTransactionController
in interface Login
useExternalTransactionController()
,
dontUseExternalTransactionController()
public void useExternalConnectionPooling()
dontUseExternalConnectionPooling()
,
shouldUseExternalConnectionPooling()
public void useExternalTransactionController()
dontUseExternalTransactionController()
,
shouldUseExternalTransactionController()
public java.lang.String toString()
toString
in class java.lang.Object
public Sequence getDefaultSequence()
public void setDefaultSequence(Sequence sequence)
public void addSequence(Sequence sequence)
public Sequence getSequence(java.lang.String seqName)
public java.util.Map getSequences()
public Sequence removeSequence(java.lang.String seqName)
public void removeAllSequences()
public boolean isConnectionHealthValidatedOnError()
isConnectionHealthValidatedOnError
in interface Login
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |