Package 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:
Serializable
,DateRange
,DateRangeExpression
- Direct Known Subclasses:
RelativeTimestampRange
public class RelativeDateRange extends AbstractDateRange implements DateRangeExpression
Implementation of
DateRange
for relative range of dates.- Author:
- Sergey Prilukin
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DATE_RANGE_REGEXP
static int
DEFAULT_WEEK_START_DAY
static String
PROPERTIES_FILE_NAME
static String
PROPERTY_WEEK_START_DAY
static String
WEEK_START_DAY_KEY
-
Fields inherited from class net.sf.jasperreports.types.date.AbstractDateRange
expression, timeZone
-
-
Constructor Summary
Constructors Constructor Description RelativeDateRange(String expression)
RelativeDateRange(String expression, TimeZone timeZone, Integer weekStart)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Calendar
getCalendar()
protected Date
getCurrentDate()
Date
getEnd()
String
getExpression()
Returns string which represents date range expression.protected Pattern
getPattern()
protected Properties
getProperties()
protected String
getPropertiesFileName()
Date
getStart()
protected int
getWeekStart()
protected void
setProperties(Properties props)
protected void
validateExpression(String expression)
-
Methods inherited from class net.sf.jasperreports.types.date.AbstractDateRange
toString
-
-
-
-
Field Detail
-
DATE_RANGE_REGEXP
public static final 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 String WEEK_START_DAY_KEY
- See Also:
- Constant Field Values
-
PROPERTIES_FILE_NAME
public static final String PROPERTIES_FILE_NAME
- See Also:
- Constant Field Values
-
PROPERTY_WEEK_START_DAY
public static final String PROPERTY_WEEK_START_DAY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPattern
protected Pattern getPattern()
-
validateExpression
protected void validateExpression(String expression) throws InvalidDateRangeExpressionException
- Overrides:
validateExpression
in classAbstractDateRange
- Throws:
InvalidDateRangeExpressionException
-
getExpression
public String getExpression()
Description copied from interface:DateRangeExpression
Returns string which represents date range expression.- Specified by:
getExpression
in interfaceDateRangeExpression
- Returns:
- relative date expression as a string.
-
getWeekStart
protected int getWeekStart()
-
getPropertiesFileName
protected String getPropertiesFileName()
-
getCurrentDate
protected Date getCurrentDate()
-
setProperties
protected void setProperties(Properties props)
-
getProperties
protected Properties getProperties()
-
getCalendar
protected Calendar getCalendar()
-
-