Class DatabaseConnectionFactory


  • public class DatabaseConnectionFactory
    extends Object
    Factory for database connections.
    • Method Detail

      • connect

        @Deprecated
        public static DatabaseConnection connect​(com.redwood.scheduler.api.model.Credential c)
                                          throws SQLException
        Deprecated.
        Use Database.connect(com.redwood.scheduler.api.model.Credential) instead.
        Connect to a database using a Credential.

        The endpoint and the partition of the credential must match name and partition of the Database, you want to connect to.

        Parameters:
        c - the credential to use.
        Returns:
        a connection.
        Throws:
        SQLException - if a connection cannot be made.
      • connect

        @Deprecated
        public static DatabaseConnection connect​(com.redwood.scheduler.api.model.Credential c,
                                                 boolean setPLSQLJobContext)
                                          throws SQLException
        Deprecated.
        Use Database.createDatabaseConnectionBuilder() instead.
        Connect to a database using a Credential.

        The endpoint and the partition of the credential must match name and partition of the Database, you want to connect to.

        Parameters:
        c - the credential to use.
        setPLSQLJobContext - should the job ID of the current context be passed to the PL/SQL API?
        Returns:
        a connection.
        Throws:
        SQLException - if a connection cannot be made.
      • connect

        @Deprecated
        public static DatabaseConnection connect​(com.redwood.scheduler.api.model.Credential c,
                                                 Map<String,​?> options)
                                          throws SQLException
        Deprecated.
        Use Database.createDatabaseConnectionBuilder() instead.
        Connect to a database using a Credential.

        The endpoint and the partition of the credential must match name and partition of the Database, you want to connect to.

        Parameters:
        c - the credential to use.
        options - ignored, see OPTION_LOGGER
        Returns:
        a connection.
        Throws:
        SQLException - if a connection cannot be made.
      • connect

        @Deprecated
        public static DatabaseConnection connect​(com.redwood.scheduler.api.model.Credential c,
                                                 Map<String,​?> options,
                                                 boolean setPLSQLJobContext)
                                          throws SQLException
        Deprecated.
        Use Database.createDatabaseConnectionBuilder() instead.
        Connect to a database using a Credential.

        The endpoint and the partition of the credential must match name and partition of the Database, you want to connect to.

        Parameters:
        c - the credential to use.
        options - ignored, see OPTION_LOGGER
        setPLSQLJobContext - should the job ID of the current context be passed to the PL/SQL API?
        Returns:
        a connection.
        Throws:
        SQLException - if a connection cannot be made.