Search in sources :

Example 1 with RegisterRowMapperFactory

use of org.jdbi.v3.sqlobject.config.RegisterRowMapperFactory in project jdbi by jdbi.

the class RegisterRowMapperFactoryImpl method configureForType.

@Override
public void configureForType(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType) {
    RegisterRowMapperFactory registerRowMapperFactory = (RegisterRowMapperFactory) annotation;
    RowMappers mappers = registry.get(RowMappers.class);
    try {
        mappers.register(registerRowMapperFactory.value().newInstance());
    } catch (Exception e) {
        throw new IllegalStateException("unable to create a specified row mapper factory", e);
    }
}
Also used : RowMappers(org.jdbi.v3.core.mapper.RowMappers) RegisterRowMapperFactory(org.jdbi.v3.sqlobject.config.RegisterRowMapperFactory)

Aggregations

RowMappers (org.jdbi.v3.core.mapper.RowMappers)1 RegisterRowMapperFactory (org.jdbi.v3.sqlobject.config.RegisterRowMapperFactory)1