org.pentaho.reporting.engine.classic.core.filter.types
Class DateFieldType

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.filter.types.DateFieldType
All Implemented Interfaces:
Serializable, Cloneable, DataSource, RawDataSource, ElementType

public class DateFieldType
extends Object
implements ElementType, RawDataSource

Todo: Document Me

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
DateFieldType()
           
 
Method Summary
 Object clone()
          Clones this DataSource.
 void configureDesignTimeDefaults(Element element, Locale locale)
           
 Object getDesignValue(ExpressionRuntime runtime, Element element)
           
 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.
 ElementMetaData getMetaData()
           
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateFieldType

public DateFieldType()
Method Detail

getMetaData

public ElementMetaData getMetaData()
Specified by:
getMetaData in interface ElementType

getDesignValue

public Object getDesignValue(ExpressionRuntime runtime,
                             Element element)
Specified by:
getDesignValue in interface ElementType

getRawValue

public Object getRawValue(ExpressionRuntime runtime,
                          Element element)
Returns the unformated raw value. Whether that raw value is useable for the export is beyond the scope of this API definition, but providing access to Number or Date objects is a good idea.

Specified by:
getRawValue in interface RawDataSource
Parameters:
runtime - the expression runtime that is used to evaluate formulas and expressions when computing the value of this filter.
element -
Returns:
the raw data.

getFormatString

public 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. Not all elements will make use of a format-string. These elements will return FormatSpecification.TYPE_UNDEFINED in that case.

Specified by:
getFormatString in interface RawDataSource
Parameters:
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).
Returns:
a filled format specififcation. If the formatSpecification parameter was not null, this given instance is reused.

getValue

public Object getValue(ExpressionRuntime runtime,
                       Element element)
Returns the current value for the data source.

Specified by:
getValue in interface DataSource
Parameters:
runtime - the expression runtime that is used to evaluate formulas and expressions when computing the value of this filter.
element - the element from which to read attribute.
Returns:
the value.

clone

public Object clone()
             throws CloneNotSupportedException
Clones this DataSource.

Specified by:
clone in interface DataSource
Overrides:
clone in class Object
Returns:
the clone.
Throws:
CloneNotSupportedException - this should never happen.

configureDesignTimeDefaults

public void configureDesignTimeDefaults(Element element,
                                        Locale locale)
Specified by:
configureDesignTimeDefaults in interface ElementType