The atg.service.collections.filter.StartEndDateFilter
class is used to evaluate the objects in a collection based on start and end date properties. ATG Relationship Management includes one component of this class: /atg/registry/CollectionFilters/StartEndDateFilter
.
StartEndDateFilter
has two properties, startDatePropertyName
and endDatePropertyName
that map to Date properties on the objects in the collection. By default, these properties are set to startDate
and endDate
respectively, anticipating that the objects in the collection have properties with these names. Filtering is based on whether objects are “started” or have “ended,” relative to the date the collection filter is executed.
For example, an object remains in the result set collection when the following are both true
:
The object’s
startDate
value is a date that occurs before the day the page is requested or is null. Objects without astartDate
property also remain.The object’s
endDate
value is a date that occurs after the day the page is requested or is null. Objects without anendDate
property also remain.
You can access the StartEndDateFilter
component through the /atg/collections/filter/droplet/StartEndDateFilterDroplet
servlet bean. When you use the servlet bean, the resultant content is cached by default. For more information on caching, see Caching Filtered Content.