|
||||||||||
| 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.FormatParser
org.pentaho.reporting.engine.classic.core.filter.DateFormatParser
public class DateFormatParser
Parses a String into a java.util.Date. The string is read from the given datasource and then parsed by the dateformat contained in this FormatParser.
| Constructor Summary | |
|---|---|
DateFormatParser()
Creates a new 'date format parser'. |
|
| Method Summary | |
|---|---|
DateFormat |
getDateFormat()
Returns the format for this filter. |
Object |
getValue(ExpressionRuntime runtime,
Element element)
Returns the parsed object. |
void |
setDateFormat(DateFormat format)
Sets the format for the filter. |
void |
setFormatter(Format format)
Sets the format for the filter. |
void |
setNullValue(Object nullvalue)
Sets the value that will be displayed if the data source supplies a null value. |
| Methods inherited from class org.pentaho.reporting.engine.classic.core.filter.FormatParser |
|---|
clone, getDataSource, getFormatter, getNullValue, setDataSource |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateFormatParser()
| Method Detail |
|---|
public DateFormat getDateFormat()
NullPointerException - if the given format is nullpublic void setDateFormat(DateFormat format)
format - The format.
NullPointerException - if the given format is nullpublic void setFormatter(Format format)
setFormatter in class FormatParserformat - The format.
NullPointerException - if the given format is null
ClassCastException - if an invalid formater is set.
public Object getValue(ExpressionRuntime runtime,
Element element)
FormatParser
getValue in interface DataSourcegetValue in class FormatParserruntime - 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 void setNullValue(Object nullvalue)
setNullValue in class FormatParsernullvalue - the nullvalue returned when parsing failed.
ClassCastException - if the value is no date or not null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||