org.objectweb.medor.tuple.lib
Class GeneralTupleLoader
java.lang.Object
org.objectweb.medor.tuple.lib.GeneralTupleLoader
- All Implemented Interfaces:
- TupleLoader
- public class GeneralTupleLoader
- extends java.lang.Object
- implements TupleLoader
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 sourceBuffer,
VariableOperand[] temp,
ParameterOperand[] parameters)
Loads a source Tuple into an array of Operands. |
void |
setFieldIndexes(int[] indexes)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeneralTupleLoader
public GeneralTupleLoader(int[] ranges,
TupleStructure ts)
loadTuple
public void loadTuple(Tuple sourceBuffer,
VariableOperand[] temp,
ParameterOperand[] parameters)
throws MedorException,
ExpressionException
- Description copied from interface:
TupleLoader
- 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.
- Specified by:
loadTuple
in interface TupleLoader
- Parameters:
sourceBuffer
- The source tuple to be loadedtemp
- The array of VariableOperands into which the Tuple
will be loadedparameters
- The array of input ParameterOperands.
- Throws:
MedorException
ExpressionException
getFieldIndexes
public int[] getFieldIndexes()
- Description copied from interface:
TupleLoader
- 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.
- Specified by:
getFieldIndexes
in interface TupleLoader
setFieldIndexes
public void setFieldIndexes(int[] indexes)
getTupleStructure
public TupleStructure getTupleStructure()
- Specified by:
getTupleStructure
in interface TupleLoader