org.objectweb.medor.eval.lib
Class BinaryImplicitTC

java.lang.Object
  extended byorg.objectweb.medor.eval.lib.BasicBinaryEvalutedTC
      extended byorg.objectweb.medor.eval.lib.BinaryImplicitTC
All Implemented Interfaces:
BinaryEvaluatedTC, TupleCollection

public class BinaryImplicitTC
extends BasicBinaryEvalutedTC
implements BinaryEvaluatedTC

This class represents TupleCollection result of filtering or joining then projecting of two sub TupleCollection.

It is typically used for performing JoinProject and Intersection Operations. The indexes of the sub TupleCollection are getted by the to methods: getRightTCCursor() and getLeftTCCursor(). The type of the evaluation used is the Iterative one.


Field Summary
 
Fields inherited from class org.objectweb.medor.eval.lib.BasicBinaryEvalutedTC
closed, debug, log
 
Constructor Summary
BinaryImplicitTC(QueryNode query, NodeEvaluator leftNodeEvaluator, NodeEvaluator rightNodeEvaluator, ParameterOperand[] parameters)
           
 
Method Summary
 int card()
           
 void close()
          It closes the TupleCollection, relaeases used resources (example : ResultSet).
 void first()
          Moves the cursor to the first Tuple, row number 1.
 int getLeftTCCursor()
          Get the current row of the left TupleCollection
 TupleStructure getMetaData()
          Retrieves the number,types and stors properties of the data sources of this TupleCollection Object.
 int getRightTCCursor()
          Get the current row of the right TupleCollection
 int getRow()
          Retrieves the current row Number.
 Tuple getTuple()
          Returns the Tuple value of the current row of this TupleCollection object.
 Tuple getTuple(int numTuple)
          Returns the Tuple value of the designeted row of this TupleCollection object.
 boolean isEmpty()
          Tell whether the current TupleCollection Object is empty or no.
 boolean isLast()
          Indicates whether the cursor is on the last row of this TupleCollection object.
 boolean next()
          Moves the cursor down one row from its current position to the next tuple of this TupleCollection object.
 boolean row(int numTuple)
          Moves the cursor to the given row number in this TupleCollection object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryImplicitTC

public BinaryImplicitTC(QueryNode query,
                        NodeEvaluator leftNodeEvaluator,
                        NodeEvaluator rightNodeEvaluator,
                        ParameterOperand[] parameters)
                 throws MedorException
Method Detail

getMetaData

public TupleStructure getMetaData()
                           throws MedorException
Description copied from interface: TupleCollection
Retrieves the number,types and stors properties of the data sources of this TupleCollection Object.

Specified by:
getMetaData in interface TupleCollection
Returns:
a TupleCollectionMetaData Object defining teh TupleCollection.
Throws:
MedorException - if a data source access error occurs

isLast

public boolean isLast()
               throws MedorException
Description copied from interface: TupleCollection
Indicates whether the cursor is on the last row of this TupleCollection object.

Specified by:
isLast in interface TupleCollection
Returns:
true if the current Tuple is the last one or if the TupleCollection is Empty.
Throws:
MedorException - if data source access error

close

public void close()
           throws MedorException
Description copied from interface: TupleCollection
It closes the TupleCollection, relaeases used resources (example : ResultSet). The next uses of the TupleCollection will throw an exception.

Specified by:
close in interface TupleCollection
Overrides:
close in class BasicBinaryEvalutedTC
Throws:
MedorException

card

public int card()
         throws MedorException
Throws:
MedorException

next

public boolean next()
             throws MedorException
Description copied from interface: TupleCollection
Moves the cursor down one row from its current position to the next tuple of this TupleCollection object.

Specified by:
next in interface TupleCollection
Returns:
true if move is impossible and false if move is not performed.
Throws:
MedorException - if data source access error

first

public void first()
           throws MedorException
Description copied from interface: TupleCollection
Moves the cursor to the first Tuple, row number 1.

Specified by:
first in interface TupleCollection
Throws:
MedorException - if data source access error

getRow

public int getRow()
           throws MedorException
Description copied from interface: TupleCollection
Retrieves the current row Number.

Specified by:
getRow in interface TupleCollection
Returns:
-1 if the iterator is out of bounds of the TupleCollection or if it is empty.
Throws:
MedorException - if data source access error.

getTuple

public Tuple getTuple()
               throws MedorException
Description copied from interface: TupleCollection
Returns the Tuple value of the current row of this TupleCollection object.

Specified by:
getTuple in interface TupleCollection
Returns:
the value of the current Tuple.
Throws:
MedorException - if data source access error.

isEmpty

public boolean isEmpty()
                throws MedorException
Description copied from interface: TupleCollection
Tell whether the current TupleCollection Object is empty or no.

Specified by:
isEmpty in interface TupleCollection
Returns:
true if the TupleCollection is empty.
Throws:
MedorException - if data source access error.

row

public boolean row(int numTuple)
            throws MedorException
Description copied from interface: TupleCollection
Moves the cursor to the given row number in this TupleCollection object. The first row is row 1, the second is row 2, and so on.

Specified by:
row in interface TupleCollection
Returns:
true if move is possible
Throws:
MedorException - if row number is invelid or data source access error

getTuple

public Tuple getTuple(int numTuple)
               throws MedorException
Description copied from interface: TupleCollection
Returns the Tuple value of the designeted row of this TupleCollection object.

Specified by:
getTuple in interface TupleCollection
Parameters:
numTuple - :int
Returns:
the a Tuple Number row.
Throws:
MedorException - if data source access error.

getLeftTCCursor

public int getLeftTCCursor()
                    throws MedorException
Description copied from interface: BinaryEvaluatedTC
Get the current row of the left TupleCollection

Specified by:
getLeftTCCursor in interface BinaryEvaluatedTC
Returns:
an int
Throws:
MedorException - if error in left TupleCollection

getRightTCCursor

public int getRightTCCursor()
                     throws MedorException
Description copied from interface: BinaryEvaluatedTC
Get the current row of the right TupleCollection

Specified by:
getRightTCCursor in interface BinaryEvaluatedTC
Returns:
an int
Throws:
MedorException - if error in right TupleCollection