public class InPredicate<T> extends AbstractSimplePredicate implements CriteriaBuilder.In<T>, Serializable
Predicate.BooleanOperator
ParameterContainer.Helper
Constructor and Description |
---|
InPredicate(CriteriaBuilderImpl criteriaBuilder,
Expression<? extends T> expression)
Constructs an IN predicate against a given expression with an empty list of values.
|
InPredicate(CriteriaBuilderImpl criteriaBuilder,
Expression<? extends T> expression,
Collection<T> values)
Constructs an IN predicate against a given expression with the given literal value list.
|
InPredicate(CriteriaBuilderImpl criteriaBuilder,
Expression<? extends T> expression,
Expression<? extends T>... values)
Constructs an IN predicate against a given expression with the given list of expression values.
|
InPredicate(CriteriaBuilderImpl criteriaBuilder,
Expression<? extends T> expression,
List<Expression<? extends T>> values)
Constructs an IN predicate against a given expression with the given list of expression values.
|
InPredicate(CriteriaBuilderImpl criteriaBuilder,
Expression<? extends T> expression,
T... values)
Constructs an IN predicate against a given expression with the given given literal value list.
|
Modifier and Type | Method and Description |
---|---|
Expression<T> |
getExpression()
Return the expression to be tested against the
list of values.
|
Expression<? extends T> |
getExpressionInternal() |
List<Expression<? extends T>> |
getValues() |
void |
registerParameters(ParameterRegistry registry)
Register any parameters contained within this query component with the given registry.
|
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. |
InPredicate<T> |
value(Expression<? extends T> value)
Add to list of values to be tested against.
|
InPredicate<T> |
value(T value)
Add to list of values to be tested against.
|
getExpressions, getOperator, isJunction, render, renderProjection
getCompoundSelectionItems, isCompoundSelection, isNegated, not
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
getExpressions, getOperator, isNegated, not
as, in, in, in, in, isNotNull, isNull
alias, getCompoundSelectionItems, isCompoundSelection
getAlias, getJavaType
criteriaBuilder
getValueHandlers
getValueHandler
public InPredicate(CriteriaBuilderImpl criteriaBuilder, Expression<? extends T> expression)
criteriaBuilder
- The query builder from which this originates.expression
- The expression.public InPredicate(CriteriaBuilderImpl criteriaBuilder, Expression<? extends T> expression, Expression<? extends T>... values)
criteriaBuilder
- The query builder from which this originates.expression
- The expression.values
- The value list.public InPredicate(CriteriaBuilderImpl criteriaBuilder, Expression<? extends T> expression, List<Expression<? extends T>> values)
criteriaBuilder
- The query builder from which this originates.expression
- The expression.values
- The value list.public InPredicate(CriteriaBuilderImpl criteriaBuilder, Expression<? extends T> expression, T... values)
criteriaBuilder
- The query builder from which this originates.expression
- The expression.values
- The value list.public InPredicate(CriteriaBuilderImpl criteriaBuilder, Expression<? extends T> expression, Collection<T> values)
criteriaBuilder
- The query builder from which this originates.expression
- The expression.values
- The value list.public Expression<T> getExpression()
CriteriaBuilder.In
getExpression
in interface CriteriaBuilder.In<T>
public Expression<? extends T> getExpressionInternal()
public List<Expression<? extends T>> getValues()
public InPredicate<T> value(T value)
CriteriaBuilder.In
value
in interface CriteriaBuilder.In<T>
value
- valuepublic InPredicate<T> value(Expression<? extends T> value)
CriteriaBuilder.In
value
in interface CriteriaBuilder.In<T>
value
- expressionpublic void registerParameters(ParameterRegistry registry)
ParameterContainer
registerParameters
in interface ParameterContainer
registry
- The parameter registry with which to register.public String render(boolean isNegated, RenderingContext renderingContext)
PredicateImplementor
Renderable.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 PredicateImplementor
isNegated
- Should the predicate be negated.renderingContext
- The context for renderingCopyright © 2016 JBoss by Red Hat. All rights reserved.