org.objectweb.medor.tuple.api
Interface TupleLoader
- GeneralTupleLoader
public interface TupleLoader
This interface
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.
|
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.
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.
source
- The source tuple to be loadeddestination
- The array of VariableOperands into which the Tuple
will be loadedparameters
- The array of input ParameterOperands.