|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.filter.templates.AbstractTemplate
org.pentaho.reporting.engine.classic.core.filter.templates.StringFieldTemplate
public class StringFieldTemplate
A string field template.
Constructor Summary | |
---|---|
StringFieldTemplate()
Creates a new string field template. |
Method Summary | |
---|---|
Object |
clone()
Clones the template. |
String |
getField()
Returns the field name. |
FormatSpecification |
getFormatString(ExpressionRuntime runtime,
Element element,
FormatSpecification formatSpecification)
Returns information about the formatstring that was used to transform a raw-value into a formatted text. |
String |
getFormula()
Returns the formula used to compute the value of the data source. |
String |
getNullValue()
Returns the value displayed by the field when the data source value is null . |
Object |
getRawValue(ExpressionRuntime runtime,
Element element)
Returns the unformated raw value. |
Object |
getValue(ExpressionRuntime runtime,
Element element)
Returns the current value for the data source. |
void |
setField(String field)
Sets the field name. |
void |
setFormula(String formula)
Defines the formula used to compute the value of this data source. |
void |
setNullValue(String nullValue)
Sets the value displayed by the field when the data source value is null . |
Methods inherited from class org.pentaho.reporting.engine.classic.core.filter.templates.AbstractTemplate |
---|
getInstance, getName, setName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringFieldTemplate()
Method Detail |
---|
public String getField()
public void setField(String field)
field
- the field name.public String getFormula()
public void setFormula(String formula)
formula
- the formula for the data source.public String getNullValue()
null
.
null
.public void setNullValue(String nullValue)
null
.
nullValue
- the value that represents null
.public Object getValue(ExpressionRuntime runtime, Element element)
getValue
in interface DataSource
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of
this filter.element
-
public Object clone() throws CloneNotSupportedException
clone
in interface DataSource
clone
in class AbstractTemplate
CloneNotSupportedException
- this should never happen.public Object getRawValue(ExpressionRuntime runtime, Element element)
RawDataSource
Number
or Date
objects is a good idea.
getRawValue
in interface RawDataSource
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of
this filter.
public FormatSpecification getFormatString(ExpressionRuntime runtime, Element element, FormatSpecification formatSpecification)
RawDataSource
FormatSpecification.TYPE_UNDEFINED
in that case.
getFormatString
in interface RawDataSource
runtime
- the Expression runtime used to possibly compute the raw-value.element
- the element to which this datasource is added.formatSpecification
- the format specification (can be null). @return a filled format specififcation. If the
formatSpecification
parameter was not null, this given instance is reused.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |