Class NumberByDateAggregator
java.lang.Object
de.uplanet.lucy.server.auxiliaries.chart.AbstractNumberAggregator<Date,SumByDateAggregatorBucket>
de.uplanet.lucy.server.auxiliaries.chart.NumberByDateAggregator
public final class NumberByDateAggregator
extends AbstractNumberAggregator<Date,SumByDateAggregatorBucket>
This class can be used to aggregate numbers while grouping them by
date intervals.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal class -
Constructor Summary
ConstructorsConstructorDescriptionNumberByDateAggregator(String p_strMode, TimeZone p_tz) Create an aggregator for date/time values. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an observation.Get an ascendingly ordered list of aggregated values.intGet the day the week starts with.voidsetFirstDayOfWeek(int p_iFirstDayOfWeek) Set the day the week starts with.Methods inherited from class de.uplanet.lucy.server.auxiliaries.chart.AbstractNumberAggregator
getRowComparator, isGroupValueWasNull, isIgnoreIfGroupingValueIsNull, isIgnoreIfRowValueIsNull, isIgnoreIfValueIsNull, isMapNullValueToDefault, isRowValueWasNull, isValueWasNull, setCaseInsensitiveRowComparator, setCaseSensitiveRowComparator, setIgnoreIfGroupingValueIsNull, setIgnoreIfRowValueIsNull, setIgnoreIfValueIsNull, setMapNullValueToDefault, setRowComparator
-
Constructor Details
-
NumberByDateAggregator
Create an aggregator for date/time values.The following aggregation modes are supported:
year: by yearmonth: by monthday: by dayhour: by hourminute: by minutesecond: by secondmillisecond: (should normally not be used)quarter: by quarterweek: by start of the week
- Parameters:
p_strMode- The mode used for aggregation.p_tz- The time zone.
-
-
Method Details
-
getFirstDayOfWeek
public int getFirstDayOfWeek()Get the day the week starts with.- Returns:
- 1 for Sunday, 2 for Monday, ..., 7 for Saturday.
-
setFirstDayOfWeek
public void setFirstDayOfWeek(int p_iFirstDayOfWeek) Set the day the week starts with.- Parameters:
p_iFirstDayOfWeek- The day the weeks starts with (1 for Sunday, 2 for Monday, ..., 7 for Saturday).
-
getAggregatedValues
Get an ascendingly ordered list of aggregated values.- Specified by:
getAggregatedValuesin classAbstractNumberAggregator<Date,SumByDateAggregatorBucket> - Returns:
- The list of aggregated values.
-
add
Add an observation.- Parameters:
p_dt- The "category" value, i.e. the time of the observation.p_strRow- The row value.p_value- The value.p_strSingleId- A an identifier that is being stored as long as there is exactly one such identifier for a group (normally a record ID).
-