类 CompoundPredicate
- java.lang.Object
-
- org.hibernate.query.criteria.internal.AbstractNode
-
- org.hibernate.query.criteria.internal.expression.AbstractTupleElement<X>
-
- org.hibernate.query.criteria.internal.expression.SelectionImpl<T>
-
- org.hibernate.query.criteria.internal.expression.ExpressionImpl<Boolean>
-
- org.hibernate.query.criteria.internal.predicate.AbstractPredicateImpl
-
- org.hibernate.query.criteria.internal.predicate.CompoundPredicate
-
- 所有已实现的接口:
Serializable,javax.persistence.criteria.Expression<Boolean>,javax.persistence.criteria.Predicate,javax.persistence.criteria.Selection<Boolean>,javax.persistence.TupleElement<Boolean>,ExpressionImplementor<Boolean>,ParameterContainer,PredicateImplementor,Renderable,SelectionImplementor<Boolean>,TupleElementImplementor<Boolean>
public class CompoundPredicate extends AbstractPredicateImpl implements Serializable
A compoundpredicateis a grouping of otherpredicatesin order to convert either a conjunction (logical AND) or a disjunction (logical OR).- 作者:
- Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 org.hibernate.query.criteria.internal.ParameterContainer
ParameterContainer.Helper
-
-
构造器概要
构造器 构造器 说明 CompoundPredicate(CriteriaBuilderImpl criteriaBuilder, javax.persistence.criteria.Predicate.BooleanOperator operator)Constructs an empty conjunction or disjunction.CompoundPredicate(CriteriaBuilderImpl criteriaBuilder, javax.persistence.criteria.Predicate.BooleanOperator operator, List<javax.persistence.criteria.Expression<Boolean>> expressions)Constructs a conjunction or disjunction over the given expressions.CompoundPredicate(CriteriaBuilderImpl criteriaBuilder, javax.persistence.criteria.Predicate.BooleanOperator operator, javax.persistence.criteria.Expression<Boolean>... expressions)Constructs a conjunction or disjunction over the given expressions.
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 List<javax.persistence.criteria.Expression<Boolean>>getExpressions()javax.persistence.criteria.Predicate.BooleanOperatorgetOperator()booleanisJunction()Is this a conjunction or disjunction?javax.persistence.criteria.Predicatenot()Create negation of compound predicate by using logic rules: 1. not (x || y) is (not x && not y) 2. not (x && y) is (not x || not y)voidregisterParameters(ParameterRegistry registry)Register any parameters contained within this query component with the given registry.Stringrender(boolean isNegated, RenderingContext renderingContext)Form ofRenderable.render(org.hibernate.query.criteria.internal.compile.RenderingContext)used when the predicate is wrapped in a negated wrapper.Stringrender(RenderingContext renderingContext)Perform the rendering, returning the renditionstatic Stringrender(PredicateImplementor predicate, RenderingContext renderingContext)static javax.persistence.criteria.Predicate.BooleanOperatorreverseOperator(javax.persistence.criteria.Predicate.BooleanOperator operator)-
从类继承的方法 org.hibernate.query.criteria.internal.predicate.AbstractPredicateImpl
getCompoundSelectionItems, isCompoundSelection, isNegated
-
从类继承的方法 org.hibernate.query.criteria.internal.expression.ExpressionImpl
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNull
-
从类继承的方法 org.hibernate.query.criteria.internal.expression.SelectionImpl
alias, getValueHandlers
-
从类继承的方法 org.hibernate.query.criteria.internal.expression.AbstractTupleElement
forceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAlias
-
从类继承的方法 org.hibernate.query.criteria.internal.AbstractNode
criteriaBuilder
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.query.criteria.internal.predicate.PredicateImplementor
criteriaBuilder
-
从接口继承的方法 org.hibernate.query.criteria.internal.SelectionImplementor
getValueHandlers
-
从接口继承的方法 org.hibernate.query.criteria.internal.TupleElementImplementor
getValueHandler
-
-
-
-
构造器详细资料
-
CompoundPredicate
public CompoundPredicate(CriteriaBuilderImpl criteriaBuilder, javax.persistence.criteria.Predicate.BooleanOperator operator)
Constructs an empty conjunction or disjunction.- 参数:
criteriaBuilder- The query builder from which this originates.operator- Indicates whether this predicate will function as a conjunction or disjunction.
-
CompoundPredicate
public CompoundPredicate(CriteriaBuilderImpl criteriaBuilder, javax.persistence.criteria.Predicate.BooleanOperator operator, javax.persistence.criteria.Expression<Boolean>... expressions)
Constructs a conjunction or disjunction over the given 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.
-
CompoundPredicate
public CompoundPredicate(CriteriaBuilderImpl criteriaBuilder, javax.persistence.criteria.Predicate.BooleanOperator operator, List<javax.persistence.criteria.Expression<Boolean>> expressions)
Constructs a conjunction or disjunction over the given 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.
-
-
方法详细资料
-
getOperator
public javax.persistence.criteria.Predicate.BooleanOperator getOperator()
- 指定者:
getOperator在接口中javax.persistence.criteria.Predicate
-
getExpressions
public List<javax.persistence.criteria.Expression<Boolean>> getExpressions()
- 指定者:
getExpressions在接口中javax.persistence.criteria.Predicate
-
registerParameters
public void registerParameters(ParameterRegistry registry)
从接口复制的说明:ParameterContainerRegister any parameters contained within this query component with the given registry.- 指定者:
registerParameters在接口中ParameterContainer- 参数:
registry- The parameter registry with which to register.
-
render
public String render(RenderingContext renderingContext)
从接口复制的说明:RenderablePerform the rendering, returning the rendition- 指定者:
render在接口中Renderable
-
isJunction
public boolean isJunction()
从接口复制的说明:PredicateImplementorIs this a conjunction or disjunction?- 指定者:
isJunction在接口中PredicateImplementor- 返回:
trueif this predicate is a junction (AND/OR);falseotherwise
-
render
public String render(boolean isNegated, RenderingContext renderingContext)
从接口复制的说明:PredicateImplementorForm ofRenderable.render(org.hibernate.query.criteria.internal.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在接口中PredicateImplementor- 参数:
isNegated- Should the predicate be negated.renderingContext- The context for rendering- 返回:
- The rendered predicate fragment.
-
not
public javax.persistence.criteria.Predicate not()
Create negation of compound predicate by using logic rules: 1. not (x || y) is (not x && not y) 2. not (x && y) is (not x || not y)- 指定者:
not在接口中javax.persistence.criteria.Predicate- 覆盖:
not在类中AbstractPredicateImpl
-
reverseOperator
public static javax.persistence.criteria.Predicate.BooleanOperator reverseOperator(javax.persistence.criteria.Predicate.BooleanOperator operator)
-
render
public static String render(PredicateImplementor predicate, RenderingContext renderingContext)
-
-