org.pentaho.reporting.engine.classic.core.function
Class DateCutExpression

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.function.AbstractExpression
      extended by org.pentaho.reporting.engine.classic.core.function.DateCutExpression
All Implemented Interfaces:
Serializable, Cloneable, Expression

Deprecated. The VariableDateExpression is much better suited for this purpose.

public class DateCutExpression
extends AbstractExpression

Prunes a date in a calendar-unware way. This method can be used to zero the milli-seconds or seconds and so on from a date-object. For more complex operations, the VariableDateExpression should be used instead.

This expression simply executes a integer division followed by a integer multiplication on the milliseconds since 01-01-1970. For a factor of 1000, this sets the milliseconds to zero.

Author:
Martin Schmid
See Also:
Serialized Form

Constructor Summary
DateCutExpression()
          Deprecated. Default Constructor.
 
Method Summary
 long getFactor()
          Deprecated. Returns the factor by which the date should be pruned.
 String getField()
          Deprecated. Returns the name of the data-row field from where to read the date that should be modified.
 Object getValue()
          Deprecated. Computes the pruned date.
 void setFactor(long factor)
          Deprecated. Defines the factor by which the date should be pruned.
 void setField(String field)
          Deprecated. Defines the name of the data-row field from where to read the date that should be modified.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateCutExpression

public DateCutExpression()
Deprecated. 
Default Constructor. The factor defaults to 1000.

Method Detail

getField

public String getField()
Deprecated. 
Returns the name of the data-row field from where to read the date that should be modified.

Returns:
a field name.

setField

public void setField(String field)
Deprecated. 
Defines the name of the data-row field from where to read the date that should be modified.

Parameters:
field - a field name.

getFactor

public long getFactor()
Deprecated. 
Returns the factor by which the date should be pruned.

Returns:
a factor.

setFactor

public void setFactor(long factor)
Deprecated. 
Defines the factor by which the date should be pruned.

Parameters:
factor - a factor.

getValue

public Object getValue()
Deprecated. 
Computes the pruned date.

Returns:
the value of the function.