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 Classes Modifier and Type Class Description class
NumberByDateAggregator.SortableSumByDateAggregatorBucketList
-
Constructor Summary
Constructors Constructor Description NumberByDateAggregator(String p_strMode, TimeZone p_tz)
Create an aggregator for date/time values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Date p_dt, String p_strRow, Number p_value, String p_strSingleId)
Add an observation.NumberByDateAggregator.SortableSumByDateAggregatorBucketList
getAggregatedValues()
Get an ascendingly ordered list of aggregated values.int
getFirstDayOfWeek()
Get the day the week starts with.void
setFirstDayOfWeek(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 Detail
-
NumberByDateAggregator
public NumberByDateAggregator(String p_strMode, TimeZone p_tz)
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 Detail
-
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
public NumberByDateAggregator.SortableSumByDateAggregatorBucketList getAggregatedValues()
Get an ascendingly ordered list of aggregated values.- Specified by:
getAggregatedValues
in classAbstractNumberAggregator<Date,SumByDateAggregatorBucket>
- Returns:
- The list of aggregated values.
-
add
public void add(Date p_dt, String p_strRow, Number p_value, String p_strSingleId)
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).
-
-