org.datanucleus.store.mapped.expression
Class CollectionLiteral

java.lang.Object
  extended by org.datanucleus.store.mapped.expression.ScalarExpression
      extended by org.datanucleus.store.mapped.expression.CollectionLiteral

public class CollectionLiteral
extends ScalarExpression

An SQL expression that will test if a column of a table falls within the given Collection of values. This is used for Querys where a transient Collection is passed in as a parameter.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
ScalarExpression.DatastoreFieldExpression, ScalarExpression.DyadicOperator, ScalarExpression.ExpressionList, ScalarExpression.IllegalArgumentTypeException, ScalarExpression.IllegalOperationException, ScalarExpression.MethodInvocationException, ScalarExpression.MonadicOperator, ScalarExpression.Operator
 
Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
aliasIdentifier, checkForTypeAssignability, 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_NOTIN, OP_NOTLIKE, OP_OR, OP_SUB, parameterName, PROJECTION, qs, st, te
 
Constructor Summary
CollectionLiteral(QueryExpression qs, JavaTypeMapping mapping, java.util.Collection value)
          Constructor.
 
Method Summary
 BooleanExpression containsMethod(ScalarExpression expr)
          Method to check the containing of an element.
 BooleanExpression isEmptyMethod()
          Method to check for emptiness of the collection.
 
Methods inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
accessField, add, and, as, assertValidTypeForParameterComparison, callMethod, cast, checkForTypeAssignability, com, div, encloseWithInParentheses, eor, eq, equals, getAlias, getConsistentTypeForParameterComparison, getExpressionList, getLogicSetExpression, getMapping, getNonAliasExpression, getQueryExpression, gt, gteq, in, instanceOf, ior, lt, lteq, mod, mul, neg, not, noteq, setParameterName, sub, toStatementText, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionLiteral

public CollectionLiteral(QueryExpression qs,
                         JavaTypeMapping mapping,
                         java.util.Collection value)
Constructor.

Parameters:
qs - The QueryStatement the CollectionLiteral will be used in.
value - The transient Collection that is the value.
mapping - The mapping to the Collection
Method Detail

containsMethod

public BooleanExpression containsMethod(ScalarExpression expr)
Method to check the containing of an element. Return the BooleanExpression that results from CollectionLiteral.contains(SQLExpression).

Parameters:
expr - The SQLExpression that is checked for membership in the Collection
Returns:
The BooleanExpression that results from CollectionLiteral.contains(SQLExpression).

isEmptyMethod

public BooleanExpression isEmptyMethod()
Method to check for emptiness of the collection.

Returns:
The BooleanExpression.


Copyright © 2010. All Rights Reserved.