org.objectweb.medor.filter.lib
Class BasicFieldOperand

java.lang.Object
  |
  +--org.objectweb.medor.filter.lib.BasicOperand
        |
        +--org.objectweb.medor.filter.lib.BasicVariableOperand
              |
              +--org.objectweb.medor.filter.lib.BasicFieldOperand
All Implemented Interfaces:
java.lang.Cloneable, Cloneable, Expression, FieldOperand, Operand, VariableOperand

public class BasicFieldOperand
extends BasicVariableOperand
implements FieldOperand

Author:
Sebastien Chassande-Barrioz

Field Summary
 
Fields inherited from class org.objectweb.medor.filter.lib.BasicOperand
doubleValue, isDefined, longValue, objectValue, type
 
Constructor Summary
BasicFieldOperand(Field field)
           
BasicFieldOperand(PType type, Field field)
           
 
Method Summary
 java.lang.Object clone()
           
 void evaluate(ParameterOperand[] pos, Tuple t)
          It evaluates the expression tree and puts the result into the operand result.
 Field getField()
           
 int getIndex()
          The index of this Field in the array made of the concatenation of the tuples from the children QueryTrees.
 PType getType()
          It gets the result type of this expression
 void setField(Field f)
           
 void setIndex(int idx)
           
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.medor.filter.lib.BasicVariableOperand
setType, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
 
Methods inherited from class org.objectweb.medor.filter.lib.BasicOperand
compileExpression, getBigDecimal, getBigInteger, getBoolean, getByte, getByteArray, getChar, getCharArray, getDate, getDouble, getFloat, getInt, getLong, getObject, getResult, getShort, getString, getTime, getTimestamp, getTuple, getTupleCollection, getValueAsString, isCompiled, isDefined, setIsDefined
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.objectweb.medor.filter.api.Operand
getBigDecimal, getBigInteger, getBoolean, getByte, getByteArray, getChar, getCharArray, getDate, getDouble, getFloat, getInt, getLong, getObject, getShort, getString, getTime, getTimestamp, getTuple, getTupleCollection, isDefined, setIsDefined
 
Methods inherited from interface org.objectweb.medor.filter.api.Expression
compileExpression, getResult, isCompiled
 

Constructor Detail

BasicFieldOperand

public BasicFieldOperand(Field field)

BasicFieldOperand

public BasicFieldOperand(PType type,
                         Field field)
Method Detail

getType

public PType getType()
Description copied from interface: Expression
It gets the result type of this expression

Specified by:
getType in interface Expression
Overrides:
getType in class BasicOperand
Returns:
a PType object

getField

public Field getField()
Specified by:
getField in interface FieldOperand

setField

public void setField(Field f)
Specified by:
setField in interface FieldOperand

getIndex

public int getIndex()
Description copied from interface: FieldOperand
The index of this Field in the array made of the concatenation of the tuples from the children QueryTrees. This is required here, since a FieldOperand does not have to be built on a PropagatedField. In other words, the Field associated to this FieldOperand may not be projected in the result of the operation.

Specified by:
getIndex in interface FieldOperand

setIndex

public void setIndex(int idx)
Specified by:
setIndex in interface FieldOperand

toString

public java.lang.String toString()
Overrides:
toString in class BasicOperand

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Specified by:
clone in interface Cloneable
Overrides:
clone in class BasicVariableOperand
java.lang.CloneNotSupportedException

evaluate

public void evaluate(ParameterOperand[] pos,
                     Tuple t)
              throws MedorException
Description copied from interface: Expression
It evaluates the expression tree and puts the result into the operand result.

Specified by:
evaluate in interface Expression
Overrides:
evaluate in class BasicOperand
Parameters:
pos - a list of ParameterOperand
t - Tuple
Throws:
MedorException - if evaluation error