Package oracle.soda
Interface OracleClient
-
- All Known Implementing Classes:
OracleRDBMSClient
public interface OracleClient
Entry point for SODA (Simple Oracle Document Access). Provides a way to get anOracleDatabase
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 ofOracleClient
as follows:OracleClient cl = new OracleRDBMSClient();
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OracleDatabase
getDatabase(Connection connection)
Gets the document collections database.OracleDatabase
getDatabase(Connection connection, boolean avoidTxnManagement)
Gets the document collections database.
-
-
-
Method Detail
-
getDatabase
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
- Parameters:
connection
- JDBC connection. Some SODA implementations (e.g. non-JDBC based) can acceptnull
as a valid parameter.- Returns:
- document collections database
- Throws:
OracleException
- if there's an error getting the database
-
getDatabase
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
- Parameters:
connection
- JDBC connection. Some SODA implementations (e.g. non-JDBC based) can acceptnull
as a valid parameter.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
-
-