com.konakartadmin.app
Class AdminExpression

java.lang.Object
  extended by com.konakartadmin.app.AdminExpression
All Implemented Interfaces:
AdminObjectIf

public class AdminExpression
extends java.lang.Object
implements AdminObjectIf

An expression is used to group combinations of expression variables


Nested Class Summary
protected  class AdminExpression.GroupResult
          Class used to store temporary data when evaluating an expression
 
Field Summary
private  java.lang.String custom1
          Used for custom data
private  java.lang.String custom2
          Used for custom data
private  java.lang.String custom3
          Used for custom data
private  java.lang.String description
          Description of the expression
private  int id
          id
private  java.lang.String name
          Expression name used to identify it
private  int numVariables
          The number of variables contained by the expression
private  AdminExpressionVariable[] variableArray
          An array of expression variables
 
Constructor Summary
AdminExpression()
          Constructor
AdminExpression(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()
           
 java.lang.String getCustom2()
           
 java.lang.String getCustom3()
           
 java.lang.String getDescription()
           
 int getId()
           
 java.lang.String getName()
           
 int getNumVariables()
           
 AdminExpressionVariable[] getVariableArray()
           
 void setCustom1(java.lang.String custom1)
           
 void setCustom2(java.lang.String custom2)
           
 void setCustom3(java.lang.String custom3)
           
 void setDescription(java.lang.String description)
           
 void setId(int id)
           
 void setName(java.lang.String name)
           
 void setNumVariables(int numVariables)
           
 void setVariableArray(AdminExpressionVariable[] variableArray)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private int id
id


name

private java.lang.String name
Expression name used to identify it


description

private java.lang.String description
Description of the expression


numVariables

private int numVariables
The number of variables contained by the expression


custom1

private java.lang.String custom1
Used for custom data


custom2

private java.lang.String custom2
Used for custom data


custom3

private java.lang.String custom3
Used for custom data


variableArray

private AdminExpressionVariable[] variableArray
An array of expression variables

Constructor Detail

AdminExpression

public AdminExpression()
Constructor


AdminExpression

public AdminExpression(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()
Specified by:
toString in interface AdminObjectIf
Overrides:
toString in class java.lang.Object
Returns:
Returns a string containing the attributes of the Expression object.

evaluate

public boolean evaluate()
                 throws KKAdminException
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:
KKAdminException

getId

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

setId

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

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getDescription

public java.lang.String getDescription()
Returns:
the description

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - the description to set

getCustom1

public java.lang.String getCustom1()
Returns:
the custom1

setCustom1

public void setCustom1(java.lang.String custom1)
Parameters:
custom1 - the custom1 to set

getCustom2

public java.lang.String getCustom2()
Returns:
the custom2

setCustom2

public void setCustom2(java.lang.String custom2)
Parameters:
custom2 - the custom2 to set

getCustom3

public java.lang.String getCustom3()
Returns:
the custom3

setCustom3

public void setCustom3(java.lang.String custom3)
Parameters:
custom3 - the custom3 to set

getNumVariables

public int getNumVariables()
Returns:
the numVariables

setNumVariables

public void setNumVariables(int numVariables)
Parameters:
numVariables - the numVariables to set

getVariableArray

public AdminExpressionVariable[] getVariableArray()
Returns:
the variableArray

setVariableArray

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


Copyright © 2011 DS Data Systems UK Ltd.