org.objectweb.medor.tuple.api
Interface TupleLoader

All Known Implementing Classes:
GeneralTupleLoader

public interface TupleLoader

This interface


Method Summary
 int[] getFieldIndexes()
          An integer with position i in this array gives the position of the corresponding field (field number i of the TupleStructure of this QueryNode) in the array made of the concatenation of the array of fields from all children of this QueryNode.
 TupleStructure getTupleStructure()
           
 void loadTuple(Tuple source, VariableOperand[] destination, ParameterOperand[] parameters)
          Loads a source Tuple into an array of Operands.
 

Method Detail

loadTuple

public void loadTuple(Tuple source,
                      VariableOperand[] destination,
                      ParameterOperand[] parameters)
               throws MedorException,
                      ExpressionException
Loads a source Tuple into an array of Operands. The Tuple represents the concatenation of the Tuples from the children nodes of the associated QueryNode. LoadTuple is used after the filter has been sucessfully evaluated to load the current tuple (Tuple) into the memory tuple of this node, represented as an array of Operands. Not all attributes of the source Tuple are loaded into the array of Operand. The choice of which attributes to load is done either by using the array of indexes, which can be set through the setIndexes method, or because the instance of TupleLoader has been compiled for a particular QueryNode for which the indexes are known, and the implementation of loadTuple does the right selection amongst the Tuple attributes.

Parameters:
source - The source tuple to be loaded
destination - The array of VariableOperands into which the Tuple will be loaded
parameters - The array of input ParameterOperands.
Throws:
MedorException
ExpressionException

getFieldIndexes

public int[] getFieldIndexes()
An integer with position i in this array gives the position of the corresponding field (field number i of the TupleStructure of this QueryNode) in the array made of the concatenation of the array of fields from all children of this QueryNode.


getTupleStructure

public TupleStructure getTupleStructure()