Class MapKeyLiteral

  extended by
      extended by

public class MapKeyLiteral
extends ScalarExpression

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

Nested Class Summary
Nested classes/interfaces inherited from class
ScalarExpression.DatastoreFieldExpression, ScalarExpression.DyadicOperator, ScalarExpression.ExpressionList, ScalarExpression.IllegalArgumentTypeException, ScalarExpression.IllegalOperationException, ScalarExpression.MethodInvocationException, ScalarExpression.MonadicOperator, ScalarExpression.Operator
Field Summary
Fields inherited from class
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
MapKeyLiteral(QueryExpression qs, JavaTypeMapping mapping, java.util.Map map)
Method Summary
 BooleanExpression containsMethod(ScalarExpression expr)
          Method to check the containing of a key in the Map.
 ScalarExpression getMethod(ScalarExpression expr)
          Method to get a value from the Map for a key
 BooleanExpression isEmptyMethod()
          Method to check for emptiness of the collection.
Methods inherited from class
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


public MapKeyLiteral(QueryExpression qs,
                     JavaTypeMapping mapping,
                     java.util.Map map)

qs - The QueryStatement the MapKeyLiteral will be used in.
mapping - The mapping for the Map
map - The transient Map that is the value.
Method Detail


public BooleanExpression containsMethod(ScalarExpression expr)
Method to check the containing of a key in the Map. Return the BooleanExpression that results from MapKeyLiteral.contains(SQLExpression).

expr - The SQLExpression that is checked for membership in the Map.
The BooleanExpression that results from MapKeyLiteral.contains(SQLExpression).


public ScalarExpression getMethod(ScalarExpression expr)
Method to get a value from the Map for a key

expr - The key argument expression
The statement


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

The BooleanExpression.

Copyright © 2010. All Rights Reserved.