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:
- Cloneable, java.lang.Cloneable, Expression, FieldOperand, Operand, VariableOperand
- public class BasicFieldOperand
- extends BasicVariableOperand
- implements FieldOperand
- Author:
- Sebastien Chassande-Barrioz
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, 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, getBoolean, getByte, getByteArray, getChar, getCharArray, getDate, getDouble, getFloat, getInt, getLong, getObject, getShort, getString, getTime, getTimestamp, getTuple, getTupleCollection, isDefined, setIsDefined |
BasicFieldOperand
public BasicFieldOperand(Field field)
BasicFieldOperand
public BasicFieldOperand(PType type,
Field field)
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 ParameterOperandt
- Tuple
- Throws:
MedorException
- if evaluation error