public class OracleRDBMSClient extends java.lang.Object implements OracleClient
OracleClient
.
OracleDatabase
object, from which document
collections can be created and opened.
This class is thread-safe. Other API classes (implementing
OracleDatabase
, OracleCollection
,
OracleDocument
, etc) are not thread-safe
and should not be shared between different threads.
Constructor and Description |
---|
OracleRDBMSClient() |
OracleRDBMSClient(java.util.Properties props)
The following properties are currently supported:
|
Modifier and Type | Method and Description |
---|---|
OracleRDBMSMetadataBuilder |
createMetadataBuilder()
Creates an
OracleRDBMSMetadataBuilder initialized with default
collection metadata settings. |
OracleDatabase |
getDatabase(java.sql.Connection connection)
Gets the document collections database.
|
OracleDatabase |
getDatabase(java.sql.Connection connection,
boolean avoidTxnManagement)
Gets the document collections database.
|
public OracleRDBMSClient()
public OracleRDBMSClient(java.util.Properties props)
oracle.soda.sharedMetadataCache
- if set to true
,
the shared cache of collection
metadata will be turned on.
oracle.soda.localMetadataCache
- if set to true
,
the local cache of collection
metadata will be turned on.
props
- Properties
object,
populated with 0 or more of the
supported properties and their values.public OracleDatabase getDatabase(java.sql.Connection connection) throws OracleException
The same JDBC connection should not be used to back more than
one OracleDatabase
getDatabase
in interface OracleClient
connection
- JDBC connection.The passed in JDBC
connection must be an instance of
oracle.jdbc.OracleConnection
OracleException
- if there's an error getting the
databasepublic OracleDatabase 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
getDatabase
in interface OracleClient
connection
- JDBC connection.The passed in JDBC
connection must be an instance of
oracle.jdbc.OracleConnection
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 databasepublic OracleRDBMSMetadataBuilder createMetadataBuilder()
OracleRDBMSMetadataBuilder
initialized with default
collection metadata settings.OracleDatabaseAdmin.createCollection(String, oracle.soda.OracleDocument)