|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.medor.filter.lib.BasicOperand
Field Summary | |
protected double |
doubleValue
|
protected boolean |
isDefined
|
protected long |
longValue
|
protected java.lang.Object |
objectValue
|
protected PType |
type
|
Constructor Summary | |
|
BasicOperand(java.lang.Object p,
PType type)
|
protected |
BasicOperand(PType p)
|
Method Summary | |
java.lang.Object |
clone()
|
void |
compileExpression()
Checks the semantic integrity of an expression. |
void |
evaluate(ParameterOperand[] pos,
Tuple t)
It evaluates the expression tree and puts the result into the operand result. |
java.math.BigDecimal |
getBigDecimal()
evalute the expression result and return a string value |
boolean |
getBoolean()
get the operand result as a boolean value |
byte |
getByte()
get the operand result as a byte value |
byte[] |
getByteArray()
get the operand result as a byte[] value |
char |
getChar()
get the operand result as a char value |
char[] |
getCharArray()
get the operand result as a char[] value |
java.util.Date |
getDate()
get the operand result a java.util.Date value |
double |
getDouble()
get the operand result as a double value |
float |
getFloat()
get the operand result as a float value |
int |
getInt()
get the operand result as a byte value |
long |
getLong()
get the operand result as a long value |
java.lang.Object |
getObject()
get the operand result as a java.lang.Object value |
Operand |
getResult()
Gets the operand in wich the result will be put in |
short |
getShort()
get the operand result as a short value |
java.lang.String |
getString()
evalute the expression result and return a string value |
java.sql.Time |
getTime()
get the operand result a java.sql.Time value |
java.sql.Timestamp |
getTimestamp()
get the operand result a java.sql.Timestamp value |
Tuple |
getTuple()
get the operand result as a Tuple value |
TupleCollection |
getTupleCollection()
get the operand result as a TupleCollection value |
PType |
getType()
It gets the result type of this expression |
java.lang.String |
getValueAsString()
It retrieves the value of the operand as a String. |
boolean |
isCompiled()
Gets wether this expression is compiled or not |
boolean |
isDefined()
Indicates if the operand has been defined, ie is the value returned if pertinent |
void |
setIsDefined(boolean isdefined)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected long longValue
protected double doubleValue
protected java.lang.Object objectValue
protected PType type
protected boolean isDefined
Constructor Detail |
protected BasicOperand(PType p)
public BasicOperand(java.lang.Object p, PType type)
Method Detail |
public java.lang.String getValueAsString()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface Cloneable
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public void evaluate(ParameterOperand[] pos, Tuple t) throws MedorException
Expression
evaluate
in interface Expression
pos
- a list of ParameterOperandt
- Tuple
MedorException
- if evaluation errorpublic PType getType()
Expression
getType
in interface Expression
public boolean isDefined()
Operand
isDefined
in interface Operand
public void setIsDefined(boolean isdefined)
setIsDefined
in interface Operand
public boolean getBoolean() throws TypingException
Operand
getBoolean
in interface Operand
TypingException
- if it is impossible to return a boolean valuepublic int getInt() throws TypingException
Operand
getInt
in interface Operand
TypingException
- if it is impossible to return an int valuepublic byte getByte() throws TypingException
Operand
getByte
in interface Operand
TypingException
- if it is impossible to return an int valuepublic byte[] getByteArray() throws TypingException
Operand
getByteArray
in interface Operand
TypingException
- if it is impossible to return an int valuepublic short getShort() throws TypingException
Operand
getShort
in interface Operand
TypingException
- if it is impossible to return a short valuepublic long getLong() throws TypingException
Operand
getLong
in interface Operand
TypingException
- if it is impossible to return a long valuepublic float getFloat() throws TypingException
Operand
getFloat
in interface Operand
TypingException
- if it is impossible to return a float value;public double getDouble() throws TypingException
Operand
getDouble
in interface Operand
TypingException
- if it is impossible to return a double valuepublic char getChar() throws TypingException
Operand
getChar
in interface Operand
TypingException
- if it is impossible to return a char value;public char[] getCharArray() throws TypingException
Operand
getCharArray
in interface Operand
TypingException
- if it is impossible to return a char value;public java.lang.String getString() throws TypingException
Operand
getString
in interface Operand
TypingException
- if it is impossible to return a string valuepublic java.math.BigDecimal getBigDecimal() throws TypingException
Operand
getBigDecimal
in interface Operand
TypingException
- if it is impossible to return a string valuepublic java.util.Date getDate() throws TypingException
Operand
getDate
in interface Operand
TypingException
- if it is impossible to return java.util.Datepublic java.sql.Time getTime() throws TypingException
Operand
getTime
in interface Operand
TypingException
- if it is impossible to return java.sql.Timepublic java.sql.Timestamp getTimestamp() throws TypingException
Operand
getTimestamp
in interface Operand
TypingException
- if it is impossible to return java.sql.Timestamppublic Tuple getTuple() throws TypingException
Operand
getTuple
in interface Operand
TypingException
- if it is impossible to return a Tuplepublic TupleCollection getTupleCollection() throws TypingException
Operand
getTupleCollection
in interface Operand
TypingException
- if it is impossible to return a TupleCollectionpublic java.lang.Object getObject()
Operand
getObject
in interface Operand
public void compileExpression()
Expression
compileExpression
in interface Expression
public boolean isCompiled()
Expression
isCompiled
in interface Expression
public Operand getResult()
Expression
getResult
in interface Expression
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |