toolkit.db.api
Class FormulaInfo

java.lang.Object
  extended by toolkit.db.api.FormulaInfo

public class FormulaInfo
extends java.lang.Object

Class FormulaInfo wraps some info of related formulas.


Method Summary
 java.lang.String getExpression()
          Get the expression of this FormulaInfo.
 java.lang.String getMappingName()
          Get the name of this FormulaInfo.
 java.lang.String getValue()
          Get the value of this FormulaInfo.
 boolean isNonSQLCriterion()
          Deprecated since v6.1.
 java.lang.String toString()
          Returns a string representing this FormulaInfo's values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getValue

public java.lang.String getValue()
Get the value of this FormulaInfo.

Returns:
the value of this FormulaInfo.

getMappingName

public java.lang.String getMappingName()
Get the name of this FormulaInfo.

Returns:
the name of this FormulaInfo.

getExpression

public java.lang.String getExpression()
Get the expression of this FormulaInfo.

Returns:
the expression of this FormulaInfo.

isNonSQLCriterion

public boolean isNonSQLCriterion()
Deprecated since v6.1. Check if this formula needs to be handled or not when creating a SQL string. For a simple formula, like:

           return @"Customers_Customer ID";
        

it is easy to translate into Customers.`Customer ID` and it is also valid to form a valid SQL criterion like:

           Customers.`Customer ID` = 15;
        

So if this formula is inserted in SQL criterion, we call it a SQL criterion formula. But for other complecated formulas, for example, having "if else" statement, they can not be contained in the final SQL string. If inserting such a complected formula in SQL criterion, we call it a non SQL criterion formula. Non SQL criterion formulas are handled in JReport, so users need not to handle criteria that have non SQL criterion formulas when creating SQL string.

Returns:
true if this formula is a non SQL criterion formula and is inserted in SQL criterion, otherwise false.

toString

public java.lang.String toString()
Returns a string representing this FormulaInfo's values. The format is as follows:

  className@hashCode[ mappingName | expression | isNonSQLCriterion ]
        

Overrides:
toString in class java.lang.Object
Returns:
a string representing of this FormulaInfo.