|
||||||||||
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.DateFieldTemplate
public class DateFieldTemplate
A date field template.
Constructor Summary | |
---|---|
DateFieldTemplate()
Creates a new date field template. |
Method Summary | |
---|---|
Object |
clone()
Clones this template. |
SimpleDateFormat |
getDateFormat()
Returns the date formatter. |
String |
getField()
Returns the field name. |
String |
getFormat()
Returns the date format string. |
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 string that represents null values. |
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 |
setDateFormat(SimpleDateFormat dateFormat)
Sets the date formatter. |
void |
setField(String field)
Sets the field name. |
void |
setFormat(String format)
Sets the date format string. |
void |
setFormula(String formula)
Defines the formula used to compute the value of this data source. |
void |
setNullValue(String nullValue)
Sets the string that represents null values. |
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 DateFieldTemplate()
Method Detail |
---|
public String getFormat()
public void setFormat(String format)
format
- the format string.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
values.
public void setNullValue(String nullValue)
null
values.
nullValue
- the string that represents null
values.public SimpleDateFormat getDateFormat()
public void setDateFormat(SimpleDateFormat dateFormat)
dateFormat
- the date formatter.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 |