ElegantJ Data Tables Java API Specification v1.1

com.elegantj.data.comp.computedfield
Class ComputableField

java.lang.Object
  extended bycom.elegantj.data.comp.computedfield.ComputableField
All Implemented Interfaces:
Computable

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.


Constructor Summary
ComputableField()
          Creates a ComputedField
 
Method Summary
 java.lang.Object executeExp()
          Executes 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
 int getColumnIndex(java.lang.String colName)
          Returns the index for the specified column
 java.util.Vector getColumnNames()
          Returns the column names
 int getCurrentIndex()
          Returns the current index
 int getCurrentPage()
          Returns the current vertical page index
 int getCurrentPageAcross()
          Returns the current horizontal page 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.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
 int getPageAcrossCount()
          Returns the horizontal page count
 int getPageCount()
          Returns the vertical page count
 void setColumnNames(java.util.Vector columnNames)
          Sets the column names
 void setCurrentIndex(int index)
          Sets the current index
 void setCurrentPage(int n)
          Sets the current vertical page index
 void setCurrentPageAcross(int n)
          Sets the current horizontal page 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 setPageAcrossCount(int n)
          Sets the horizontal page count
 void setPageCount(int n)
          Sets the vertical page count
 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

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

setCurrentPage

public void setCurrentPage(int n)
Sets the current vertical page index

Specified by:
setCurrentPage in interface Computable
Parameters:
n - the current vertical page index

getCurrentPage

public int getCurrentPage()
Returns the current vertical page index

Specified by:
getCurrentPage in interface Computable
Returns:
the current vertical page index

setPageCount

public void setPageCount(int n)
Sets the vertical page count

Specified by:
setPageCount in interface Computable
Parameters:
n - the vertical page count

getPageCount

public int getPageCount()
Returns the vertical page count

Specified by:
getPageCount in interface Computable
Returns:
the vertical page count

setCurrentPageAcross

public void setCurrentPageAcross(int n)
Sets the current horizontal page index

Specified by:
setCurrentPageAcross in interface Computable
Parameters:
n - the current horizontal page index

getCurrentPageAcross

public int getCurrentPageAcross()
Returns the current horizontal page index

Specified by:
getCurrentPageAcross in interface Computable
Returns:
the current horizontal page index

setPageAcrossCount

public void setPageAcrossCount(int n)
Sets the horizontal page count

Specified by:
setPageAcrossCount in interface Computable
Parameters:
n - the horizontal page count

getPageAcrossCount

public int getPageAcrossCount()
Returns the horizontal page count

Specified by:
getPageAcrossCount in interface Computable
Returns:
the horizontal page count

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

ElegantJ Data Tables Java API Specification v1.1

Submit a bug or feature

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