com.jaregu.database.queries.proxy.QueriesSourceResourceProducer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of queries Show documentation
Show all versions of queries Show documentation
Java based SQL templating project. Store your queries in *.sql files and build queries for execution. Supports simple expressions and conditional clauses and interface proxying for java-sql bridge.
package com.jaregu.database.queries.proxy;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import com.jaregu.database.queries.SourceId;
public class QueriesSourceResourceProducer implements SourceIdProducer {
QueriesSourceResourceProducer() {
}
@Override
public SourceId get(AnnotatedElement element, Annotation annotation) {
QueriesSourceResource sourceResource = (QueriesSourceResource) annotation;
return SourceId.ofResource(sourceResource.value());
}
}