com.konakart.app
Class Expression

java.lang.Object
  extended by com.konakart.app.Expression
All Implemented Interfaces:
ExpressionIf

public class Expression
extends java.lang.Object
implements ExpressionIf

An expression is used to group combinations of expression variables


Nested Class Summary
protected  class Expression.GroupResult
          Class used to store temporary data when evaluating an expression
 
Constructor Summary
Expression()
          Constructor
Expression(com.workingdogs.village.Record vr, org.apache.torque.util.Criteria c)
          Instantiates the attributes of the Tag object from a Record object
 
Method Summary
 boolean evaluate()
          The expression is evaluated based on the information found in the array of expression variables.
 java.lang.String getCustom1()
          Used for custom data
 java.lang.String getCustom2()
          Used for custom data
 java.lang.String getCustom3()
          Used for custom data
 java.lang.String getDescription()
          Description of the expression
 int getId()
           
 java.lang.String getName()
          Expression name used to identify it
 int getNumVariables()
           
 ExpressionVariableIf[] getVariableArray()
           
 void setCustom1(java.lang.String custom1)
          Used for custom data
 void setCustom2(java.lang.String custom2)
          Used for custom data
 void setCustom3(java.lang.String custom3)
          Used for custom data
 void setDescription(java.lang.String description)
          Description of the expression
 void setId(int id)
           
 void setName(java.lang.String name)
          Expression name used to identify it
 void setNumVariables(int numVariables)
           
 void setVariableArray(ExpressionVariableIf[] variableArray)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Expression

public Expression()
Constructor


Expression

public Expression(com.workingdogs.village.Record vr,
                  org.apache.torque.util.Criteria c)
           throws com.workingdogs.village.DataSetException
Instantiates the attributes of the Tag object from a Record object

Parameters:
vr - Record containing data
c - Criteria containing column names
Throws:
com.workingdogs.village.DataSetException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Returns a string containing the attributes of the Expression object.

evaluate

public boolean evaluate()
                 throws KKException
The expression is evaluated based on the information found in the array of expression variables. This method assumes that the expression variables are ordered correctly. The ordering should be by group order and then by order.

Returns:
Returns a boolean
Throws:
KKException

getId

public int getId()
Specified by:
getId in interface ExpressionIf
Returns:
the id

setId

public void setId(int id)
Specified by:
setId in interface ExpressionIf
Parameters:
id - the id to set

getName

public java.lang.String getName()
Description copied from interface: ExpressionIf
Expression name used to identify it

Specified by:
getName in interface ExpressionIf
Returns:
the name

setName

public void setName(java.lang.String name)
Description copied from interface: ExpressionIf
Expression name used to identify it

Specified by:
setName in interface ExpressionIf
Parameters:
name - the name to set

getDescription

public java.lang.String getDescription()
Description copied from interface: ExpressionIf
Description of the expression

Specified by:
getDescription in interface ExpressionIf
Returns:
the description

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: ExpressionIf
Description of the expression

Specified by:
setDescription in interface ExpressionIf
Parameters:
description - the description to set

getCustom1

public java.lang.String getCustom1()
Description copied from interface: ExpressionIf
Used for custom data

Specified by:
getCustom1 in interface ExpressionIf
Returns:
the custom1

setCustom1

public void setCustom1(java.lang.String custom1)
Description copied from interface: ExpressionIf
Used for custom data

Specified by:
setCustom1 in interface ExpressionIf
Parameters:
custom1 - the custom1 to set

getCustom2

public java.lang.String getCustom2()
Description copied from interface: ExpressionIf
Used for custom data

Specified by:
getCustom2 in interface ExpressionIf
Returns:
the custom2

setCustom2

public void setCustom2(java.lang.String custom2)
Description copied from interface: ExpressionIf
Used for custom data

Specified by:
setCustom2 in interface ExpressionIf
Parameters:
custom2 - the custom2 to set

getCustom3

public java.lang.String getCustom3()
Description copied from interface: ExpressionIf
Used for custom data

Specified by:
getCustom3 in interface ExpressionIf
Returns:
the custom3

setCustom3

public void setCustom3(java.lang.String custom3)
Description copied from interface: ExpressionIf
Used for custom data

Specified by:
setCustom3 in interface ExpressionIf
Parameters:
custom3 - the custom3 to set

getVariableArray

public ExpressionVariableIf[] getVariableArray()
Returns:
the variableArray

setVariableArray

public void setVariableArray(ExpressionVariableIf[] variableArray)
Parameters:
variableArray - the variableArray to set

getNumVariables

public int getNumVariables()
Specified by:
getNumVariables in interface ExpressionIf
Returns:
the numVariables

setNumVariables

public void setNumVariables(int numVariables)
Specified by:
setNumVariables in interface ExpressionIf
Parameters:
numVariables - the numVariables to set


Copyright © 2011 DS Data Systems UK Ltd.