com.metamatrix.query.processor
Class NullTupleSource

java.lang.Object
  extended by com.metamatrix.query.processor.NullTupleSource
All Implemented Interfaces:
TupleSource

public class NullTupleSource
extends java.lang.Object
implements TupleSource

This class can be used to represent null tuples or no data for an atomic query execution. Example usage is in implementation of partial results feature where we have to return null tuples if there is an error in the execution of atomic query.


Constructor Summary
NullTupleSource(java.util.List elements)
          Constructor that takes the list of elementSymbols that have null rows.
 
Method Summary
 void closeSource()
          Close the tuple source after reading tuples.
 java.util.List getSchema()
          Returns the List of ElementSymbol describing the Tuple Source
 java.util.List nextTuple()
          This method returns a null indicating, that there are no rows in the source.
 void openSource()
          Open the tuple source to read tuples.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullTupleSource

public NullTupleSource(java.util.List elements)

Constructor that takes the list of elementSymbols that have null rows.

Parameters:
elements - List of elementSymbols that this source contains.
Method Detail

getSchema

public java.util.List getSchema()
Description copied from interface: TupleSource
Returns the List of ElementSymbol describing the Tuple Source

Specified by:
getSchema in interface TupleSource
Returns:
the List of elements describing the Tuple Source
See Also:
TupleSource.getSchema()

openSource

public void openSource()

Open the tuple source to read tuples. This method does nothing.


nextTuple

public java.util.List nextTuple()

This method returns a null indicating, that there are no rows in the source.

Specified by:
nextTuple in interface TupleSource
Returns:
list containing the values of the next tuple.

closeSource

public void closeSource()

Close the tuple source after reading tuples. This method does nothing.

Specified by:
closeSource in interface TupleSource


Copyright © 2009. All Rights Reserved.