org.datanucleus.store.rdbms.sql.expression
Class MapLiteral

java.lang.Object
  extended by org.datanucleus.store.rdbms.sql.expression.SQLExpression
      extended by org.datanucleus.store.rdbms.sql.expression.MapExpression
          extended by org.datanucleus.store.rdbms.sql.expression.MapLiteral
All Implemented Interfaces:
SQLLiteral

public class MapLiteral
extends MapExpression
implements SQLLiteral

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


Nested Class Summary
 class MapLiteral.MapKeyLiteral
          An SQL expression that will test if a column of a table falls within the given Map's keys.
 class MapLiteral.MapValueLiteral
          An SQL expression that will test if a column of a table falls within the given Map's values.
 
Nested classes/interfaces inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
SQLExpression.ColumnExpressionList
 
Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
isParameter, LOCALISER, lowestOperator, mapping, st, stmt, subExprs, table
 
Constructor Summary
MapLiteral(SQLStatement stmt, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping, java.lang.Object value, boolean parameter)
          Constructor for a map literal with a value.
 
Method Summary
 MapLiteral.MapKeyLiteral getKeyLiteral()
           
 java.lang.Object getValue()
          Accessor to the literal value
 MapLiteral.MapValueLiteral getValueLiteral()
           
 void setNotParameter()
          Method to set this literal as not being a parameter.
 
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.MapExpression
eq, invoke, ne
 
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
add, and, cast, checkForAndCorrectParameterComparison, com, div, encloseInParentheses, eor, ge, getJavaTypeMapping, getNumberOfSubExpressions, getSQLStatement, getSQLTable, gt, in, ior, is, isParameter, le, lt, mod, mul, neg, not, sub, toSQLText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapLiteral

public MapLiteral(SQLStatement stmt,
                  org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
                  java.lang.Object value,
                  boolean parameter)
Constructor for a map literal with a value.

Parameters:
stmt - The SQLStatement the MapLiteral will be used in.
mapping - The mapping to the Map
value - The Map that is the value.
parameter - Whether this is a parameter (JDBC "?")
Method Detail

getValue

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

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

getKeyLiteral

public MapLiteral.MapKeyLiteral getKeyLiteral()

getValueLiteral

public MapLiteral.MapValueLiteral getValueLiteral()

setNotParameter

public void setNotParameter()
Description copied from interface: SQLLiteral
Method to set this literal as not being a parameter. If the literal if not currently a parameter then does nothing. Updates any underlying SQL to have the value.

Specified by:
setNotParameter in interface SQLLiteral


Copyright © 2009. All Rights Reserved.