public class DefaultJdbiFactory extends AbstractObjectFactory<org.skife.jdbi.v2.DBI> implements JdbiFactory
KEY_DEFAULT
Constructor and Description |
---|
DefaultJdbiFactory(Configuration configuration,
GriffonApplication application) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeDataSource(String dataSourceName) |
org.skife.jdbi.v2.DBI |
create(String name) |
protected org.skife.jdbi.v2.DBI |
createDBI(String dataSourceName) |
void |
destroy(String name,
org.skife.jdbi.v2.DBI instance) |
Map<String,Object> |
getConfigurationFor(String datasourceName) |
protected DataSource |
getDataSource(String dataSourceName) |
Set<String> |
getDatasourceNames() |
protected String |
getPluralKey() |
protected String |
getSingleKey() |
event, getApplication, getConfiguration, narrowConfig
@Inject public DefaultJdbiFactory(@Nonnull @Named(value="datasource") Configuration configuration, @Nonnull GriffonApplication application)
@Nonnull public Set<String> getDatasourceNames()
getDatasourceNames
in interface JdbiFactory
@Nonnull public Map<String,Object> getConfigurationFor(@Nonnull String datasourceName)
getConfigurationFor
in interface JdbiFactory
@Nonnull protected String getSingleKey()
getSingleKey
in class AbstractObjectFactory<org.skife.jdbi.v2.DBI>
@Nonnull protected String getPluralKey()
getPluralKey
in class AbstractObjectFactory<org.skife.jdbi.v2.DBI>
@Nonnull public org.skife.jdbi.v2.DBI create(@Nonnull String name)
create
in interface ObjectFactory<org.skife.jdbi.v2.DBI>
public void destroy(@Nonnull String name, @Nonnull org.skife.jdbi.v2.DBI instance)
destroy
in interface ObjectFactory<org.skife.jdbi.v2.DBI>
@Nonnull protected DataSource getDataSource(@Nonnull String dataSourceName)