com.metamatrix.query.sql.lang
Class DependentSetCriteria

java.lang.Object
  extended by com.metamatrix.query.sql.lang.Criteria
      extended by com.metamatrix.query.sql.lang.PredicateCriteria
          extended by com.metamatrix.query.sql.lang.AbstractSetCriteria
              extended by com.metamatrix.query.sql.lang.DependentSetCriteria
All Implemented Interfaces:
LanguageObject, ValueIteratorProvider, java.io.Serializable, java.lang.Cloneable

public class DependentSetCriteria
extends AbstractSetCriteria

The DependentSetCriteria is missing the value set until it is filled during processing. This allows a criteria to contain a dynamic set of values provided by a separate processing node.

Since:
5.0.1
See Also:
Serialized Form

Constructor Summary
DependentSetCriteria(Expression expr)
          Construct with the left expression
 
Method Summary
 void acceptVisitor(LanguageVisitor visitor)
          Method for accepting a visitor.
 java.lang.Object clone()
          Deep copy of object.
 boolean equals(java.lang.Object obj)
          Override equals() method.
 Expression getValueExpression()
          Get the independent value expression
 ValueIterator getValueIterator()
          Returns a ValueIterator to obtain the values in this IN criteria's value set.
 ValueIteratorSource getValueIteratorSource()
          Get the valute iterator source, which will provide the iterator when it is ready during processing.
 int hashCode()
          Get hash code.
 void setValueExpression(Expression valueExpression)
          Set the independent value expression
 void setValueIterator(ValueIterator valueIterator)
          This method is not supported for DependentSetCriteria as it will obtain it's value iterators for the ValueIteratorSource.
 void setValueIteratorSource(ValueIteratorSource valueIteratorSource)
          Set the value iterator source, which will provide value iterators during processing.
 
Methods inherited from class com.metamatrix.query.sql.lang.AbstractSetCriteria
getExpression, isNegated, setExpression, setNegated
 
Methods inherited from class com.metamatrix.query.sql.lang.Criteria
combineCriteria, combineCriteria, combineCriteria, separateCriteriaByAnd, toConjunctiveNormalForm, toDisjunctiveNormalForm, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DependentSetCriteria

public DependentSetCriteria(Expression expr)
Construct with the left expression

Method Detail

getValueIteratorSource

public ValueIteratorSource getValueIteratorSource()
Get the valute iterator source, which will provide the iterator when it is ready during processing.

Returns:
Returns the valueIteratorSource.

setValueIteratorSource

public void setValueIteratorSource(ValueIteratorSource valueIteratorSource)
Set the value iterator source, which will provide value iterators during processing.

Parameters:
valueIteratorSource - The valueIteratorSource to set.

getValueExpression

public Expression getValueExpression()
Get the independent value expression

Returns:
Returns the valueExpression.

setValueExpression

public void setValueExpression(Expression valueExpression)
Set the independent value expression

Parameters:
valueExpression - The valueExpression to set.

getValueIterator

public ValueIterator getValueIterator()
Returns a ValueIterator to obtain the values in this IN criteria's value set. This method can only be safely called if the ValueIteratorSource is ready.

Specified by:
getValueIterator in interface ValueIteratorProvider
Specified by:
getValueIterator in class AbstractSetCriteria
Returns:
this object's ValueIterator instance
Throws:
MetaMatrixRuntimeException - if the subquery for this set criteria has not yet been processed and no value iterator is available
See Also:
AbstractSetCriteria.getValueIterator()

acceptVisitor

public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface: LanguageObject
Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.

Parameters:
visitor - Visitor being used

hashCode

public int hashCode()
Get hash code. WARNING: The hash code is based on data in the criteria. If data values are changed, the hash code will change - don't hash this object and change values.

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code

equals

public boolean equals(java.lang.Object obj)
Override equals() method.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Other object
Returns:
True if equal

clone

public java.lang.Object clone()
Deep copy of object. The values iterator source of this object will not be cloned - it will be passed over as is and shared with the original object, just like Reference.

Specified by:
clone in interface LanguageObject
Specified by:
clone in class AbstractSetCriteria
Returns:
Deep copy of object

setValueIterator

public void setValueIterator(ValueIterator valueIterator)
This method is not supported for DependentSetCriteria as it will obtain it's value iterators for the ValueIteratorSource.

Specified by:
setValueIterator in interface ValueIteratorProvider
Specified by:
setValueIterator in class AbstractSetCriteria
Parameters:
valueIterator - an instance of ValueIterator to be set on this ValueIterator provider (as in the case of subquery containers whose results are provided externally).
Throws:
java.lang.UnsupportedOperationException - Always
See Also:
AbstractSetCriteria.setValueIterator(com.metamatrix.query.sql.util.ValueIterator)


Copyright © 2009. All Rights Reserved.