Class StatisticsSummaryFilter
java.lang.Object
io.goobi.viewer.model.statistics.usage.StatisticsSummaryFilter
A class holding values by which a
StatisticsSummary
instance should be filtered- Author:
- florian
-
Field Summary
Modifier and TypeFieldDescriptionstatic final LocalDate
LOCAL_DATE_MAX
is not accepted as date by SQL, so this is the max date to use, 3000-12-31static final LocalDate
LOCAL_DATE_MIN
is not accepted as date by SQL, so this is the min date to use, 0000-01-01 -
Method Summary
Modifier and TypeMethodDescriptionstatic StatisticsSummaryFilter
Create an instance for a single record identifierboolean
Check if aendDate
has been set for this filterboolean
Check if a SOLR query has been set for the filterboolean
Check if astartDate
has been set for this filterboolean
Check if the filter is set for a range of datesstatic StatisticsSummaryFilter
Create an instance of a date range and a SOLR querystatic StatisticsSummaryFilter
Create an instance filtering by a single datestatic StatisticsSummaryFilter
ofDateRange
(LocalDate start, LocalDate end) Create an instance for a range of datesstatic StatisticsSummaryFilter
ofDigitalCollection
(String collectionName) Create an instance for all records within a single digital collectionstatic StatisticsSummaryFilter
Create an instance for all records returned by a SOLR query
-
Field Details
-
LOCAL_DATE_MIN
LOCAL_DATE_MIN
is not accepted as date by SQL, so this is the min date to use, 0000-01-01 -
LOCAL_DATE_MAX
LOCAL_DATE_MAX
is not accepted as date by SQL, so this is the max date to use, 3000-12-31
-
-
Method Details
-
getStartDate
- Returns:
- the startDate
-
getEndDate
- Returns:
- the endDate
-
getFilterQuery
- Returns:
- the filterQuery
-
ofDate
Create an instance filtering by a single date- Parameters:
date
-- Returns:
StatisticsSummaryFilter
-
ofDateRange
Create an instance for a range of dates- Parameters:
start
- the first date to includeend
- the last date to include- Returns:
StatisticsSummaryFilter
-
forRecord
Create an instance for a single record identifier- Parameters:
pi
-- Returns:
StatisticsSummaryFilter
-
ofDigitalCollection
Create an instance for all records within a single digital collection- Parameters:
collectionName
-- Returns:
StatisticsSummaryFilter
-
ofQuery
Create an instance for all records returned by a SOLR query- Parameters:
query
- the SOLR query returning all record identifiers which to include in the summary- Returns:
StatisticsSummaryFilter
-
of
Create an instance of a date range and a SOLR query- Parameters:
start
- the first date to includeend
- the last date to includequery
- the SOLR query returning all record identifiers which to include in the summary- Returns:
StatisticsSummaryFilter
-
hasStartDateRestriction
public boolean hasStartDateRestriction()Check if astartDate
has been set for this filter- Returns:
- true if a
startDate
has been set
-
hasEndDateRestriction
public boolean hasEndDateRestriction()Check if aendDate
has been set for this filter- Returns:
- true if a
endDate
has been set
-
isDateRange
public boolean isDateRange()Check if the filter is set for a range of dates- Returns:
- true if the filter is set for a range of dates (more than a single date
-
hasFilterQuery
public boolean hasFilterQuery()Check if a SOLR query has been set for the filter- Returns:
- true if a
filterQuery
has been set for this filter
-