Class DatabaseModule
java.lang.Object
com.google.inject.AbstractModule
org.eclipse.dirigible.commons.api.module.AbstractDirigibleModule
org.eclipse.dirigible.database.api.DatabaseModule
- All Implemented Interfaces:
com.google.inject.Module
public class DatabaseModule extends AbstractDirigibleModule
Module for managing Database instantiation and binding.
-
Field Summary
Fields inherited from class org.eclipse.dirigible.commons.api.module.AbstractDirigibleModule
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY -
Constructor Summary
Constructors Constructor Description DatabaseModule() -
Method Summary
Modifier and Type Method Description protected voidconfigure()static List<String>getDatabaseTypes()Gets the database types.static DataSourcegetDataSource(String type, String datasource)Gets the data source.static Set<String>getDataSources(String type)Gets the data sources.StringgetName()Methods inherited from class org.eclipse.dirigible.commons.api.module.AbstractDirigibleModule
getPriorityMethods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Constructor Details
-
DatabaseModule
public DatabaseModule()
-
-
Method Details
-
configure
protected void configure()- Overrides:
configurein classcom.google.inject.AbstractModule
-
getName
- Specified by:
getNamein classAbstractDirigibleModule
-
getDataSource
Gets the data source.- Parameters:
type- the typedatasource- the datasource- Returns:
- the data source
-
getDatabaseTypes
Gets the database types.- Returns:
- the database types
-
getDataSources
Gets the data sources.- Parameters:
type- the type- Returns:
- the data sources
-