Search in sources :

Example 1 with LowerToCamelBeanMapperFactory

use of org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory in project killbill by killbill.

the class TestCatalogOverridePhaseDefinitionSqlDao method beforeClass.

@BeforeClass(groups = "slow")
public void beforeClass() throws Exception {
    super.beforeClass();
    ((DBI) dbi).registerMapper(new LowerToCamelBeanMapperFactory(CatalogOverridePhaseDefinitionModelDao.class));
}
Also used : LowerToCamelBeanMapperFactory(org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory) DBI(org.skife.jdbi.v2.DBI) BeforeClass(org.testng.annotations.BeforeClass)

Example 2 with LowerToCamelBeanMapperFactory

use of org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory in project killbill by killbill.

the class TestCatalogOverridePlanDefinitionSqlDao method beforeClass.

@BeforeClass(groups = "slow")
public void beforeClass() throws Exception {
    super.beforeClass();
    ((DBI) dbi).registerMapper(new LowerToCamelBeanMapperFactory(CatalogOverridePlanDefinitionModelDao.class));
}
Also used : LowerToCamelBeanMapperFactory(org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory) DBI(org.skife.jdbi.v2.DBI) BeforeClass(org.testng.annotations.BeforeClass)

Example 3 with LowerToCamelBeanMapperFactory

use of org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory in project killbill by killbill.

the class TestCatalogOverridePlanPhaseSqlDao method beforeClass.

@BeforeClass(groups = "slow")
public void beforeClass() throws Exception {
    super.beforeClass();
    ((DBI) dbi).registerMapper(new LowerToCamelBeanMapperFactory(CatalogOverridePlanPhaseModelDao.class));
}
Also used : LowerToCamelBeanMapperFactory(org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory) DBI(org.skife.jdbi.v2.DBI) BeforeClass(org.testng.annotations.BeforeClass)

Example 4 with LowerToCamelBeanMapperFactory

use of org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory in project killbill by killbill.

the class KillbillServerModule method configureDao.

@Override
protected void configureDao() {
    super.configureDao();
    final Multibinder<ResultSetMapperFactory> resultSetMapperFactorySetBinder = Multibinder.newSetBinder(binder(), ResultSetMapperFactory.class);
    resultSetMapperFactorySetBinder.addBinding().toInstance(new LowerToCamelBeanMapperFactory(SessionModelDao.class));
    final Multibinder<ResultSetMapper> resultSetMapperSetBinder = Multibinder.newSetBinder(binder(), ResultSetMapper.class);
    resultSetMapperSetBinder.addBinding().to(AuditLogModelDaoMapper.class).asEagerSingleton();
    resultSetMapperSetBinder.addBinding().to(RecordIdIdMappingsMapper.class).asEagerSingleton();
}
Also used : SessionModelDao(org.killbill.billing.util.security.shiro.dao.SessionModelDao) ResultSetMapperFactory(org.skife.jdbi.v2.ResultSetMapperFactory) RecordIdIdMappingsMapper(org.killbill.billing.util.dao.RecordIdIdMappingsMapper) ResultSetMapper(org.skife.jdbi.v2.tweak.ResultSetMapper) LowerToCamelBeanMapperFactory(org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory) AuditLogModelDaoMapper(org.killbill.billing.util.dao.AuditLogModelDaoMapper)

Example 5 with LowerToCamelBeanMapperFactory

use of org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory in project killbill by killbill.

the class DBTestingHelper method getDBI.

@Override
public IDBI getDBI() {
    final DBI dbi = (DBI) super.getDBI();
    // Register KB specific mappers
    if (initialized.compareAndSet(false, true)) {
        dbi.registerMapper(new AuditLogModelDaoMapper());
        dbi.registerMapper(new RecordIdIdMappingsMapper());
        dbi.registerMapper(new LowerToCamelBeanMapperFactory(SessionModelDao.class));
    }
    return dbi;
}
Also used : SessionModelDao(org.killbill.billing.util.security.shiro.dao.SessionModelDao) RecordIdIdMappingsMapper(org.killbill.billing.util.dao.RecordIdIdMappingsMapper) LowerToCamelBeanMapperFactory(org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory) IDBI(org.skife.jdbi.v2.IDBI) DBI(org.skife.jdbi.v2.DBI) AuditLogModelDaoMapper(org.killbill.billing.util.dao.AuditLogModelDaoMapper)

Aggregations

LowerToCamelBeanMapperFactory (org.killbill.commons.jdbi.mapper.LowerToCamelBeanMapperFactory)5 DBI (org.skife.jdbi.v2.DBI)4 BeforeClass (org.testng.annotations.BeforeClass)3 AuditLogModelDaoMapper (org.killbill.billing.util.dao.AuditLogModelDaoMapper)2 RecordIdIdMappingsMapper (org.killbill.billing.util.dao.RecordIdIdMappingsMapper)2 SessionModelDao (org.killbill.billing.util.security.shiro.dao.SessionModelDao)2 IDBI (org.skife.jdbi.v2.IDBI)1 ResultSetMapperFactory (org.skife.jdbi.v2.ResultSetMapperFactory)1 ResultSetMapper (org.skife.jdbi.v2.tweak.ResultSetMapper)1