org.apache.openjpa.jdbc.kernel.exps
Class ContainsExpression

java.lang.Object
  extended by org.apache.openjpa.jdbc.kernel.exps.CompareEqualExpression
      extended by org.apache.openjpa.jdbc.kernel.exps.EqualExpression
          extended by org.apache.openjpa.jdbc.kernel.exps.ContainsExpression
All Implemented Interfaces:
Serializable, Exp, Expression
Direct Known Subclasses:
ContainsKeyExpression

 class ContainsExpression
extends EqualExpression

Tests whether one value contains another.

Author:
Abe White

Constructor Summary
ContainsExpression(Val val1, Val val2)
          Constructor.
 
Method Summary
 ExpState initialize(Select sel, ExpContext ctx, Map contains)
          Initialize the expression.
protected  boolean isDirectComparison()
          Subclasses can override this method if, when they compare to another, value, the comparison is indirect.
 
Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.EqualExpression
appendTo
 
Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.CompareEqualExpression
acceptVisit, appendTo, getValue1, getValue2, selectColumns
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainsExpression

public ContainsExpression(Val val1,
                          Val val2)
Constructor. Supply values to test.

Method Detail

initialize

public ExpState initialize(Select sel,
                           ExpContext ctx,
                           Map contains)
Description copied from interface: Exp
Initialize the expression. This method should recursively initialize any sub-expressions or values.

Specified by:
initialize in interface Exp
Overrides:
initialize in class CompareEqualExpression
contains - map of relation paths to the number of times the paths appear in a contains() expression; used to ensure paths used for contains() within the same AND expression used different aliases

isDirectComparison

protected boolean isDirectComparison()
Description copied from class: CompareEqualExpression
Subclasses can override this method if, when they compare to another, value, the comparison is indirect. For example, field.contains (x) should compare element values to null, not the field itself.

Overrides:
isDirectComparison in class CompareEqualExpression


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.