- All Known Implementing Classes:
Db2DatabaseFactory,DerbyDatabaseFactory,H2DatabaseFactory,HSQLDatabaseFactory,MariaDBDatabaseFactory,MySQLDatabaseFactory,OracleDatabaseFactory,PostgreSQLDatabaseFactory,SQLiteDatabaseFactory,SQLServerDatabaseFactory
public interface DatabaseFactory
Provides
Database implementations- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringdriverClassName(String url) booleandriverCompatible(String driverClassName) static DatabaseFactoryinstance()static DatabaseFactory
-
Method Details
-
driverCompatible
- Parameters:
driverClassName- the driver class name- Returns:
- true if this database factory is compatible with the given driver
-
create
- Parameters:
url- the jdbc url- Returns:
- a new
Databaseimplementation based on the given jdbc url.
-
instance
- Returns:
- a
DatabaseFactoryimplementation forDatabase.URL - Throws:
IllegalStateException- in caseDatabase.URL('codion.db.url') is not specified.SQLException- in case loading of the database driver failedIllegalArgumentException- in case no implementation exists for the configured jdbc url
-
instance
- Parameters:
url- the jdbc url- Returns:
- a
DatabaseFactoryimplementation for the given jdbc url - Throws:
SQLException- in case loading of database driver failedIllegalArgumentException- in case no implementation exists for the given jdbc url
-
driverClassName
- Parameters:
url- the jdbc url- Returns:
- the database driver class name according to jdbc url
- Throws:
SQLException- in case loading of database driver failed
-