public class DateFormatFilter extends FormatFilter
DateFormat
,
Serialized FormConstructor and Description |
---|
DateFormatFilter()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
DateFormat |
getDateFormat()
Returns the date format object.
|
FormatSpecification |
getFormatString(ExpressionRuntime runtime,
ReportElement element,
FormatSpecification formatSpecification)
Returns information about the formatstring that was used to transform a raw-value into a formatted text.
|
Object |
getRawValue(ExpressionRuntime runtime,
ReportElement element)
Returns the unformated raw value.
|
Object |
getValue(ExpressionRuntime runtime,
ReportElement element)
Returns the formatted string.
|
void |
setDateFormat(DateFormat format)
Sets the date format for the filter.
|
void |
setFormatter(Format format)
Sets the formatter.
|
clone, getDataSource, getFormatter, getNullValue, invalidateCache, setDataSource, setNullValue
public DateFormatFilter()
public DateFormat getDateFormat()
public void setDateFormat(DateFormat format)
format
- The format.NullPointerException
- if the format given is nullpublic void setFormatter(Format format)
setFormatter
in class FormatFilter
format
- The format.ClassCastException
- if the format given is no DateFormatNullPointerException
- if the format given is nullpublic Object getRawValue(ExpressionRuntime runtime, ReportElement element)
RawDataSource
Number
or Date
objects is a good idea.getRawValue
in interface RawDataSource
getRawValue
in class FormatFilter
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of this
filter.public Object getValue(ExpressionRuntime runtime, ReportElement element)
FormatFilter
getValue
in interface DataSource
getValue
in class FormatFilter
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of this
filter.element
- the element for which the data is computed.public FormatSpecification getFormatString(ExpressionRuntime runtime, ReportElement element, FormatSpecification formatSpecification)
RawDataSource
.classic.core.filter.FormatSpecification#TYPE_UNDEFINED
in that case.getFormatString
in interface RawDataSource
getFormatString
in class FormatFilter
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.Copyright © 2002–2017 Pentaho Corporation. All rights reserved.