public enum DateRangeEnum extends java.lang.Enum<DateRangeEnum>
Enum Constant and Description |
---|
ALL
ALL.
|
LAST_HALF_YEAR
The last half year.
|
LAST_MONTH
The last month.
|
LAST_THREE_MONTHS
The last three months.
|
LAST_TWO_WEEKS
The last two weeks.
|
LAST_WEEK
The last week.
|
LAST_YEAR
The last year.
|
TODAY
The TODAY.
|
YESTERDAY
The YESTERDAY.
|
Modifier and Type | Method and Description |
---|---|
static java.util.Date |
getDate(DateRangeEnum date,
java.util.Date today)
Gets the date.
|
java.lang.String |
getLabel()
Gets the label of the DateRangeType.
|
static DateRangeEnum |
getTypeByName(java.lang.String dateRangeTypeName)
Gets the type by name.
|
static DateRangeEnum |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DateRangeEnum[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateRangeEnum LAST_TWO_WEEKS
public static final DateRangeEnum YESTERDAY
public static final DateRangeEnum TODAY
public static final DateRangeEnum LAST_WEEK
public static final DateRangeEnum LAST_MONTH
public static final DateRangeEnum LAST_THREE_MONTHS
public static final DateRangeEnum LAST_HALF_YEAR
public static final DateRangeEnum LAST_YEAR
public static final DateRangeEnum ALL
public static DateRangeEnum[] values()
for (DateRangeEnum c : DateRangeEnum.values()) System.out.println(c);
public static DateRangeEnum valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getLabel()
public static java.util.Date getDate(DateRangeEnum date, java.util.Date today)
date
- the datetoday
- the today Is the startdate for this functionpublic static DateRangeEnum getTypeByName(java.lang.String dateRangeTypeName)
dateRangeTypeName
- the date range type name