com.mysema.query
Class BooleanBuilder

java.lang.Object
  extended by com.mysema.query.types.Expr<D>
      extended by com.mysema.query.types.expr.ESimple<D>
          extended by com.mysema.query.types.expr.EComparableBase<D>
              extended by com.mysema.query.types.expr.EComparable<Boolean>
                  extended by com.mysema.query.types.expr.EBoolean
                      extended by com.mysema.query.BooleanBuilder
All Implemented Interfaces:
Operation<Boolean>, Serializable, Cloneable

public final class BooleanBuilder
extends EBoolean
implements Cloneable, Operation<Boolean>

BooleanBuilder is a cascading builder for EBoolean expressions.

Author:
tiwe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.Expr
primitive
 
Constructor Summary
BooleanBuilder()
           
BooleanBuilder(EBoolean initial)
           
 
Method Summary
 void accept(Visitor v)
           
 BooleanBuilder and(EBoolean right)
          Get an intersection of this and the given expression
 BooleanBuilder andAnyOf(EBoolean... args)
          Create the intersection of this and the union of the given args
 BooleanBuilder andNot(EBoolean right)
           
 BooleanBuilder clone()
           
 boolean equals(Object o)
           
 Expr<?> getArg(int index)
          Get the argument with the given index
 List<Expr<?>> getArgs()
          Get the arguments of this operation
 Operator<? super Boolean> getOperator()
          Get the operator symbol for this operation
 EBoolean getValue()
           
 int hashCode()
           
 boolean hasValue()
          Returns true if the value is set, and false, if not
 BooleanBuilder not()
          Get a negation of this boolean expression
 BooleanBuilder or(EBoolean right)
          Get a union of this and the given expression
 BooleanBuilder orAllOf(EBoolean... args)
          Create the union of this and the intersection of the given args
 BooleanBuilder orNot(EBoolean right)
           
 
Methods inherited from class com.mysema.query.types.expr.EBoolean
allOf, anyOf, as
 
Methods inherited from class com.mysema.query.types.expr.EComparable
between, between, goe, goe, gt, gt, in, loe, loe, lt, lt, notBetween, notBetween
 
Methods inherited from class com.mysema.query.types.expr.EComparableBase
asc, castToNum, desc, stringValue
 
Methods inherited from class com.mysema.query.types.expr.ESimple
asExpr, count, countDistinct, eq, eq, in, in, in, ne, ne, when, when
 
Methods inherited from class com.mysema.query.types.Expr
getType, notIn, notIn, notIn, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.mysema.query.types.Operation
asExpr, getType
 

Constructor Detail

BooleanBuilder

public BooleanBuilder()

BooleanBuilder

public BooleanBuilder(EBoolean initial)
Method Detail

accept

public void accept(Visitor v)
Specified by:
accept in class Expr<Boolean>

and

public BooleanBuilder and(@Nullable
                          EBoolean right)
Description copied from class: EBoolean
Get an intersection of this and the given expression

Overrides:
and in class EBoolean
Parameters:
right - right hand side of the union
Returns:
this && right

andAnyOf

public BooleanBuilder andAnyOf(EBoolean... args)
Create the intersection of this and the union of the given args

(this && (arg1 || arg2 ... || argN))

Parameters:
args -
Returns:

andNot

public BooleanBuilder andNot(EBoolean right)

clone

public BooleanBuilder clone()
                     throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

equals

public boolean equals(Object o)
Specified by:
equals in class Expr<Boolean>

getArg

public Expr<?> getArg(int index)
Description copied from interface: Operation
Get the argument with the given index

Specified by:
getArg in interface Operation<Boolean>
Returns:

getArgs

public List<Expr<?>> getArgs()
Description copied from interface: Operation
Get the arguments of this operation

Specified by:
getArgs in interface Operation<Boolean>
Returns:

getOperator

public Operator<? super Boolean> getOperator()
Description copied from interface: Operation
Get the operator symbol for this operation

Specified by:
getOperator in interface Operation<Boolean>
Returns:

getValue

@Nullable
public EBoolean getValue()

hashCode

public int hashCode()
Overrides:
hashCode in class Expr<Boolean>

hasValue

public boolean hasValue()
Returns true if the value is set, and false, if not

Returns:

not

public BooleanBuilder not()
Description copied from class: EBoolean
Get a negation of this boolean expression

Overrides:
not in class EBoolean
Returns:
!this

or

public BooleanBuilder or(@Nullable
                         EBoolean right)
Description copied from class: EBoolean
Get a union of this and the given expression

Overrides:
or in class EBoolean
Parameters:
right - right hand side of the union
Returns:
this || right

orAllOf

public BooleanBuilder orAllOf(EBoolean... args)
Create the union of this and the intersection of the given args

(this || (arg1 && arg2 ... && argN))

Parameters:
args -
Returns:

orNot

public BooleanBuilder orNot(EBoolean right)


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