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 information of related formulas.


Method Summary
 java.lang.String getExpression()
          Gets the expression of this FormulaInfo.
 java.lang.String getMappingName()
          Gets the name of this FormulaInfo.
 java.lang.String getValue()
          Gets 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()
Gets the value of this FormulaInfo.

Returns:
the value of this FormulaInfo.

getMappingName

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

Returns:
the name of this FormulaInfo.

getExpression

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

Returns:
the expression of this FormulaInfo.

isNonSQLCriterion

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

           return @"Customers_Customer ID";
        

It is easy to translate it 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 an SQL criterion formula. But for other complex formulas, for example, for formulas containing "if else" statements, they can not be contained in the final SQL string. If inserting such a complex formula in SQL criterion, we call it a non-SQL criterion formula. Non-SQL criterion formulas are handled in JReport, so users do not need to handle criteria containing 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.