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
DateRangefor relative range of dates.- Author:
- Sergey Prilukin
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringDATE_RANGE_REGEXPstatic intDEFAULT_WEEK_START_DAYstatic StringPROPERTIES_FILE_NAMEstatic StringPROPERTY_WEEK_START_DAYstatic StringWEEK_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 CalendargetCalendar()protected DategetCurrentDate()DategetEnd()StringgetExpression()Returns string which represents date range expression.protected PatterngetPattern()protected PropertiesgetProperties()protected StringgetPropertiesFileName()DategetStart()protected intgetWeekStart()protected voidsetProperties(Properties props)protected voidvalidateExpression(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:
validateExpressionin classAbstractDateRange- Throws:
InvalidDateRangeExpressionException
-
getExpression
public String getExpression()
Description copied from interface:DateRangeExpressionReturns string which represents date range expression.- Specified by:
getExpressionin 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()
-
-