Apache CXF API

org.apache.cxf.jaxrs.ext.search.jpa
Class JPACriteriaQueryVisitor<T,E>

java.lang.Object
  extended by org.apache.cxf.jaxrs.ext.search.visitor.AbstractSearchConditionVisitor<T,E>
      extended by org.apache.cxf.jaxrs.ext.search.jpa.AbstractJPATypedQueryVisitor<T,E,javax.persistence.criteria.CriteriaQuery<E>>
          extended by org.apache.cxf.jaxrs.ext.search.jpa.JPACriteriaQueryVisitor<T,E>
All Implemented Interfaces:
SearchConditionVisitor<T,javax.persistence.criteria.CriteriaQuery<E>>

public class JPACriteriaQueryVisitor<T,E>
extends AbstractJPATypedQueryVisitor<T,E,javax.persistence.criteria.CriteriaQuery<E>>


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.cxf.jaxrs.ext.search.visitor.AbstractSearchConditionVisitor
AbstractSearchConditionVisitor.ClassValue
 
Constructor Summary
JPACriteriaQueryVisitor(javax.persistence.EntityManager em, Class<T> tClass, Class<E> queryClass)
           
JPACriteriaQueryVisitor(javax.persistence.EntityManager em, Class<T> tClass, Class<E> queryClass, List<String> joinProps)
           
JPACriteriaQueryVisitor(javax.persistence.EntityManager em, Class<T> tClass, Class<E> queryClass, Map<String,String> fieldMap)
           
JPACriteriaQueryVisitor(javax.persistence.EntityManager em, Class<T> tClass, Class<E> queryClass, Map<String,String> fieldMap, List<String> joinProps)
           
 
Method Summary
 Long count()
           
 javax.persistence.TypedQuery<E> getArrayTypedQuery(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)
           
 javax.persistence.TypedQuery<E> getConstructTypedQuery(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)
           
 javax.persistence.TypedQuery<E> getOrderedTypedQuery(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes, boolean asc)
           
 javax.persistence.criteria.CriteriaQuery<E> getQuery()
          Return a built query object
 javax.persistence.TypedQuery<E> getTupleTypedQuery(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)
           
 javax.persistence.criteria.CriteriaQuery<E> orderBy(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes, boolean asc)
           
 javax.persistence.criteria.CriteriaQuery<E> selectArray(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)
           
 javax.persistence.criteria.CriteriaQuery<E> selectConstruct(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)
           
 javax.persistence.criteria.CriteriaQuery<E> selectTuple(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)
           
 
Methods inherited from class org.apache.cxf.jaxrs.ext.search.jpa.AbstractJPATypedQueryVisitor
getCriteriaBuilder, getCriteriaQuery, getEntityManager, getQueryClass, getRoot, getTypedQuery, visit
 
Methods inherited from class org.apache.cxf.jaxrs.ext.search.visitor.AbstractSearchConditionVisitor
getPrimitiveFieldClass, getPrimitiveFieldClass, getPrimitiveFieldClass, getRealPropertyName, isWildcardStringMatch, setPrimitiveFieldTypeMap, setValidator, setWildcardStringMatch, validatePropertyValue, visitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPACriteriaQueryVisitor

public JPACriteriaQueryVisitor(javax.persistence.EntityManager em,
                               Class<T> tClass,
                               Class<E> queryClass)

JPACriteriaQueryVisitor

public JPACriteriaQueryVisitor(javax.persistence.EntityManager em,
                               Class<T> tClass,
                               Class<E> queryClass,
                               List<String> joinProps)

JPACriteriaQueryVisitor

public JPACriteriaQueryVisitor(javax.persistence.EntityManager em,
                               Class<T> tClass,
                               Class<E> queryClass,
                               Map<String,String> fieldMap)

JPACriteriaQueryVisitor

public JPACriteriaQueryVisitor(javax.persistence.EntityManager em,
                               Class<T> tClass,
                               Class<E> queryClass,
                               Map<String,String> fieldMap,
                               List<String> joinProps)
Method Detail

getQuery

public javax.persistence.criteria.CriteriaQuery<E> getQuery()
Description copied from interface: SearchConditionVisitor
Return a built query object

Returns:
the query

count

public Long count()

getOrderedTypedQuery

public javax.persistence.TypedQuery<E> getOrderedTypedQuery(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes,
                                                            boolean asc)

orderBy

public javax.persistence.criteria.CriteriaQuery<E> orderBy(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes,
                                                           boolean asc)

getArrayTypedQuery

public javax.persistence.TypedQuery<E> getArrayTypedQuery(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)

selectArray

public javax.persistence.criteria.CriteriaQuery<E> selectArray(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)

selectConstruct

public javax.persistence.criteria.CriteriaQuery<E> selectConstruct(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)

getConstructTypedQuery

public javax.persistence.TypedQuery<E> getConstructTypedQuery(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)

selectTuple

public javax.persistence.criteria.CriteriaQuery<E> selectTuple(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)

getTupleTypedQuery

public javax.persistence.TypedQuery<E> getTupleTypedQuery(List<javax.persistence.metamodel.SingularAttribute<T,?>> attributes)

Apache CXF API

Apache CXF