Class DashboardDateFilter
java.lang.Object
com.gooddata.sdk.model.md.dashboard.filter.DashboardDateFilter
- All Implemented Interfaces:
DashboardFilter,Serializable
Date filter located on analytical dashboard.
Is not standalone metadata object - always must be part of
DashboardFilterContext.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final DateTimeFormatterstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic DashboardDateFilterabsoluteDateFilter(LocalDate from, LocalDate to, String datasetUri) Creates absolute date filter with the given intervalgetFrom()Returns from value of date filter interval.getTo()Returns to value of date filter interval.getType()static DashboardDateFilterrelativeDateFilter(int from, int to, String granularity, String datasetUri) Creates relative date filter with the given interval and granularity.toString()
-
Field Details
-
RELATIVE_FILTER_TYPE
- See Also:
-
ABSOLUTE_FILTER_TYPE
- See Also:
-
DATE_FORMAT
-
-
Method Details
-
relativeDateFilter
public static DashboardDateFilter relativeDateFilter(int from, int to, String granularity, String datasetUri) Creates relative date filter with the given interval and granularity.- Parameters:
from- interval fromto- interval togranularity- granularity (e.g.GDC.time.year)datasetUri- date dataset URI (optional)- Returns:
- created filter
-
absoluteDateFilter
public static DashboardDateFilter absoluteDateFilter(LocalDate from, LocalDate to, String datasetUri) Creates absolute date filter with the given interval- Parameters:
from- interval fromto- interval todatasetUri- date dataset URI (optional)- Returns:
- created filter
-
getFrom
Returns from value of date filter interval. Value represents in the case of:- relative date filter - integer value
- absolute date filter - date value with format
DD-MM-YYYY
- Returns:
- date filter from interval value
-
getTo
Returns to value of date filter interval. Value represents in the case of:- relative date filter - integer value
- absolute date filter - date value with format
YYYY-DD-MM
- Returns:
- date filter from interval value
-
getGranularity
- Returns:
- date interval granularity in the case of relative date filter
-
getDataSet
- Returns:
- date dataset URI of this filter
-
getType
- Returns:
- date filter type, can be either relative or absolute
-
toString
-