io.katharsis.jpa.internal.query.backend.criteria.JpaCriteriaQueryImpl Maven / Gradle / Ivy
package io.katharsis.jpa.internal.query.backend.criteria;
import java.util.List;
import java.util.Map;
import javax.persistence.EntityManager;
import javax.persistence.criteria.CriteriaQuery;
import io.katharsis.jpa.internal.meta.MetaLookup;
import io.katharsis.jpa.internal.query.AbstractJpaQueryImpl;
import io.katharsis.jpa.internal.query.ComputedAttributeRegistryImpl;
import io.katharsis.jpa.query.criteria.JpaCriteriaQuery;
public class JpaCriteriaQueryImpl extends AbstractJpaQueryImpl>
implements JpaCriteriaQuery {
public JpaCriteriaQueryImpl(MetaLookup metaLookup, EntityManager em, Class clazz,
ComputedAttributeRegistryImpl virtualAttrs) {
super(metaLookup, em, clazz, virtualAttrs);
}
public JpaCriteriaQueryImpl(MetaLookup metaLookup, EntityManager em, Class> clazz,
ComputedAttributeRegistryImpl virtualAttrs, String attrName, List> entityIds) {
super(metaLookup, em, clazz, virtualAttrs, attrName, entityIds);
}
public CriteriaQuery buildQuery() {
return buildExecutor().getQuery();
}
@Override
public JpaCriteriaQueryExecutorImpl buildExecutor() {
return (JpaCriteriaQueryExecutorImpl) super.buildExecutor();
}
@Override
protected JpaCriteriaQueryBackend newBackend() {
return new JpaCriteriaQueryBackend<>(this, em, clazz, parentEntityClass, parentAttr, parentIdSelection);
}
@Override
protected JpaCriteriaQueryExecutorImpl newExecutor(JpaCriteriaQueryBackend ctx, int numAutoSelections, Map selectionBindings) {
return new JpaCriteriaQueryExecutorImpl<>(em, meta, ctx.getCriteriaQuery(), numAutoSelections, selectionBindings);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy