use of org.jdbi.v3.core.mapper.ColumnMapperFactory in project jdbi by jdbi.
the class RegisterColumnMapperFactoryImpl method configureForType.
@Override
public void configureForType(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType) {
RegisterColumnMapperFactory registerColumnMapperFactory = (RegisterColumnMapperFactory) annotation;
try {
ColumnMapperFactory factory = registerColumnMapperFactory.value().newInstance();
registry.get(ColumnMappers.class).register(factory);
} catch (Exception e) {
throw new IllegalStateException("unable to create a specified column mapper factory", e);
}
}
Aggregations