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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Connection
newConnection()
Creates a new database connection.MySQLTranslator
newSQLTranslator()
Constructs an SQL translator appropriate for the type of connection made bynewConnection()
.
-
-
-
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 bynewConnection()
.- Returns:
- An SQL translator.
-
-