use of org.jdbi.v3.core.config.ConfigRegistry in project jdbi by jdbi.
the class RegisterRowMapperFactoriesImpl method configureForType.
@Override
public void configureForType(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType) {
Configurer delegate = new RegisterRowMapperFactoryImpl();
RegisterRowMapperFactories registerRowMapperFactories = (RegisterRowMapperFactories) annotation;
Stream.of(registerRowMapperFactories.value()).forEach(anno -> delegate.configureForType(registry, anno, sqlObjectType));
}
use of org.jdbi.v3.core.config.ConfigRegistry in project jdbi by jdbi.
the class UseSqlParserImpl method configureForMethod.
@Override
public void configureForMethod(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType, Method method) {
UseSqlParser anno = (UseSqlParser) annotation;
try {
final SqlParser parser = instantiate(anno.value(), sqlObjectType, method);
registry.get(SqlStatements.class).setSqlParser(parser);
} catch (Exception e) {
throw new IllegalStateException(e);
}
}
use of org.jdbi.v3.core.config.ConfigRegistry in project jdbi by jdbi.
the class UseTemplateEngineImpl method configureForMethod.
@Override
public void configureForMethod(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType, Method method) {
UseTemplateEngine anno = (UseTemplateEngine) annotation;
try {
final TemplateEngine templateEngine = instantiate(anno.value(), sqlObjectType, method);
registry.get(SqlStatements.class).setTemplateEngine(templateEngine);
} catch (Exception e) {
throw new IllegalStateException(e);
}
}
use of org.jdbi.v3.core.config.ConfigRegistry in project jdbi by jdbi.
the class KeyColumnImpl method configureForMethod.
@Override
public void configureForMethod(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType, Method method) {
KeyColumn keyColumn = (KeyColumn) annotation;
String name = keyColumn.value();
registry.get(MapEntryMappers.class).setKeyColumn(name.isEmpty() ? null : name);
}
use of org.jdbi.v3.core.config.ConfigRegistry in project jdbi by jdbi.
the class RegisterArgumentFactoriesImpl method configureForType.
@Override
public void configureForType(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType) {
Configurer delegate = new RegisterArgumentFactoryImpl();
RegisterArgumentFactories factories = (RegisterArgumentFactories) annotation;
Stream.of(factories.value()).forEach(anno -> delegate.configureForType(registry, anno, sqlObjectType));
}
Aggregations