Spring Data Jpa

org.springframework.data.jpa.repository.query
Class JpaCountQueryCreator

java.lang.Object
  extended by org.springframework.data.repository.query.parser.AbstractQueryCreator<javax.persistence.criteria.CriteriaQuery<Object>,javax.persistence.criteria.Predicate>
      extended by org.springframework.data.jpa.repository.query.JpaQueryCreator
          extended by 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(PartTree tree, Class<?> domainClass, javax.persistence.criteria.CriteriaBuilder builder, org.springframework.data.jpa.repository.query.ParameterMetadataProvider provider)
          Creates a new JpaCountQueryCreator.
 
Method Summary
protected  javax.persistence.criteria.CriteriaQuery<Object> complete(javax.persistence.criteria.Predicate predicate, 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.jpa.repository.query.JpaQueryCreator
and, complete, create, getParameterExpressions, or
 
Methods inherited from class org.springframework.data.repository.query.parser.AbstractQueryCreator
createQuery, createQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpaCountQueryCreator

public JpaCountQueryCreator(PartTree tree,
                            Class<?> domainClass,
                            javax.persistence.criteria.CriteriaBuilder builder,
                            org.springframework.data.jpa.repository.query.ParameterMetadataProvider provider)
Creates a new JpaCountQueryCreator.

Parameters:
tree -
domainClass -
parameters -
em -
Method Detail

complete

protected javax.persistence.criteria.CriteriaQuery<Object> complete(javax.persistence.criteria.Predicate predicate,
                                                                    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:

Spring Data Jpa

Copyright © 2011-2012 SpringSource. All Rights Reserved.