Package de.hshannover.dqgui.engine
Class PostgresEngine
- java.lang.Object
-
- de.hshannover.dqgui.execution.database.api.DatabaseEngine
-
- de.hshannover.dqgui.engine.PostgresEngine
-
public class PostgresEngine extends DatabaseEngine
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPostgresEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowUseForIqm4hd()booleanallowUseForRepository()java.lang.StringcreateDataSourceUrl(DatabaseConnection connection)Creates a JDBC data source URL that is used to create the JDBC connection.
If the engine does not support JDBC this should return null.DatabaseFetchercreateFetcher(DatabaseConnection connection)Returns a fetcher implementation for the database engine.
JDBC supported engines can redirect to theJdbcFetcher.protected Repository<?>createRepositoryForConnection(DatabaseConnection connection)If your database supports a database backed repository create the repository object here.booleanisRelational()protected voidloadDatabaseDriver()If you need to load database drivers, here is your chance.
Some JDBC drivers need to be loaded with Class.forName() to register with the JDBC driver manager.java.lang.Stringname()booleansupportsJdbc()DatabaseTests.DatabaseTestResulttest(DatabaseConnection connection)Runs a test for the supplied connection.
JDBC supported engines can redirect to the-
Methods inherited from class de.hshannover.dqgui.execution.database.api.DatabaseEngine
createRepository, defaultPort, equals, guiConfiguration, hashCode, language, registerGuiSupport, registerIdentifier, registerLanguage, registerPort, registerRepositorySupport, requestRepositorySupport, toString, uniqueIdentifier
-
-
-
-
Method Detail
-
loadDatabaseDriver
protected void loadDatabaseDriver() throws java.lang.ClassNotFoundExceptionDescription copied from class:DatabaseEngineIf you need to load database drivers, here is your chance.
Some JDBC drivers need to be loaded with Class.forName() to register with the JDBC driver manager.- Specified by:
loadDatabaseDriverin classDatabaseEngine- Throws:
java.lang.ClassNotFoundException
-
createFetcher
public DatabaseFetcher createFetcher(DatabaseConnection connection)
Description copied from class:DatabaseEngineReturns a fetcher implementation for the database engine.
JDBC supported engines can redirect to theJdbcFetcher.- Specified by:
createFetcherin classDatabaseEngine- Parameters:
connection- to create fetcher for.- Returns:
- fetcher that can fetch for the engine.
-
name
public java.lang.String name()
- Specified by:
namein classDatabaseEngine- Returns:
- how the engine should be displayed in the UI. This will affect alphabetic sorting.
-
isRelational
public boolean isRelational()
- Specified by:
isRelationalin classDatabaseEngine- Returns:
- true if the engine is relational
-
allowUseForRepository
public boolean allowUseForRepository()
- Specified by:
allowUseForRepositoryin classDatabaseEngine- Returns:
- true if this engine should be used for the repository
-
allowUseForIqm4hd
public boolean allowUseForIqm4hd()
- Specified by:
allowUseForIqm4hdin classDatabaseEngine- Returns:
- true if this engine should be used for iqm4hd
-
supportsJdbc
public boolean supportsJdbc()
- Specified by:
supportsJdbcin classDatabaseEngine- Returns:
- true if JDBC is supported
-
createDataSourceUrl
public java.lang.String createDataSourceUrl(DatabaseConnection connection)
Description copied from class:DatabaseEngineCreates a JDBC data source URL that is used to create the JDBC connection.
If the engine does not support JDBC this should return null.- Specified by:
createDataSourceUrlin classDatabaseEngine- Parameters:
connection- to create the data source URL for- Returns:
- a data source URL ready to use with the JDBC driver manager
-
test
public DatabaseTests.DatabaseTestResult test(DatabaseConnection connection)
Description copied from class:DatabaseEngineRuns a test for the supplied connection.
JDBC supported engines can redirect to the- Specified by:
testin classDatabaseEngine- Parameters:
connection- to test for- Returns:
- a
DatabaseTests.DatabaseTestResultinforming about the outcome
-
createRepositoryForConnection
protected Repository<?> createRepositoryForConnection(DatabaseConnection connection)
Description copied from class:DatabaseEngineIf your database supports a database backed repository create the repository object here.- Specified by:
createRepositoryForConnectionin classDatabaseEngine- Parameters:
connection- to create repo for- Returns:
- a repository if supported or null
-
-