com.monad.homerun.model.numeric
Class NumericRelation

java.lang.Object
  extended by com.monad.homerun.model.Relation
      extended by com.monad.homerun.model.numeric.NumericRelation
All Implemented Interfaces:
java.io.Serializable

public class NumericRelation
extends Relation

NumericRelation extends Relation to describe a NumericModel relation

See Also:
Serialized Form

Field Summary
static int FUNCTION_MODE
           
static int LIMIT_MODE
           
static int MODEL_MODE
           
static int VALUE_MODE
           
 
Constructor Summary
NumericRelation()
           
NumericRelation(NumericRelation rel)
           
NumericRelation(java.lang.String domain, java.lang.String modelName, int operator, int mode, java.lang.String comparator, long constVal, java.lang.String numberType)
           
 
Method Summary
 Relation copy()
           
 java.lang.String getComparator()
           
 long getConstant()
           
 int getMode()
           
 java.lang.String getNumberType()
           
 java.lang.String getValue()
           
 boolean holds(java.lang.String objectName, java.lang.String compObjName, Relator relator, Trace trace)
           
 void setNumberType(java.lang.String numberType)
           
 java.lang.String toString()
          Returns a string representation of the relation
 boolean validate(Relator relator, Trace trace)
          Validates the terms of the relation with optional tracing
 
Methods inherited from class com.monad.homerun.model.Relation
getDomain, getModelName, getOperator, isObservable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE_MODE

public static final int VALUE_MODE
See Also:
Constant Field Values

LIMIT_MODE

public static final int LIMIT_MODE
See Also:
Constant Field Values

MODEL_MODE

public static final int MODEL_MODE
See Also:
Constant Field Values

FUNCTION_MODE

public static final int FUNCTION_MODE
See Also:
Constant Field Values
Constructor Detail

NumericRelation

public NumericRelation()

NumericRelation

public NumericRelation(java.lang.String domain,
                       java.lang.String modelName,
                       int operator,
                       int mode,
                       java.lang.String comparator,
                       long constVal,
                       java.lang.String numberType)

NumericRelation

public NumericRelation(NumericRelation rel)
Method Detail

copy

public Relation copy()
Specified by:
copy in class Relation

setNumberType

public void setNumberType(java.lang.String numberType)

toString

public java.lang.String toString()
Description copied from class: Relation
Returns a string representation of the relation

Overrides:
toString in class Relation
Returns:
relation as a string

getMode

public int getMode()

getConstant

public long getConstant()

getComparator

public java.lang.String getComparator()

getNumberType

public java.lang.String getNumberType()

validate

public boolean validate(Relator relator,
                        Trace trace)
Description copied from class: Relation
Validates the terms of the relation with optional tracing

Specified by:
validate in class Relation
Parameters:
relator - - the entity performing the relation comparison
trace - - optional trace object
Returns:
true if relation is valid, otherwise false

holds

public boolean holds(java.lang.String objectName,
                     java.lang.String compObjName,
                     Relator relator,
                     Trace trace)
              throws NoResourceException
Specified by:
holds in class Relation
Throws:
NoResourceException

getValue

public java.lang.String getValue()
Specified by:
getValue in class Relation


Copyright © 2006-2009 Richard Rodgers. All Rights Reserved.