use of org.jdbi.v3.sqlobject.config.UseTemplateEngine in project jdbi by jdbi.
the class UseTemplateEngineImpl method configureForType.
@Override
public void configureForType(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType) {
UseTemplateEngine anno = (UseTemplateEngine) annotation;
try {
final TemplateEngine templateEngine = instantiate(anno.value(), sqlObjectType, null);
registry.get(SqlStatements.class).setTemplateEngine(templateEngine);
} catch (Exception e) {
throw new IllegalStateException(e);
}
}
use of org.jdbi.v3.sqlobject.config.UseTemplateEngine 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);
}
}
Aggregations