Package com.inet.report.chart.dataset
Class ForAllRecordsDataset
java.lang.Object
com.inet.report.chart.dataset.AbstractDataset
com.inet.report.chart.dataset.ForAllRecordsDataset
- All Implemented Interfaces:
BaseDataset,PieDataset,StandardDataset,Serializable
- Direct Known Subclasses:
ForEachRecordDataset,OneGroupDataset
public class ForAllRecordsDataset
extends com.inet.report.chart.dataset.AbstractDataset
implements StandardDataset, PieDataset
This is a dataset used by standard (bar, line, area) and pie charts.
This evaluates 'for all records' data for several data fields.
- Since:
- 8.0
- See Also:
-
Field Summary
Fields inherited from interface com.inet.report.chart.dataset.BaseDataset
TOKEN_DATASET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nonnull SummaryFieldaddDataField(int summaryOperation, Field field, Field field2nd, int nth) Adds a data field to the list of fields whose values will be calculated by the summary operation and shown in the chart as bar length for example.protected GroupReturns the category group.getChart()Returns the parent chart of this dataset.getDataField(int index) Returns the summary field at the specified position in the list.getDataField(String name) Returns the summary field with the specified name ornullif the summary field with this name not found in the list.Returns the data fields of this dataset as list.intReturns the count of data fields in this dataset.com.inet.report.chart.dataset.LabelProviderReturns the LabelProvider responsible for providing the title, footnote, and axis labelsprotected StringgetName()FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.voidRemoves all data fields from this dataset.voidremoveDataField(int index) Removes a data field at the specified position in the list.voidFOR INTERNAL USE ONLY.verify(ChartStyle style) Verifies the group and sum properties of current dataset.Methods inherited from class com.inet.report.chart.dataset.AbstractDataset
getReferencedObject, saveGroups, saveProperties, saveSummaryFieldsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.inet.report.chart.dataset.BaseDataset
getReferencedObject
-
Constructor Details
-
ForAllRecordsDataset
Creates a new empty dataset.- Parameters:
chart- the chart (nullnot permitted)- Since:
- 8.0
-
-
Method Details
-
getChart
Returns the parent chart of this dataset.- Specified by:
getChartin interfaceBaseDataset- Returns:
- the chart.
-
addDataField
@Nonnull public @Nonnull SummaryField addDataField(int summaryOperation, Field field, Field field2nd, int nth) Adds a data field to the list of fields whose values will be calculated by the summary operation and shown in the chart as bar length for example. This will creates a newSummaryFieldwith the given parameters.
For more information about the supported value types of the field and about using parameters 'field2nd' and 'nth' seeSummaryField.- Parameters:
summaryOperation- the summary operationfield- the data fieldfield2nd- the second data field, user for example for weights in weighted averageSummaryField.WEIGHTED_AVERAGE.nth- the nth parameter, used for example by the summary operationSummaryField.NTH_LARGEST- Returns:
- the created summary field.
- Throws:
IllegalArgumentException- if the required second field or the field arenullor have an unsupported value type.IllegalArgumentException- if parameter nth is less than zero.- Since:
- 8.0
- See Also:
-
getDataField
Returns the summary field at the specified position in the list.- Parameters:
index- index of summary field to return- Returns:
- the summary field at the specified position in the list.
- Throws:
IndexOutOfBoundsException- if index is out of range.- Since:
- 8.0
-
getDataField
Returns the summary field with the specified name ornullif the summary field with this name not found in the list. Testing for equality using the case sensitiveequalsmethod.- Specified by:
getDataFieldin interfaceBaseDataset- Parameters:
name- the searched name of summary field (nullnot permitted)- Returns:
- the summary field with the specified name or
null. - See Also:
-
getDataFields
Returns the data fields of this dataset as list.- Specified by:
getDataFieldsin interfaceBaseDataset- Returns:
- the list of data fields
- See Also:
-
removeDataField
public void removeDataField(int index) Removes a data field at the specified position in the list. Note: this dataset is incomplete without any data fields and cannot be used by chart.- Parameters:
index- the specified position- Throws:
IndexOutOfBoundsException- if index out of range.- Since:
- 8.0
- See Also:
-
removeAllDataFields
public void removeAllDataFields()Removes all data fields from this dataset.- Since:
- 8.0
- See Also:
-
getDataFieldsCount
public int getDataFieldsCount()Returns the count of data fields in this dataset.- Returns:
- the count
- Since:
- 8.0
- See Also:
-
getCategoryGroup
Returns the category group. The category group is the first group of chart.- Returns:
- the group
- Since:
- 8.0
-
verify
Verifies the group and sum properties of current dataset.- Specified by:
verifyin interfaceBaseDataset- Parameters:
style- the chart style- Returns:
- the error message or empty string if all properties are correct.
-
updateReferences
public void updateReferences()FOR INTERNAL USE ONLY. Updates the references of this dataset.- Specified by:
updateReferencesin interfaceBaseDataset
-
getName
FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.- Returns:
- name of the XML attribute for this dataset
-
getLabelProvider
public com.inet.report.chart.dataset.LabelProvider getLabelProvider()Returns the LabelProvider responsible for providing the title, footnote, and axis labels- Specified by:
getLabelProviderin interfaceBaseDataset- Returns:
- the LabelProvider responsible for providing the title, footnote, and axis labels
-