Package nzilbb.sql

Interface ConnectionFactory

  • All Known Implementing Classes:
    DerbyConnectionFactory, MySQLConnectionFactory

    public interface ConnectionFactory
    Interface for a factory that supplies new SQL connections and SQL Translators.
    Author:
    Robert Fromont robert@fromont.net.nz
    • Method Detail

      • newConnection

        Connection newConnection()
                          throws SQLException
        Creates a new database connection.
        Returns:
        A connected database connection.
        Throws:
        SQLException - If there's a problem connecting to the database.
      • newSQLTranslator

        MySQLTranslator newSQLTranslator()
        Constructs an SQL translator appropriate for the type of connection made by newConnection().
        Returns:
        An SQL translator.