org.jpox.store.expression
Class BooleanLiteral

java.lang.Object
  extended byorg.jpox.store.expression.ScalarExpression
      extended byorg.jpox.store.expression.BooleanExpression
          extended byorg.jpox.store.expression.BooleanLiteral
All Implemented Interfaces:
Literal
Direct Known Subclasses:
BooleanBitColumnLiteral, BooleanCharColumnLiteral

public class BooleanLiteral
extends BooleanExpression
implements Literal

Representation of a Boolean literal in a Query.

Version:
$Revision: 1.5 $

Nested Class Summary
 
Nested classes inherited from class org.jpox.store.expression.ScalarExpression
ScalarExpression.DyadicOperator, ScalarExpression.ExpressionList, ScalarExpression.FieldExpression, ScalarExpression.IllegalArgumentTypeException, ScalarExpression.IllegalOperationException, ScalarExpression.MethodInvocationException, ScalarExpression.MonadicOperator, ScalarExpression.Operator
 
Field Summary
 
Fields inherited from class org.jpox.store.expression.ScalarExpression
aliasIdentifier, expressionList, FILTER, LOCALISER, lowestOperator, mapping, OP_ADD, OP_AND, OP_BETWEEN, OP_COM, OP_CONCAT, OP_DIV, OP_EQ, OP_GT, OP_GTEQ, OP_IN, OP_IS, OP_ISNOT, OP_LIKE, OP_LT, OP_LTEQ, OP_MOD, OP_MUL, OP_NEG, OP_NOT, OP_NOTEQ, OP_OR, OP_SUB, PROJECTION, qs, st, te
 
Constructor Summary
BooleanLiteral(QueryExpression qs, JavaTypeMapping mapping, boolean value)
          Creates a boolean literal
 
Method Summary
 BooleanExpression and(ScalarExpression expr)
          Conditional And.
 BooleanExpression eor(ScalarExpression expr)
          Exclusive OR
 BooleanExpression eq(ScalarExpression expr)
          Equality operator (equals to)
protected  java.lang.String getBooleanFalseValue()
          Return the String value for FALSE in the database.
protected  java.lang.String getBooleanTrueValue()
          Return the String value for TRUE in the database.
 java.lang.Object getValue()
          Accessor to the literal value
 BooleanExpression ior(ScalarExpression expr)
          Conditional OR.
 BooleanExpression not()
          Logical complement
 BooleanExpression noteq(ScalarExpression expr)
          Equality operator (not equals to)
 
Methods inherited from class org.jpox.store.expression.BooleanExpression
in, neg
 
Methods inherited from class org.jpox.store.expression.ScalarExpression
accessField, add, as, callMethod, cast, com, div, encloseWithInParentheses, equals, getAlias, getExpressionList, getLogicSetExpression, getMapping, getNonAliasExpression, getQueryExpression, gt, gteq, instanceOf, lt, lteq, mod, mul, sub, toStatementText, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BooleanLiteral

public BooleanLiteral(QueryExpression qs,
                      JavaTypeMapping mapping,
                      boolean value)
Creates a boolean literal

Parameters:
qs - the QueryExpression
mapping - the mapping
value - the binary value
Method Detail

getValue

public java.lang.Object getValue()
Description copied from interface: Literal
Accessor to the literal value

Specified by:
getValue in interface Literal
Returns:
the value of the literal

getBooleanTrueValue

protected java.lang.String getBooleanTrueValue()
Return the String value for TRUE in the database. This should be overriden by subclasses for special cases of booleans.

Returns:
The String value for TRUE in the database.

getBooleanFalseValue

protected java.lang.String getBooleanFalseValue()
Return the String value for FALSE in the database. This should be overriden by subclasses for special cases of booleans.

Returns:
The String value for FALSE in the database.

and

public BooleanExpression and(ScalarExpression expr)
Description copied from class: ScalarExpression
Conditional And. Evaluates its right-hand operand only if the value of its left-hand operand is true.

Overrides:
and in class BooleanExpression

eor

public BooleanExpression eor(ScalarExpression expr)
Description copied from class: ScalarExpression
Exclusive OR

Overrides:
eor in class BooleanExpression

ior

public BooleanExpression ior(ScalarExpression expr)
Description copied from class: ScalarExpression
Conditional OR. Evaluates its right-hand operand only if the value of its left-hand operand is false.

Overrides:
ior in class BooleanExpression

not

public BooleanExpression not()
Description copied from class: ScalarExpression
Logical complement

Overrides:
not in class BooleanExpression

eq

public BooleanExpression eq(ScalarExpression expr)
Description copied from class: ScalarExpression
Equality operator (equals to)

Overrides:
eq in class BooleanExpression

noteq

public BooleanExpression noteq(ScalarExpression expr)
Description copied from class: ScalarExpression
Equality operator (not equals to)

Overrides:
noteq in class BooleanExpression


Copyright © -2007 . All Rights Reserved.