io.yawp.repository.Feature Maven / Gradle / Ivy
package io.yawp.repository;
import io.yawp.repository.query.QueryBuilder;
public class Feature {
protected Repository yawp;
public void setRepository(Repository yawp) {
this.yawp = yawp;
}
public QueryBuilder yawp(Class clazz) {
return yawp.query(clazz);
}
public QueryBuilder yawpWithHooks(Class clazz) {
return yawp.queryWithHooks(clazz);
}
public T feature(Class clazz) {
try {
T feature = clazz.newInstance();
feature.setRepository(yawp);
return feature;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy