Purpose: Hold the configuration information necessary to connect to a JDBC driver.
Description: A DatabaseLogin is used by an EclipseLink database session to connect to a JDBC server.
Responsibilities:
| Modifier and Type | Field and Description |
|---|---|
| protected Boolean | connectionHealthValidatedOnError
On an SQL Exception EclipseLink will ping the database to determine if the connection used can continue to be used for queries. |
| protected int | delayBetweenConnectionAttempts
Stores the number of milliseconds that EclipseLink will wait between attempts to reconnect a DatabaseConnection in the case EclipseLink is attempting to retry a query. |
| protected int | queryRetryAttemptCount
Stores the value for the number of time EclipseLink will attempt to reconnect the connection on a comm failure in the case EclipseLink is attempting to retry a query. |
| public static final int | TRANSACTION_NONE
Transactions are not supported. |
| public static final int | TRANSACTION_READ_COMMITTED
Dirty reads are prevented; non-repeatable reads and phantom reads can occur. |
| public static final int | TRANSACTION_READ_UNCOMMITTED
Dirty reads, non-repeatable reads and phantom reads can occur. |
| public static final int | TRANSACTION_REPEATABLE_READ
Dirty reads and non-repeatable reads are prevented; phantom reads can occur. |
| public static final int | TRANSACTION_SERIALIZABLE
Dirty reads, non-repeatable reads and phantom reads are prevented. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DatabaseLogin(DatabasePlatform databasePlatform)
ADVANCED: Create a new login for the given platform. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public Accessor | buildAccessor()
Implements org. |
| public void | cacheAllStatements()
PUBLIC: Cache all prepared statements, this requires full parameter binding as well. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | dontUseByteArrayBinding()
PUBLIC: EclipseLink can be configured to use parameter binding for large binary data. |
| public void | dontUseJDBCBatchWriting()
PUBLIC: Indicate to EclipseLink that the JDBC driver does not support batch writing. |
| public void | dontUseNativeSQL()
PUBLIC: EclipseLink can be configured to use database-specific SQL grammar, as opposed to the JDBC standard grammar. |
| public void | dontUseStreamsForBinding()
PUBLIC: EclipseLink can be configured to use streams to store large binary data. |
| public void | |
| protected boolean | |
| public String | |
| public int | getCursorCode()
ADVANCED: Return the code for preparing cursored output parameters in a stored procedure |
| public String | getDatabaseName()
PUBLIC: The database name is required when connecting to databases that support multiple databases within a single server instance (e.g. Sybase, SQL Server). |
| public String | |
| public String | getDataSourceName()
PUBLIC: The data source name is required if connecting through ODBC (JDBC-ODBC, etc.). |
| public Platform | getDatasourcePlatform()
Overrides org. Implements org. |
| protected DefaultConnector | |
| public int | getDelayBetweenConnectionAttempts()
PUBLIC: Returns the number of milliseconds that EclipseLink will wait between attempts to reconnect a DatabaseConnection in the case EclipseLink is attempting to retry a query, the default is 5000. |
| public String | getDriverClassName()
PUBLIC: The driver class is the name of the Java class for the JDBC driver being used (e.g. "sun.jdbc.odbc.JdbcOdbcDriver"). |
| public String | getDriverURLHeader()
PUBLIC: The driver URL header is the string predetermined by the JDBC driver to be part of the URL connection string, (e.g. "jdbc:odbc:"). |
| public int | |
| public DataPartitioningCallback | |
| public String | getPingSQL()
PUBLIC: EclipseLink will attempt to test a connection if it encounters an exception on the connection when executing SQL. |
| public int | getQueryRetryAttemptCount()
PUBLIC: Return the number of attempts EclipseLink should make to re-connect to a database and re-execute a query after a query has failed because of a communication issue. |
| public String | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public int | |
| public int | |
| public String | getTableCreationSuffix()
PUBLIC: Get the String used on all table creation statements generated from the DefaultTableGenerator with a session using this project (DDL generation). |
| public int | |
| public String | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | handleTransactionsManuallyForSybaseJConnect()
PUBLIC: Force EclipseLink to manually begin transactions instead of using autoCommit. |
| public boolean | |
| public boolean | |
| public boolean | isConnectionHealthValidatedOnError(DatabaseCall call, DatabaseAccessor accessor)
INTERNAL: Validate if set, or no timeout. |
| public boolean | isConnectionHealthValidatedOnError()
Overrides org. Implements org. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | isWebLogicSQLServerDBLibDriver()
PUBLIC: Return whether a WebLogic SQL Server dblib JDBC driver is being used. |
| public boolean | |
| public boolean | isWebLogicSybaseDBLibDriver()
PUBLIC: Return whether a WebLogic Sybase dblib JDBC driver is being used. |
| public boolean | isWebLogicThinClientDriver()
PUBLIC: Return whether a WebLogic thin client JDBC driver is being used. |
| public boolean | |
| public void | |
| protected boolean | oracleDriverIs(String urlPrefix)
INTERNAL: Return whether the specified Oracle JDBC driver is being used. |
| public void | setConnectionHealthValidatedOnError(boolean isConnectionHealthValidatedOnError)
PUBLIC: On an SQL Exception EclipseLink will ping the database to determine if the connection used can continue to be used for queries. |
| public void | |
| public void | setCursorCode(int cursorCode)
ADVANCED: Set the code for preparing cursored output parameters in a stored procedure |
| public void | setDatabaseName(String databaseName)
PUBLIC: The database name is required when connecting to databases that support multiple databases within a single server instance (e.g. Sybase, SQL Server). |
| public void | |
| public void | setDefaultNullValue(Class<?> type, Object value)
Overrides org. |
| public void | setDelayBetweenConnectionAttempts(int delayBetweenConnectionAttempts)
PUBLIC: Stores the number of milliseconds that EclipseLink will wait between attempts to reconnect a DatabaseConnection in the case EclipseLink is attempting to retry a query. |
| public void | setDriverClass(Class<?> driverClass)
PUBLIC: The driver class is the Java class for the JDBC driver to be used (e.g. sun.jdbc.odbc.JdbcOdbcDriver.class). |
| public void | setDriverClassName(String driverClassName)
PUBLIC: The name of the JDBC driver class to be used (e.g. "sun.jdbc.odbc.JdbcOdbcDriver"). |
| public void | setDriverURLHeader(String driverURLHeader)
PUBLIC: The driver URL header is the string predetermined by the JDBC driver to be part of the URL connection string, (e.g. "jdbc:odbc:"). |
| public void | setMaxBatchWritingSize(int maxBatchWritingSize)
PUBLIC: Allow for the max batch writing size to be set. |
| public void | setODBCDataSourceName(String dataSourceName)
PUBLIC: The data source name is required if connecting through ODBC (JDBC-ODBC, etc.). |
| public void | |
| public void | setPingSQL(String pingSQL)
PUBLIC: EclipseLink will attempt to test a connection if it encounters an exception on the connection when executing SQL. |
| public void | setQueryRetryAttemptCount(int queryRetryAttemptCount)
PUBLIC: Set the number of attempts EclipseLink should make to re-connect to a database and re-execute a query after a query has failed because of a communication issue. |
| public void | |
| public void | setShouldBindAllParameters(boolean shouldBindAllParameters)
PUBLIC: Set whether to bind all arguments to any SQL statement. |
| public void | setShouldCacheAllStatements(boolean shouldCacheAllStatements)
PUBLIC: Set whether prepared statements should be cached. |
| public void | setShouldCreateIndicesOnForeignKeys(boolean shouldCreateIndicesOnForeignKeys)
PUBLIC: Used for table creation. |
| public void | setShouldForceFieldNamesToUpperCase(boolean shouldForceFieldNamesToUpperCase)
ADVANCED: This setting can be used if the application expects upper case but the database does not return consistent case (e.g. different databases). |
| public static void | setShouldIgnoreCaseOnFieldComparisons(boolean shouldIgnoreCaseOnFieldComparisons)
ADVANCED: Allow for case in field names to be ignored as some databases are not case sensitive. |
| public void | setShouldOptimizeDataConversion(boolean value)
PUBLIC: Set whether driver level data conversion optimization is enabled. |
| public void | setShouldTrimStrings(boolean shouldTrimStrings)
PUBLIC: By default CHAR field values have trailing blanks trimmed, this can be configured. |
| public void | setStatementCacheSize(int size)
PUBLIC: If prepared statement caching is used this configures the cache size. |
| public void | |
| public void | setTableCreationSuffix(String tableCreationSuffix)
PUBLIC: Get the String used on all table creation statements generated from the DefaultTableGenerator with a session using this project (DDL generation). |
| public void | setTableQualifier(String qualifier)
Overrides org. |
| public void | setTransactionIsolation(int isolationLevel)
PUBLIC: Set the transaction isolation setting for the connection. |
| public void | |
| public void | |
| public void | setUsesByteArrayBinding(boolean value)
PUBLIC: EclipseLink can be configured to use parameter binding for large binary data. |
| public void | setUsesJDBCBatchWriting(boolean
boolean true delegates batch writing to the
JDBC driver and false delegates batch writing to EclipseLink. usesJDBCBatchWriting)PUBLIC: Calling this method with an argument of true indicates to EclipseLink that the JDBC driver supports batch writing. |
| public void | setUsesNativeSQL(boolean value)
PUBLIC: EclipseLink can be configured to use database specific sql grammar not JDBC specific. |
| public void | setUsesStreamsForBinding(boolean value)
PUBLIC: EclipseLink can be configured to use streams to store large binary data. |
| public void | |
| public boolean | |
| public boolean | shouldCacheAllStatements()
PUBLIC: Cache all prepared statements, this requires full parameter binding as well. |
| public boolean | Returns: whether an index should be created explicitly for foreign key constraintsPUBLIC: Used for table creation. |
| public boolean | shouldForceFieldNamesToUpperCase()
ADVANCED: Can be used if the app expects upper case but the database is not return consistent case, i.e. different databases. |
| public static boolean | shouldIgnoreCaseOnFieldComparisons()
ADVANCED: Allow for case in field names to be ignored as some databases are not case sensitive. |
| public boolean | shouldOptimizeDataConversion()
PUBLIC: Return if our driver level data conversion optimization is enabled. |
| public boolean | shouldTrimStrings()
PUBLIC: By default CHAR field values have trailing blanks trimmed, this can be configured. |
| public boolean | |
| public boolean | shouldUseByteArrayBinding()
PUBLIC: EclipseLink can be configured to use parameter binding for large binary data. |
| public boolean | Returns: boolean true if batch writing is delegated to the JDBC driver. Returns false if delegated to EclipseLink.PUBLIC: Answers true if EclipseLink has JDBC batch writing enabled. |
| public boolean | shouldUseNativeSequencing()
PUBLIC: EclipseLink can be configured to use a sequence table or native sequencing to generate unique object IDs. |
| public boolean | shouldUseNativeSQL()
PUBLIC: EclipseLink can be configured to use database-specific SQL grammar, as opposed to the JDBC standard grammar. |
| public boolean | shouldUseStreamsForBinding()
PUBLIC: EclipseLink can be configured to use streams to store large binary data. |
| public boolean | |
| public String | toString()
Overrides org. |
| public void | |
| public void | |
| public void | useByteArrayBinding()
PUBLIC: EclipseLink can be configured to use parameter binding for large binary data. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | useDefaultDriverConnect(String driverClassName, String driverURLHeader, String databaseURL)
PUBLIC: Connect to the JDBC driver via DriverManager. |
| public void | |
| public void | useDirectDriverConnect()
PUBLIC: Some JDBC drivers don't support connecting correctly (via DriverManager), but do support connecting incorrectly (e.g. Castanet). |
| public void | useDirectDriverConnect(String driverClassName, String driverURLHeader, String databaseURL)
PUBLIC: Some JDBC drivers don't support connecting correctly (via DriverManager), but do support connecting incorrectly (e.g. Castanet). |
| public void | useExternalConnectionPooling()
Overrides org. |
| public void | useExternalTransactionController()
Overrides org. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | useJTADataSource(String dataSource)
PUBLIC: Specify the J2EE JTA enabled DataSource name to connect to. |
| public void | |
| public void | useNativeSequencing()
PUBLIC: EclipseLink can be configured to use a sequence table or native sequencing to generate unique object IDs. |
| public void | useNativeSQL()
PUBLIC: EclipseLink can be configured to use database-specific SQL grammar, as opposed to the JDBC standard grammar. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | useStreamsForBinding()
PUBLIC: EclipseLink can be configured to use streams to store large binary data. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | useWebLogicDriverCursoredOutputCode()
PUBLIC: Set the prepare cursor code to what the WebLogic Oracle OCI JDBC driver expects. |
| public void | useWebLogicJDBCConnectionPool(String poolName)
PUBLIC: Set a WebLogic JDBC connection pool (a pool must be defined for the entity beans that are to be deployed) |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |