- 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 String
driverClassName
(String url) boolean
driverCompatible
(String driverClassName) static DatabaseFactory
instance()
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
Database
implementation based on the given jdbc url.
-
instance
- Returns:
- a
DatabaseFactory
implementation forDatabase.DATABASE_URL
- Throws:
IllegalStateException
- in caseDatabase.DATABASE_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
DatabaseFactory
implementation 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
-