ElegantJCharts Java API Specification v2.0

com.elegantj.data.comp.computedfield
Class ComputableField

java.lang.Object
  |
  +--com.elegantj.data.comp.computedfield.ComputableField
All Implemented Interfaces:
Computable, java.io.Serializable

public class ComputableField
extends java.lang.Object
implements Computable

This bean provides the expression executor to parse the expression (arithmetical/database related) and to execute it. It also provides the support to the MethodsClass to get the functionality of the database related activities.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.elegantj.data.comp.computedfield.Computable
serialVersionUID
 
Constructor Summary
ComputableField()
          Creates a ComputedField
 
Method Summary
 java.lang.Object executeExp()
          Executes the expression
 java.util.Hashtable getCatagorizedMethods()
          Returns the valid methods to use in the expression
 java.util.Vector getColumnData(int colIndex)
          Returns the column values of the column at colIndex
 java.util.Vector getColumnData(java.lang.String colName)
          Returns the column values of the column colName
 java.util.Vector getColumnData(java.lang.String summaryColumn, java.lang.String groupColumn)
          Returns the crosstab column values of the column at colIndex for given column
 int getColumnIndex(java.lang.String colName)
          Returns the index for the specified column
 java.util.Vector getColumnNames()
          Returns the column names
 java.util.Vector getColumnTypes()
          Returns the column types
 int getCurrentIndex()
          Returns the current index
 java.util.Vector getCurrentRecord()
          Returns the current record
 java.util.Vector getData()
          Returns the data for computation
 java.lang.String getExpression()
          Gets the expression string to be executed
 java.util.Vector getGroupConditions()
          Returns the vector of group bands
 java.lang.String[] getMethods()
          Returns the valid methods to use in the expression
 java.lang.String[] getOperators()
          Returns the valid operators to use in the expression
 java.util.Vector getVariables()
          Returns the used variables
 void setColumnNames(java.util.Vector columnNames)
          Sets the column names
 void setColumnTypes(java.util.Vector columnTypes)
          Sets the column types
 void setCurrentIndex(int index)
          Sets the current index
 void setData(java.util.Vector data)
          Sets the data for computation
 void setExpression(java.lang.String exp)
          Sets the expression string to be executed
 void setGroupConditions(java.util.Vector sCondition)
          Sets the vector of group bands
 boolean verifyExp()
          Checks the expression whether it is valid or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComputableField

public ComputableField()
Creates a ComputedField

Method Detail

setExpression

public void setExpression(java.lang.String exp)
Sets the expression string to be executed

Specified by:
setExpression in interface Computable
Parameters:
exp - the expression string

getExpression

public java.lang.String getExpression()
Gets the expression string to be executed

Specified by:
getExpression in interface Computable
Returns:
the expression string

verifyExp

public boolean verifyExp()
Checks the expression whether it is valid or not

Specified by:
verifyExp in interface Computable
Returns:
true, if an expression is valid, otherwise false

executeExp

public java.lang.Object executeExp()
Executes the expression

Specified by:
executeExp in interface Computable
Returns:
the result of the expression

setData

public void setData(java.util.Vector data)
Sets the data for computation

Specified by:
setData in interface Computable
Parameters:
data - the vector contains the data

getData

public java.util.Vector getData()
Returns the data for computation

Specified by:
getData in interface Computable
Returns:
the vector contains the data

setGroupConditions

public void setGroupConditions(java.util.Vector sCondition)
Sets the vector of group bands

Specified by:
setGroupConditions in interface Computable
Parameters:
sCondition - the vector contains the group bands

getGroupConditions

public java.util.Vector getGroupConditions()
Returns the vector of group bands

Specified by:
getGroupConditions in interface Computable
Returns:
Vector the vector contains the group bands

setColumnTypes

public void setColumnTypes(java.util.Vector columnTypes)
Sets the column types

Specified by:
setColumnTypes in interface Computable
Parameters:
columnTypes - the vector contains the column Types

getColumnTypes

public java.util.Vector getColumnTypes()
Returns the column types

Specified by:
getColumnTypes in interface Computable
Returns:
the vector contains the column types

getColumnData

public java.util.Vector getColumnData(java.lang.String summaryColumn,
                                      java.lang.String groupColumn)
Returns the crosstab column values of the column at colIndex for given column

Specified by:
getColumnData in interface Computable
Parameters:
summaryColumn - the column on which the computation is performed
groupColumn - the column for which the computation is performed
Returns:
the vector of the column values

getCatagorizedMethods

public java.util.Hashtable getCatagorizedMethods()
Returns the valid methods to use in the expression

Specified by:
getCatagorizedMethods in interface Computable
Returns:
the Hashtable with the method names and its Catagory.

getVariables

public java.util.Vector getVariables()
Returns the used variables

Specified by:
getVariables in interface Computable
Returns:
Vector the all used variables

setColumnNames

public void setColumnNames(java.util.Vector columnNames)
Sets the column names

Specified by:
setColumnNames in interface Computable
Parameters:
columnNames - the vector contains the column names

getColumnNames

public java.util.Vector getColumnNames()
Returns the column names

Specified by:
getColumnNames in interface Computable
Returns:
the vector contains the column names

setCurrentIndex

public void setCurrentIndex(int index)
Sets the current index

Specified by:
setCurrentIndex in interface Computable
Parameters:
index - the index of the record ,being proccessed

getCurrentIndex

public int getCurrentIndex()
Returns the current index

Specified by:
getCurrentIndex in interface Computable
Returns:
the index of the record ,being proccessed

getCurrentRecord

public java.util.Vector getCurrentRecord()
Returns the current record

Specified by:
getCurrentRecord in interface Computable
Returns:
the vector containing the current record values

getColumnData

public java.util.Vector getColumnData(java.lang.String colName)
Returns the column values of the column colName

Specified by:
getColumnData in interface Computable
Parameters:
colName - the column name
Returns:
the vector of the column values

getColumnIndex

public int getColumnIndex(java.lang.String colName)
Returns the index for the specified column

Parameters:
colName - the name of the column
Returns:
the index for the specified column

getColumnData

public java.util.Vector getColumnData(int colIndex)
Returns the column values of the column at colIndex

Specified by:
getColumnData in interface Computable
Parameters:
colIndex - the column index
Returns:
the vector of the column values

getOperators

public java.lang.String[] getOperators()
Returns the valid operators to use in the expression

Specified by:
getOperators in interface Computable
Returns:
the array of the operators

getMethods

public java.lang.String[] getMethods()
Returns the valid methods to use in the expression

Specified by:
getMethods in interface Computable
Returns:
the array of the method names

ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.