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 an 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();
     
    • 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 accept null 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 as 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

        Parameters:
        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.
        Returns:
        document collections database
        Throws:
        OracleException - if there's an error getting the database