Search in sources :

Example 1 with ColumnMappers

use of org.jdbi.v3.core.mapper.ColumnMappers in project jdbi by jdbi.

the class RegisterColumnMapperImpl method configureForType.

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

Aggregations

ColumnMappers (org.jdbi.v3.core.mapper.ColumnMappers)1 RegisterColumnMapper (org.jdbi.v3.sqlobject.config.RegisterColumnMapper)1