public interface OracleClient
OracleDatabase
object.
An implementation must provide a public class implementing this
interface, that the user application is able to instantiate. For
example, for the Oracle RDBMS implementation of SODA, this
class is OracleRDBMSClient
.
Then, a SODA application would obtain an instance of OracleClient
as follows:
OracleClient cl = new OracleRDBMSClient();
Modifier and Type | Method and Description |
---|---|
OracleDatabase |
getDatabase(java.sql.Connection connection)
Gets the document collections database.
|
OracleDatabase |
getDatabase(java.sql.Connection connection,
boolean avoidTxnManagement)
Gets the document collections database.
|
OracleDatabase getDatabase(java.sql.Connection connection) throws OracleException
The same JDBC connection should not be used to back more than
one OracleDatabase
connection
- JDBC connection. Some SODA implementations
(e.g. non-JDBC based) can accept
null
as a valid parameter.OracleException
- if there's an error getting the databaseOracleDatabase getDatabase(java.sql.Connection connection, boolean avoidTxnManagement) throws OracleException
getDatabase(Connection)
, except
it also provides the avoidTxnManagement
flag. If this flag is set to true
SODA will report
an error for any operation that requires
transaction management. This is useful when running
distributed transactions, to ensure that SODA's local
transaction management does not interfere with global
transaction decisions. Note: unless you're performing
distributed transactions, you should not use this
method. Instead, use getDatabase(Connection)
.
The same JDBC connection should not be used to back more than
one OracleDatabase
connection
- JDBC connection. Some SODA implementations
(e.g. non-JDBC based) can accept
null
as a valid parameter.avoidTxnManagement
- flag specifying whether to avoid transaction
management. If set to true
,
an error will be thrown if a SODA operation
requires transaction management. If set to
false
, it has no effect.OracleException
- if there's an error getting the database