public abstract class JpaPredicateVisitor<T> extends Object implements PredicateVisitor
| Constructor and Description |
|---|
JpaPredicateVisitor(javax.persistence.EntityManager entityManager,
Class<T> entityClass)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptAlwaysPredicate(AlwaysPredicate predicate) |
void |
acceptArrayPredicate(ArrayPredicate predicate) |
void |
acceptCategoryPredicate(CategoryPredicate predicate) |
void |
acceptComparisonPredicate(ComparisonPredicate predicate) |
void |
acceptUnaryPredicate(UnaryPredicate predicate) |
javax.persistence.criteria.CriteriaBuilder |
getCriteriaBuilder()
Gets the criteria builder used to construct the query and predicates.
|
javax.persistence.criteria.CriteriaQuery<T> |
getCriteriaQuery()
Gets the query to use along with
getJpaPredicate(). |
abstract Class<T> |
getEntityClass()
Gets the entity class that is the root type in the JPA
from clause. |
javax.persistence.criteria.Predicate |
getJpaPredicate()
Gets the final JPA
Predicate after the
visitor is done traversing the Ambari Predicate. |
abstract List<? extends javax.persistence.metamodel.SingularAttribute<?,?>> |
getPredicateMapping(String propertyId)
Gets the
SingularAttributes mapped to the specified Ambari-style
property. |
public abstract Class<T> getEntityClass()
from clause.null).public abstract List<? extends javax.persistence.metamodel.SingularAttribute<?,?>> getPredicateMapping(String propertyId)
SingularAttributes mapped to the specified Ambari-style
property.propertyId - the Ambari-style property (not null).SingularAttribute, or null if no mapping
exists.public javax.persistence.criteria.Predicate getJpaPredicate()
Predicate after the
visitor is done traversing the Ambari Predicate.null if none.public javax.persistence.criteria.CriteriaQuery<T> getCriteriaQuery()
getJpaPredicate().null).public javax.persistence.criteria.CriteriaBuilder getCriteriaBuilder()
null).public void acceptComparisonPredicate(ComparisonPredicate predicate)
acceptComparisonPredicate in interface PredicateVisitorpublic void acceptArrayPredicate(ArrayPredicate predicate)
acceptArrayPredicate in interface PredicateVisitorpublic void acceptUnaryPredicate(UnaryPredicate predicate)
acceptUnaryPredicate in interface PredicateVisitorpublic void acceptAlwaysPredicate(AlwaysPredicate predicate)
acceptAlwaysPredicate in interface PredicateVisitorpublic void acceptCategoryPredicate(CategoryPredicate predicate)
acceptCategoryPredicate in interface PredicateVisitorCopyright © 2022 Apache Software Foundation. All rights reserved.