org.springframework.data.jpa.repository.query
Class JpaCountQueryCreator
java.lang.Object
org.springframework.data.repository.query.parser.AbstractQueryCreator<javax.persistence.criteria.CriteriaQuery<Object>,javax.persistence.criteria.Predicate>
org.springframework.data.jpa.repository.query.JpaQueryCreator
org.springframework.data.jpa.repository.query.JpaCountQueryCreator
public class JpaCountQueryCreator
- extends JpaQueryCreator
Special JpaQueryCreator
that creates a count projecting query.
- Author:
- Oliver Gierke
Constructor Summary |
JpaCountQueryCreator(org.springframework.data.repository.query.parser.PartTree tree,
org.springframework.data.repository.query.ParameterAccessor parameters,
Class<?> domainClass,
javax.persistence.EntityManager em)
Creates a new JpaCountQueryCreator . |
Method Summary |
protected javax.persistence.criteria.CriteriaQuery<Object> |
complete(javax.persistence.criteria.Predicate predicate,
org.springframework.data.domain.Sort sort,
javax.persistence.criteria.CriteriaQuery<Object> query,
javax.persistence.criteria.CriteriaBuilder builder,
javax.persistence.criteria.Root<?> root)
Template method to finalize the given Predicate using the given
CriteriaQuery and CriteriaBuilder . |
Methods inherited from class org.springframework.data.repository.query.parser.AbstractQueryCreator |
createQuery |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JpaCountQueryCreator
public JpaCountQueryCreator(org.springframework.data.repository.query.parser.PartTree tree,
org.springframework.data.repository.query.ParameterAccessor parameters,
Class<?> domainClass,
javax.persistence.EntityManager em)
- Creates a new
JpaCountQueryCreator
.
- Parameters:
tree
- parameters
- domainClass
- em
-
complete
protected javax.persistence.criteria.CriteriaQuery<Object> complete(javax.persistence.criteria.Predicate predicate,
org.springframework.data.domain.Sort sort,
javax.persistence.criteria.CriteriaQuery<Object> query,
javax.persistence.criteria.CriteriaBuilder builder,
javax.persistence.criteria.Root<?> root)
- Description copied from class:
JpaQueryCreator
- Template method to finalize the given
Predicate
using the given
CriteriaQuery
and CriteriaBuilder
.
- Overrides:
complete
in class JpaQueryCreator
- Returns:
Copyright © 2011 SpringSource. All Rights Reserved.