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 protected
PostgresEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowUseForIqm4hd()
boolean
allowUseForRepository()
java.lang.String
createDataSourceUrl(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.DatabaseFetcher
createFetcher(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.boolean
isRelational()
protected void
loadDatabaseDriver()
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.String
name()
boolean
supportsJdbc()
DatabaseTests.DatabaseTestResult
test(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.ClassNotFoundException
Description copied from class:DatabaseEngine
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.- Specified by:
loadDatabaseDriver
in classDatabaseEngine
- Throws:
java.lang.ClassNotFoundException
-
createFetcher
public DatabaseFetcher createFetcher(DatabaseConnection connection)
Description copied from class:DatabaseEngine
Returns a fetcher implementation for the database engine.
JDBC supported engines can redirect to theJdbcFetcher
.- Specified by:
createFetcher
in classDatabaseEngine
- Parameters:
connection
- to create fetcher for.- Returns:
- fetcher that can fetch for the engine.
-
name
public java.lang.String name()
- Specified by:
name
in classDatabaseEngine
- Returns:
- how the engine should be displayed in the UI. This will affect alphabetic sorting.
-
isRelational
public boolean isRelational()
- Specified by:
isRelational
in classDatabaseEngine
- Returns:
- true if the engine is relational
-
allowUseForRepository
public boolean allowUseForRepository()
- Specified by:
allowUseForRepository
in classDatabaseEngine
- Returns:
- true if this engine should be used for the repository
-
allowUseForIqm4hd
public boolean allowUseForIqm4hd()
- Specified by:
allowUseForIqm4hd
in classDatabaseEngine
- Returns:
- true if this engine should be used for iqm4hd
-
supportsJdbc
public boolean supportsJdbc()
- Specified by:
supportsJdbc
in classDatabaseEngine
- Returns:
- true if JDBC is supported
-
createDataSourceUrl
public java.lang.String createDataSourceUrl(DatabaseConnection connection)
Description copied from class:DatabaseEngine
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.- Specified by:
createDataSourceUrl
in 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:DatabaseEngine
Runs a test for the supplied connection.
JDBC supported engines can redirect to the- Specified by:
test
in classDatabaseEngine
- Parameters:
connection
- to test for- Returns:
- a
DatabaseTests.DatabaseTestResult
informing about the outcome
-
createRepositoryForConnection
protected Repository<?> createRepositoryForConnection(DatabaseConnection connection)
Description copied from class:DatabaseEngine
If your database supports a database backed repository create the repository object here.- Specified by:
createRepositoryForConnection
in classDatabaseEngine
- Parameters:
connection
- to create repo for- Returns:
- a repository if supported or null
-
-