org.sql.generation.api.grammar.builders.booleans
Interface BooleanBuilder

All Superinterfaces:
AbstractBuilder<BooleanExpression>

public interface BooleanBuilder
extends AbstractBuilder<BooleanExpression>

A builder-pattern interface to build boolean expressions. It holds the current expression, modifying it as per user's instructions, and returns it once the AbstractBuilder.createExpression() method is called.

Author:
Stanislav Muhametsin

Method Summary
 BooleanBuilder and(BooleanExpression next)
          Sets current expression as current expression AND next.
 BooleanBuilder not()
          Sets current expression as NOT current expression.
 BooleanBuilder or(BooleanExpression next)
          Sets current expression as current expression OR next
 BooleanBuilder reset(BooleanExpression newExpression)
          Sets current expression as given parameter.
 
Methods inherited from interface org.sql.generation.api.grammar.builders.AbstractBuilder
createExpression
 

Method Detail

and

BooleanBuilder and(BooleanExpression next)
Sets current expression as current expression AND next.

Parameters:
next - The expression on a right hand of AND.
Returns:
This builder.

or

BooleanBuilder or(BooleanExpression next)
Sets current expression as current expression OR next

Parameters:
next - The expression on a right hand of OR
Returns:
This builder.

not

BooleanBuilder not()
Sets current expression as NOT current expression.

Returns:
This builder.

reset

BooleanBuilder reset(BooleanExpression newExpression)
Sets current expression as given parameter.

Parameters:
newExpression - The new expression.
Returns:
This builder.


Copyright © 2010-2012. All Rights Reserved.