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:
java.io.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 java.lang.StringDATE_RANGE_REGEXPstatic intDEFAULT_WEEK_START_DAYstatic java.lang.StringPROPERTIES_FILE_NAMEstatic java.lang.StringPROPERTY_WEEK_START_DAYstatic java.lang.StringWEEK_START_DAY_KEY-
Fields inherited from class net.sf.jasperreports.types.date.AbstractDateRange
expression, timeZone
-
-
Constructor Summary
Constructors Constructor Description RelativeDateRange(java.lang.String expression)RelativeDateRange(java.lang.String expression, java.util.TimeZone timeZone, java.lang.Integer weekStart)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.CalendargetCalendar()protected java.util.DategetCurrentDate()java.util.DategetEnd()java.lang.StringgetExpression()Returns string which represents date range expression.protected java.util.regex.PatterngetPattern()protected java.util.PropertiesgetProperties()protected java.lang.StringgetPropertiesFileName()java.util.DategetStart()protected intgetWeekStart()protected voidsetProperties(java.util.Properties props)protected voidvalidateExpression(java.lang.String expression)-
Methods inherited from class net.sf.jasperreports.types.date.AbstractDateRange
toString
-
-
-
-
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
-
PROPERTY_WEEK_START_DAY
public static final java.lang.String PROPERTY_WEEK_START_DAY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPattern
protected java.util.regex.Pattern getPattern()
-
validateExpression
protected void validateExpression(java.lang.String expression) throws InvalidDateRangeExpressionException- Overrides:
validateExpressionin classAbstractDateRange- Throws:
InvalidDateRangeExpressionException
-
getExpression
public java.lang.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 java.lang.String getPropertiesFileName()
-
getCurrentDate
protected java.util.Date getCurrentDate()
-
setProperties
protected void setProperties(java.util.Properties props)
-
getProperties
protected java.util.Properties getProperties()
-
getCalendar
protected java.util.Calendar getCalendar()
-
-