com.gridsystems.beanfilter
Class EvalValue

java.lang.Object
  extended by com.gridsystems.beanfilter.EvalValue
Direct Known Subclasses:
ArrayValue, BooleanValue, CollectionValue, EvalNode, FieldValue, NullValue, NumValue, ParenthesisValue, SelectWhereValue, SizeOfValue, StringValue, ThisValue, VariableValue

public abstract class EvalValue
extends java.lang.Object

Type description.

Version:
1.0
Author:
Rodrigo Ruiz, Xmas

Field Summary
static int BOOLEAN
          Boolean type.
static int COLLECTION
          Collection type.
static int NUMBER
          Numeric type.
static int STRING
          String type.
static int UNKNOWN
          Unknown type.
static int VOID
          Void type.
 
Constructor Summary
EvalValue(int linePos, int charPos)
          Creates a new instance.
 
Method Summary
 int getCharPos()
          Gets the char position of the beginning of this value in the filter expression.
abstract  java.lang.Class<?> getClassValue(java.lang.Class<?> parentClass)
           
 int getLinePos()
          Gets the line position of the beginning of this value in the filter expression.
abstract  java.lang.Object getValue(java.lang.Object src)
          Gets the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOLEAN

public static final int BOOLEAN
Boolean type.

See Also:
Constant Field Values

NUMBER

public static final int NUMBER
Numeric type.

See Also:
Constant Field Values

STRING

public static final int STRING
String type.

See Also:
Constant Field Values

COLLECTION

public static final int COLLECTION
Collection type.

See Also:
Constant Field Values

VOID

public static final int VOID
Void type.

See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
Unknown type.

See Also:
Constant Field Values
Constructor Detail

EvalValue

public EvalValue(int linePos,
                 int charPos)
Creates a new instance.

Parameters:
linePos - The line token position
charPos - The char token position
Method Detail

getValue

public abstract java.lang.Object getValue(java.lang.Object src)
                                   throws EvalException
Gets the value.

Parameters:
src - The data source
Returns:
The value
Throws:
EvalException - FTR005: Unknown field path
EvalException - FTR006: Invalid operand
EvalException - FTR007: Pattern syntax error

getLinePos

public int getLinePos()
Gets the line position of the beginning of this value in the filter expression.

Returns:
The line position of this value in the filter expression

getCharPos

public int getCharPos()
Gets the char position of the beginning of this value in the filter expression.

Returns:
The char position of this value in the filter expression

getClassValue

public abstract java.lang.Class<?> getClassValue(java.lang.Class<?> parentClass)
                                          throws EvalException
Parameters:
parentClass - Parent Class
Returns:
Return the Java Class that represents or null if it is unknown.
Throws:
EvalException - If an error occurs


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.