org.jpox.store.expression
Class ExistsExpression

java.lang.Object
  extended by org.jpox.store.expression.ScalarExpression
      extended by org.jpox.store.expression.BooleanExpression
          extended by org.jpox.store.expression.ExistsExpression

public class ExistsExpression
extends BooleanExpression

Perform a exists function on a Query Expression returning a true boolean value if one or more elements are retrieved.

Version:
$Revision: 1.6 $

Nested Class Summary
 
Nested classes/interfaces 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
ExistsExpression(QueryExpression qs, QueryExpression argumentExpression)
          Constructs a expression what will return true if the argument expression has elements
ExistsExpression(QueryExpression qs, QueryExpression argumentExpression, boolean truthTest)
           
 
Method Summary
 BooleanExpression and(ScalarExpression expr)
          Conditional And.
 BooleanExpression not()
          Logical complement
 
Methods inherited from class org.jpox.store.expression.BooleanExpression
eor, eq, in, ior, neg, noteq
 
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

ExistsExpression

public ExistsExpression(QueryExpression qs,
                        QueryExpression argumentExpression)
Constructs a expression what will return true if the argument expression has elements

Parameters:
qs - the QueryExpression
argumentExpression - the QueryExpression returning records to the exists function

ExistsExpression

public ExistsExpression(QueryExpression qs,
                        QueryExpression argumentExpression,
                        boolean truthTest)
Parameters:
qs - the QueryExpression
argumentExpression - the QueryExpression returning records to the exists function
truthTest - true to perform a "exists", and false to perform a "not exists"
Method Detail

not

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

Overrides:
not in class BooleanExpression
Returns:
the result value is false if operand is true; otherwise, the result is true.

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
Parameters:
expr - the right-hand operand
Returns:
the result value is true if both operand values are true; otherwise, the result is false.


Copyright © -2011 . All Rights Reserved.