Class OracleRDBMSClient
- java.lang.Object
-
- oracle.soda.rdbms.OracleRDBMSClient
-
- All Implemented Interfaces:
OracleClient
public class OracleRDBMSClient extends Object implements OracleClient
Oracle RDBMS implementation ofOracleClient
.
Entry point to the SODA API. Provides a way to get anOracleDatabase
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 Summary
Constructors Constructor Description OracleRDBMSClient()
OracleRDBMSClient(Properties props)
The following properties are currently supported:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OracleRDBMSMetadataBuilder
createMetadataBuilder()
Creates anOracleRDBMSMetadataBuilder
initialized with default collection metadata settings.OracleDatabase
getDatabase(Connection connection)
Gets the document collections database.OracleDatabase
getDatabase(Connection connection, boolean avoidTxnManagement)
Gets the document collections database.
-
-
-
Constructor Detail
-
OracleRDBMSClient
public OracleRDBMSClient()
-
OracleRDBMSClient
public OracleRDBMSClient(Properties props)
The following properties are currently supported:oracle.soda.sharedMetadataCache
- if set totrue
, the shared cache of collection metadata will be turned on.oracle.soda.localMetadataCache
- if set totrue
, the local cache of collection metadata will be turned on.- Parameters:
props
-Properties
object, populated with 0 or more of the supported properties and their values.
-
-
Method Detail
-
getDatabase
public OracleDatabase getDatabase(Connection connection) throws OracleException
Gets the document collections database.The same JDBC connection should not be used to back more than one
OracleDatabase
- Specified by:
getDatabase
in interfaceOracleClient
- Parameters:
connection
- JDBC connection.The passed in JDBC connection must be an instance oforacle.jdbc.OracleConnection
- Returns:
- document collections database
- Throws:
OracleException
- if there's an error getting the database
-
getDatabase
public OracleDatabase getDatabase(Connection connection, boolean avoidTxnManagement) throws OracleException
Gets the document collections database. This method serves the same purpose asgetDatabase(Connection)
, except it also provides theavoidTxnManagement
flag. If this flag is set totrue
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, usegetDatabase(Connection)
.The same JDBC connection should not be used to back more than one
OracleDatabase
- Specified by:
getDatabase
in interfaceOracleClient
- Parameters:
connection
- JDBC connection.The passed in JDBC connection must be an instance oforacle.jdbc.OracleConnection
avoidTxnManagement
- flag specifying whether to avoid transaction management. If set totrue
, an error will be thrown if a SODA operation requires transaction management. If set tofalse
, it has no effect.- Returns:
- document collections database
- Throws:
OracleException
- if there's an error getting the database
-
createMetadataBuilder
public OracleRDBMSMetadataBuilder createMetadataBuilder()
Creates anOracleRDBMSMetadataBuilder
initialized with default collection metadata settings.- Returns:
- a collection metadata builder
- See Also:
OracleDatabaseAdmin.createCollection(String, oracle.soda.OracleDocument)
-
-