Package com.sas.services.information.search

# Class DateFilter

java.lang.Object
com.sas.services.information.search.DateFilter

All Implemented Interfaces:
  `SearchFilter`, `Serializable`

public class DateFilter extends Object implements SearchFilter, Serializable
The DateFilter class is used to filter objects based on their metadata created or metadata modified date values.

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `DateFilter.DateType`
  The type of date to filter on

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DateFilter(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 Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `Date`
  `getBeginDate()`
  Returns the beginning date
  `com.sas.util.DatePeriod`
  `getBeginDatePeriod()`
  Returns the beginning (or since) date as an actual DatePeriod object.
  `String`
  `getDateRangeLabel()`
  Gets the label of the range specified by the user.
  `Date`
  `getEndDate()`
  Returns the beginning date
  `com.sas.util.DatePeriod`
  `getEndDatePeriod()`
  Returns the ending (or before) date as an actual DatePeriod object.
  `FilterComponent`
  `getFilterComponent()`
  Returns the filter component used for processing this search criteria
  `String`
  `getFilterDescription()`
  Returns the description of this filter.
  `String`
  `getFilterType()`
  Returns the localized name of this filter.
  `DateFilter.DateType`
  `getType()`
  Returns the date type
  `void`
  `setDateRangeLabel(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

    public DateFilter(DateFilter.DateType type, Date beginDate)
    Constructs a new date filter that can filter on objects based on a since or begin date.
    Parameters:
      `type` - the date type
      `beginDate` - the begin date to filter on

  - ### DateFilter

    public 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)
    Parameters:
      `type` - the date type
      `beginDate` - 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: `SearchFilter`
    Returns 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:
      `getFilterType` in interface `SearchFilter`
    Returns:
      filter type

  - ### getFilterDescription

    public String getFilterDescription()
    Description copied from interface: `SearchFilter`
    Returns 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:
      `getFilterDescription` in interface `SearchFilter`
    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

    public DateFilter.DateType 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

    public FilterComponent getFilterComponent()
    Description copied from interface: `SearchFilter`
    Returns the filter component used for processing this search criteria
    Specified by:
      `getFilterComponent` in interface `SearchFilter`
    Returns:
      filter component

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`