public class CompoundPredicate extends AbstractPredicateImpl implements Serializable
predicate
is a grouping of other predicates
in order to convert
either a conjunction (logical AND) or a disjunction (logical OR).Predicate.BooleanOperator
ParameterContainer.Helper
Constructor and Description |
---|
CompoundPredicate(CriteriaBuilderImpl criteriaBuilder,
Predicate.BooleanOperator operator)
Constructs an empty conjunction or disjunction.
|
CompoundPredicate(CriteriaBuilderImpl criteriaBuilder,
Predicate.BooleanOperator operator,
Expression<Boolean>... expressions)
Constructs a conjunction or disjunction over the given expressions.
|
CompoundPredicate(CriteriaBuilderImpl criteriaBuilder,
Predicate.BooleanOperator operator,
List<Expression<Boolean>> expressions)
Constructs a conjunction or disjunction over the given expressions.
|
Modifier and Type | Method and Description |
---|---|
List<Expression<Boolean>> |
getExpressions()
Return the top-level conjuncts or disjuncts of the predicate.
|
Predicate.BooleanOperator |
getOperator()
Return the boolean operator for the predicate.
|
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.
|
String |
render(CriteriaQueryCompiler.RenderingContext renderingContext) |
String |
renderProjection(CriteriaQueryCompiler.RenderingContext renderingContext) |
getCompoundSelectionItems, isCompoundSelection, isNegated
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNull
alias, getValueHandlers
forceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAlias
criteriaBuilder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
as, in, in, in, in, isNotNull, isNull
getAlias, getJavaType
getValueHandlers
getValueHandler
public CompoundPredicate(CriteriaBuilderImpl criteriaBuilder, 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, Predicate.BooleanOperator operator, Expression<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, Predicate.BooleanOperator operator, List<Expression<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 Predicate.BooleanOperator getOperator()
Predicate
AND
.getOperator
in interface Predicate
public List<Expression<Boolean>> getExpressions()
Predicate
getExpressions
in interface Predicate
public void registerParameters(ParameterRegistry registry)
ParameterContainer
registerParameters
in interface ParameterContainer
registry
- The parameter registry with which to register.public String render(CriteriaQueryCompiler.RenderingContext renderingContext)
render
in interface Renderable
public String renderProjection(CriteriaQueryCompiler.RenderingContext renderingContext)
renderProjection
in interface Renderable
public Predicate not()
not
in interface Predicate
not
in class AbstractPredicateImpl
Copyright © 2018 JBoss by Red Hat. All rights reserved.