net.sf.jasperreports.types.date

## Class RelativeDateRange

- java.lang.Object
- - net.sf.jasperreports.types.date.AbstractDateRange
  - - net.sf.jasperreports.types.date.RelativeDateRange

- All Implemented Interfaces:
    java.io.Serializable, DateRange, DateRangeExpression
  Direct Known Subclasses:
    RelativeTimestampRange

      public class RelativeDateRange
      extends AbstractDateRange
      implements DateRangeExpression

  Implementation of `DateRange` for relative range of dates.

  Version:
    $Id: RelativeDateRange.java 5880 2013-01-07 20:40:06Z teodord $
  Author:
    Sergey Prilukin
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DATE_RANGE_REGEXP`
    `static int` | `DEFAULT_WEEK_START_DAY`
    `static java.lang.String` | `PROPERTIES_FILE_NAME`
    `static java.lang.String` | `WEEK_START_DAY_KEY`

    - ### Fields inherited from class net.sf.jasperreports.types.date.AbstractDateRange

      `expression, timeZone`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RelativeDateRange(java.lang.String expression)`
    `RelativeDateRange(java.lang.String expression, java.util.TimeZone timeZone, java.lang.Integer weekStart)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.util.Calendar` | `getCalendar()`
    `protected java.util.Date` | `getCurrentDate()`
    `java.util.Date` | `getEnd()`
    `java.lang.String` | `getExpression()` Returns string which represents date range expression.
    `protected java.util.regex.Pattern` | `getPattern()`
    `protected java.util.Properties` | `getProperties()`
    `protected java.lang.String` | `getPropertiesFileName()`
    `java.util.Date` | `getStart()`
    `protected int` | `getWeekStart()`
    `protected void` | `setProperties(java.util.Properties props)`
    `protected void` | `validateExpression(java.lang.String expression)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DATE_RANGE_REGEXP

          public static final java.lang.String DATE_RANGE_REGEXP

      See Also:
        Constant Field Values

    - #### DEFAULT_WEEK_START_DAY

          public static final int DEFAULT_WEEK_START_DAY

      See Also:
        Constant Field Values

    - #### WEEK_START_DAY_KEY

          public static final java.lang.String WEEK_START_DAY_KEY

      See Also:
        Constant Field Values

    - #### PROPERTIES_FILE_NAME

          public static final java.lang.String PROPERTIES_FILE_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RelativeDateRange

          public RelativeDateRange(java.lang.String expression)

    - #### RelativeDateRange

          public RelativeDateRange(java.lang.String expression,
                           java.util.TimeZone timeZone,
                           java.lang.Integer weekStart)

  - ### Method Detail

    - #### getPattern

          protected java.util.regex.Pattern getPattern()

    - #### validateExpression

          protected void validateExpression(java.lang.String expression)
                                     throws InvalidDateRangeExpressionException

      Overrides:
        `validateExpression` in class `AbstractDateRange`
      Throws:
        `InvalidDateRangeExpressionException`

    - #### getExpression

          public java.lang.String getExpression()

      Description copied from interface: `DateRangeExpression`
      Returns string which represents date range expression.
      Specified by:
        `getExpression` in interface `DateRangeExpression`
      Returns:
        relative date expression as a string.

    - #### getWeekStart

          protected int getWeekStart()

    - #### getPropertiesFileName

          protected java.lang.String getPropertiesFileName()

    - #### getCurrentDate

          protected java.util.Date getCurrentDate()

    - #### setProperties

          protected void setProperties(java.util.Properties props)

    - #### getProperties

          protected java.util.Properties getProperties()

    - #### getStart

          public java.util.Date getStart()

      Specified by:
        `getStart` in interface `DateRange`

    - #### getEnd

          public java.util.Date getEnd()

      Specified by:
        `getEnd` in interface `DateRange`

    - #### getCalendar

          protected java.util.Calendar getCalendar()

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com