Class PredicateFactory
java.lang.Object
ch.tocco.nice2.persist.core.api.hibernate.PredicateFactory
Converts a nice2 condition (
Node
instances) to a hibernate/jpa Predicate
Used for security conditions and the 'WHERE' clause of queries.-
Constructor Summary
ConstructorDescriptionPredicateFactory
(CriteriaBuilderWrapper criteriaBuilder, jakarta.persistence.criteria.From<?, ?> queryRoot, PredicateBuilder.SubqueryFactory subqueryFactory, DataModel dataModel, FieldResolver fieldResolver, TypeManager typeManager, Map<String, JdbcFunction> jdbcFunctions, Map<String, ?> queryHints) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.persistence.criteria.Predicate
buildPredicate
(Node node) derive
(PredicateBuilder.SubqueryFactory subqueryFactory, jakarta.persistence.criteria.From<?, ?> root) derive
(PredicateBuilder.SubqueryFactory subqueryFactory, jakarta.persistence.criteria.From<?, ?> root, CriteriaBuilderWrapper criteriaBuilder) jakarta.persistence.criteria.From
<?, ?>
-
Constructor Details
-
PredicateFactory
public PredicateFactory(CriteriaBuilderWrapper criteriaBuilder, jakarta.persistence.criteria.From<?, ?> queryRoot, PredicateBuilder.SubqueryFactory subqueryFactory, DataModel dataModel, FieldResolver fieldResolver, TypeManager typeManager, Map<String, JdbcFunction> jdbcFunctions, Map<String, ?> queryHints)
-
-
Method Details
-
getQueryRoot
public jakarta.persistence.criteria.From<?,?> getQueryRoot() -
derive
public PredicateFactory derive(PredicateBuilder.SubqueryFactory subqueryFactory, jakarta.persistence.criteria.From<?, ?> root) -
derive
public PredicateFactory derive(PredicateBuilder.SubqueryFactory subqueryFactory, jakarta.persistence.criteria.From<?, ?> root, CriteriaBuilderWrapper criteriaBuilder) -
buildPredicate
-