com.mysema.query.types.expr
Class BooleanExpression

java.lang.Object
  extended by com.mysema.query.types.expr.DslExpression<T>
      extended by com.mysema.query.types.expr.SimpleExpression<T>
          extended by com.mysema.query.types.expr.ComparableExpressionBase<T>
              extended by com.mysema.query.types.expr.ComparableExpression<Boolean>
                  extended by com.mysema.query.types.expr.BooleanExpression
All Implemented Interfaces:
Expression<Boolean>, Predicate, Serializable
Direct Known Subclasses:
BooleanOperation, BooleanPath, BooleanSubQuery, BooleanTemplate, QueryElement

public abstract class BooleanExpression
extends ComparableExpression<Boolean>
implements Predicate

BooleanExpression represents boolean expressions

Author:
tiwe
See Also:
Boolean, Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.expr.DslExpression
mixin
 
Constructor Summary
BooleanExpression(Expression<Boolean> mixin)
           
 
Method Summary
static BooleanExpression allOf(BooleanExpression... exprs)
          Return the intersection of the given Boolean expressions
 BooleanExpression and(Predicate right)
          Get an intersection of this and the given expression
 BooleanExpression andAnyOf(Predicate... predicates)
          Get an intersection of this and the union of the given predicates
static BooleanExpression anyOf(BooleanExpression... exprs)
          Return the union of the given Boolean expressions
 BooleanExpression as(Path<Boolean> alias)
          Create an alias for the expression
 BooleanExpression as(String alias)
          Create an alias for the expression
 BooleanExpression eq(Boolean right)
          Get a this == right expression
 BooleanExpression isFalse()
          Get a this == false expression
 BooleanExpression isTrue()
          Get a this == true expression
 BooleanExpression not()
          Get a negation of this boolean expression
 BooleanExpression or(Predicate right)
          Get a union of this and the given expression
 BooleanExpression orAllOf(Predicate... predicates)
          Get a union of this and the intersection of the given predicates
 
Methods inherited from class com.mysema.query.types.expr.ComparableExpression
between, between, goe, goe, goeAll, goeAny, gt, gt, gtAll, gtAny, loe, loe, loeAll, loeAny, lt, lt, ltAll, ltAny, notBetween, notBetween
 
Methods inherited from class com.mysema.query.types.expr.ComparableExpressionBase
asc, castToNum, coalesce, coalesce, desc, stringValue
 
Methods inherited from class com.mysema.query.types.expr.SimpleExpression
count, countDistinct, eq, eqAll, eqAny, in, in, in, isNotNull, isNull, ne, ne, neAll, neAny, notIn, notIn, notIn, when, when
 
Methods inherited from class com.mysema.query.types.expr.DslExpression
equals, getType, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.mysema.query.types.Expression
accept, getType
 

Constructor Detail

BooleanExpression

public BooleanExpression(Expression<Boolean> mixin)
Method Detail

allOf

@Nullable
public static BooleanExpression allOf(BooleanExpression... exprs)
Return the intersection of the given Boolean expressions

Parameters:
exprs -
Returns:

anyOf

@Nullable
public static BooleanExpression anyOf(BooleanExpression... exprs)
Return the union of the given Boolean expressions

Parameters:
exprs -
Returns:

as

public BooleanExpression as(Path<Boolean> alias)
Description copied from class: SimpleExpression
Create an alias for the expression

Overrides:
as in class ComparableExpression<Boolean>
Returns:

as

public BooleanExpression as(String alias)
Description copied from class: SimpleExpression
Create an alias for the expression

Overrides:
as in class ComparableExpression<Boolean>
Returns:

and

public BooleanExpression and(@Nullable
                             Predicate right)
Get an intersection of this and the given expression

Parameters:
right - right hand side of the union
Returns:
this && right

andAnyOf

public BooleanExpression andAnyOf(Predicate... predicates)
Get an intersection of this and the union of the given predicates

Parameters:
predicates -
Returns:

not

public BooleanExpression not()
Get a negation of this boolean expression

Specified by:
not in interface Predicate
Returns:
!this

or

public BooleanExpression or(@Nullable
                            Predicate right)
Get a union of this and the given expression

Parameters:
right - right hand side of the union
Returns:
this || right

orAllOf

public BooleanExpression orAllOf(Predicate... predicates)
Get a union of this and the intersection of the given predicates

Parameters:
predicates -
Returns:

isTrue

public BooleanExpression isTrue()
Get a this == true expression

Returns:

isFalse

public BooleanExpression isFalse()
Get a this == false expression

Returns:

eq

public BooleanExpression eq(Boolean right)
Description copied from class: SimpleExpression
Get a this == right expression

Overrides:
eq in class SimpleExpression<Boolean>
Parameters:
right - rhs of the comparison
Returns:


Copyright © 2007-2012 Mysema Ltd. All Rights Reserved.