Class FormulaExpression
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.function.AbstractExpression
-
- org.pentaho.reporting.engine.classic.core.function.FormulaExpression
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Expression
public final class FormulaExpression extends AbstractExpression
The formula expression is used to evaluate a LibFormula/OpenFormula expression. There is generally no need to reference this class directly, as this expression is used automatically if a formula is specified in a element, style-expression or common expression.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FormulaExpression()
Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
getFailOnError()
String
getFormula()
Returns the formula (incuding the optional namespace) as defined by the OpenFormula standard.Exception
getFormulaError()
String
getFormulaExpression()
Returns the formula expression.String
getFormulaNamespace()
Returns the formula namespace.Expression
getInstance()
Return a completly separated copy of this function.Object
getValue()
Return the computed value of the formula.boolean
isFormulaError()
void
setFailOnError(Boolean failOnError)
void
setFormula(String formula)
Defines the formula (including the optional namespace) as defined by the OpenFormula standard.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
clone, getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
-
-
-
-
Method Detail
-
getFailOnError
public Boolean getFailOnError()
-
setFailOnError
public void setFailOnError(Boolean failOnError)
-
getFormula
public String getFormula()
Returns the formula (incuding the optional namespace) as defined by the OpenFormula standard.- Returns:
- the formula as text.
-
getFormulaNamespace
public String getFormulaNamespace()
Returns the formula namespace. If the formula specified by the user starts with "=", then the namespace "report" is assumed.- Returns:
- the namespace of the formula.
-
getFormulaExpression
public String getFormulaExpression()
Returns the formula expression.- Returns:
- the formula expression.
-
setFormula
public void setFormula(String formula)
Defines the formula (including the optional namespace) as defined by the OpenFormula standard.- Parameters:
formula
- the formula as text.
-
getValue
public Object getValue()
Return the computed value of the formula.- Returns:
- the value of the function.
-
isFormulaError
public boolean isFormulaError()
-
getFormulaError
public Exception getFormulaError()
-
getInstance
public Expression getInstance()
Return a completly separated copy of this function. The copy does no longer share any changeable objects with the original function.- Specified by:
getInstance
in interfaceExpression
- Overrides:
getInstance
in classAbstractExpression
- Returns:
- a copy of this function.
-
-