public class CompoundPredicate extends AbstractPredicateImpl implements java.io.Serializable
predicate is a grouping of other predicates in order to convert
either a conjunction (logical AND) or a disjunction (logical OR).javax.persistence.criteria.Predicate.BooleanOperatorParameterContainer.Helper| Constructor and Description |
|---|
CompoundPredicate(CriteriaBuilderImpl criteriaBuilder,
javax.persistence.criteria.Predicate.BooleanOperator operator)
Constructs an empty conjunction or disjunction.
|
CompoundPredicate(CriteriaBuilderImpl criteriaBuilder,
javax.persistence.criteria.Predicate.BooleanOperator operator,
javax.persistence.criteria.Expression<java.lang.Boolean>... expressions)
Constructs a conjunction or disjunction over the given expressions.
|
CompoundPredicate(CriteriaBuilderImpl criteriaBuilder,
javax.persistence.criteria.Predicate.BooleanOperator operator,
java.util.List<javax.persistence.criteria.Expression<java.lang.Boolean>> expressions)
Constructs a conjunction or disjunction over the given expressions.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<javax.persistence.criteria.Expression<java.lang.Boolean>> |
getExpressions() |
javax.persistence.criteria.Predicate.BooleanOperator |
getOperator() |
boolean |
isJunction()
Is this a conjunction or disjunction?
|
javax.persistence.criteria.Predicate |
not()
Create negation of compound predicate by using logic rules:
1.
|
void |
registerParameters(ParameterRegistry registry)
Register any parameters contained within this query component with the given registry.
|
java.lang.String |
render(boolean isNegated,
RenderingContext renderingContext)
Form of
Renderable.render(org.hibernate.jpa.criteria.compile.RenderingContext) used when the predicate is wrapped in a negated wrapper. |
static java.lang.String |
render(PredicateImplementor predicate,
RenderingContext renderingContext) |
java.lang.String |
render(RenderingContext renderingContext) |
java.lang.String |
renderProjection(RenderingContext renderingContext) |
static javax.persistence.criteria.Predicate.BooleanOperator |
reverseOperator(javax.persistence.criteria.Predicate.BooleanOperator operator) |
getCompoundSelectionItems, isCompoundSelection, isNegatedas, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNullalias, getValueHandlersforceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAliascriteriaBuilderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcriteriaBuilderas, in, in, in, in, isNotNull, isNullgetValueHandlersgetValueHandlerpublic CompoundPredicate(CriteriaBuilderImpl criteriaBuilder, javax.persistence.criteria.Predicate.BooleanOperator operator)
criteriaBuilder - The query builder from which this originates.operator - Indicates whether this predicate will function
as a conjunction or disjunction.public CompoundPredicate(CriteriaBuilderImpl criteriaBuilder, javax.persistence.criteria.Predicate.BooleanOperator operator, javax.persistence.criteria.Expression<java.lang.Boolean>... expressions)
criteriaBuilder - The query builder from which this originates.operator - Indicates whether this predicate will function
as a conjunction or disjunction.expressions - The expressions to be grouped.public CompoundPredicate(CriteriaBuilderImpl criteriaBuilder, javax.persistence.criteria.Predicate.BooleanOperator operator, java.util.List<javax.persistence.criteria.Expression<java.lang.Boolean>> expressions)
criteriaBuilder - The query builder from which this originates.operator - Indicates whether this predicate will function
as a conjunction or disjunction.expressions - The expressions to be grouped.public javax.persistence.criteria.Predicate.BooleanOperator getOperator()
getOperator in interface javax.persistence.criteria.Predicatepublic java.util.List<javax.persistence.criteria.Expression<java.lang.Boolean>> getExpressions()
getExpressions in interface javax.persistence.criteria.Predicatepublic void registerParameters(ParameterRegistry registry)
ParameterContainerregisterParameters in interface ParameterContainerregistry - The parameter registry with which to register.public java.lang.String render(RenderingContext renderingContext)
render in interface Renderablepublic boolean isJunction()
PredicateImplementorisJunction in interface PredicateImplementortrue if this predicate is a junction (AND/OR); false otherwisepublic java.lang.String render(boolean isNegated,
RenderingContext renderingContext)
PredicateImplementorRenderable.render(org.hibernate.jpa.criteria.compile.RenderingContext) used when the predicate is wrapped in a negated wrapper. Allows passing
down the negation flag.
Note that this form is no-op in compound (junction) predicates. The reason being that compound predicates
are more complex and the negation is applied during its creation.render in interface PredicateImplementorisNegated - Should the predicate be negated.renderingContext - The context for renderingpublic java.lang.String renderProjection(RenderingContext renderingContext)
renderProjection in interface Renderablepublic javax.persistence.criteria.Predicate not()
not in interface javax.persistence.criteria.Predicatenot in class AbstractPredicateImplpublic static javax.persistence.criteria.Predicate.BooleanOperator reverseOperator(javax.persistence.criteria.Predicate.BooleanOperator operator)
public static java.lang.String render(PredicateImplementor predicate, RenderingContext renderingContext)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.