Class DateFilter
java.lang.Object
com.sas.services.information.search.DateFilter
- All Implemented Interfaces:
SearchFilter,Serializable
The DateFilter class is used to filter objects based on their metadata created or metadata
modified date values.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDateFilter(DateFilter.DateType type, Date beginDate) Constructs a new date filter that can filter on objects based on a since or begin date.DateFilter(DateFilter.DateType type, Date beginDate, Date endDate) Constructs a new date filter that can filter on objects based on a date range (a range that has a begin and an end date) -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(Object obj) DateReturns the beginning datecom.sas.util.DatePeriodReturns the beginning (or since) date as an actual DatePeriod object.StringGets the label of the range specified by the user.DateReturns the beginning datecom.sas.util.DatePeriodReturns the ending (or before) date as an actual DatePeriod object.Returns the filter component used for processing this search criteriaStringReturns the description of this filter.StringReturns the localized name of this filter.getType()Returns the date typevoidsetDateRangeLabel(String rangeLabel) Sets the date range specified by the user.Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DateFilter
Constructs a new date filter that can filter on objects based on a since or begin date.- Parameters:
type- the date typebeginDate- the begin date to filter on
-
DateFilter
Constructs a new date filter that can filter on objects based on a date range (a range that has a begin and an end date)- Parameters:
type- the date typebeginDate- the begin date, or since date (inclusive)endDate- the end date, or before date (exclusive)
-
-
Method Details
-
getFilterType
public String getFilterType()Description copied from interface:SearchFilterReturns the localized name of this filter. This method is typically used to help identify to the user what type of search is being performed. For instance, a name search, or a type search.- Specified by:
getFilterTypein interfaceSearchFilter- Returns:
- filter type
-
getFilterDescription
public String getFilterDescription()Description copied from interface:SearchFilterReturns the description of this filter. This description is typically used for display purposes, or a log file, to inform the user what the intention of this filter is.- Specified by:
getFilterDescriptionin interfaceSearchFilter- Returns:
- the filter description
-
setDateRangeLabel
public void setDateRangeLabel(String rangeLabel) Sets the date range specified by the user. This is only applicable when the user is filtering based on a date range, such as "year to date".- Parameters:
rangeLabel-
-
getDateRangeLabel
public String getDateRangeLabel()Gets the label of the range specified by the user. For example: "Year to date" or "Week to date". If the user never entered a range, and just manually entered to and from date values, this method will return null.- Returns:
- range label, if available
-
getType
Returns the date type- Returns:
- date type
-
getBeginDatePeriod
public com.sas.util.DatePeriod getBeginDatePeriod()Returns the beginning (or since) date as an actual DatePeriod object.- Returns:
- the beginning date as a DatePeriod
-
getBeginDate
public Date getBeginDate()Returns the beginning date- Returns:
- the beginning date
-
getEndDatePeriod
public com.sas.util.DatePeriod getEndDatePeriod()Returns the ending (or before) date as an actual DatePeriod object.- Returns:
- the ending date as a DatePeriod
-
getEndDate
public Date getEndDate()Returns the beginning date- Returns:
- the beginning date
-
getFilterComponent
Description copied from interface:SearchFilterReturns the filter component used for processing this search criteria- Specified by:
getFilterComponentin interfaceSearchFilter- Returns:
- filter component
-
equals
public boolean equals(Object obj) - Overrides:
equalsin classObject
-