Tagpublic class AggTag extends BaseTag
An AggTag represents possibly many aggregate values
calculated from a List of values already exposed to the
context. It uses jAgg functionality and exposes the results
and AggregateFunctions used for display later.
BaseTag.ListStringStringStringStringintbooleanint[]int[][]int[]int[][]| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
ATTR_AGGS |
Attribute that specifies the
List of AggregateFunctions to use. |
static java.lang.String |
ATTR_AGGS_VAR |
Attribute that specifies the name of the
List of exposed
aggregate functions. |
static java.lang.String |
ATTR_CUBE |
Attribute that specifies a data cube that should occur on the results.
|
static java.lang.String |
ATTR_GROUP_BY |
Attribute that specifies the
List of group-by properties. |
static java.lang.String |
ATTR_GROUPING_SETS |
Attribute that specifies the exact grouping sets that should occur on the
results.
|
static java.lang.String |
ATTR_ITEMS |
Attribute that specifies the
List of items to aggregate. |
static java.lang.String |
ATTR_PARALLEL |
Attribute that specifies the degree of parallelism to use.
|
static java.lang.String |
ATTR_ROLLUP |
Attribute that specifies a rollup that should occur on the results.
|
static java.lang.String |
ATTR_ROLLUPS |
Attribute that specifies multiple rollups that should occur on the
results.
|
static java.lang.String |
ATTR_USE_MSD |
Attribute that specifies whether to use Multiset Discrimination instead
of sorting during aggregation processing.
|
static java.lang.String |
ATTR_VALUES_VAR |
Attribute that specifies name of the
List of exposed
aggregation values. |
ATTR_ON_PROCESSED, SPEC_SEP| Constructor | Description |
|---|---|
AggTag() |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getName() |
Returns this
Tag's name. |
protected java.util.List<java.lang.String> |
getOptionalAttributes() |
Returns a
List of optional attribute names. |
protected java.util.List<java.lang.String> |
getRequiredAttributes() |
Returns a
List of required attribute names. |
boolean |
process() |
Run a "group by" operation on the specified
AggregateFunctions, get
the results, and expose the aggregate values and the
AggregateFunctions used. |
void |
validateAttributes() |
Validates the attributes for this
Tag. |
checkAttributes, clearBlock, deleteBlock, getAttributes, getContext, getLocation, getParentTag, getWorkbookContext, isBodiless, processTag, removeBlock, setAttributes, setBodiless, setContext, setParentTag, setWorkbookContextpublic static final java.lang.String ATTR_ITEMS
List of items to aggregate.public static final java.lang.String ATTR_AGGS
List of AggregateFunctions to use.public static final java.lang.String ATTR_AGGS_VAR
List of exposed
aggregate functions.public static final java.lang.String ATTR_VALUES_VAR
List of exposed
aggregation values.public static final java.lang.String ATTR_GROUP_BY
List of group-by properties.public static final java.lang.String ATTR_PARALLEL
public static final java.lang.String ATTR_USE_MSD
false -- don't use Multiset Discrimination, use sorting.public static final java.lang.String ATTR_ROLLUP
List of 0-based integer indexes that reference the
original list of properties. E.g. when grouping by two properties,
prop1 and prop2, specifying a List
of {0} specifies a rollup on prop1.ATTR_GROUP_BY,
Constant Field Valuespublic static final java.lang.String ATTR_ROLLUPS
List of Lists of 0-based
integer indexes that reference the original list of properties. E.g.
when grouping by three properties,
prop1, prop2, and prop3,
specifying a List of {{0}, {1, 2}} specifies a
rollup on prop1, and a separate rollup on prop2
and prop3.ATTR_GROUP_BY,
Constant Field Valuespublic static final java.lang.String ATTR_CUBE
List of 0-based integer indexes that reference the
original list of properties. E.g. when grouping by three properties,
prop1, prop2, and prop3,
specifying a List of {0, 1} specifies a cube on
prop1 and prop2.ATTR_GROUP_BY,
Constant Field Valuespublic static final java.lang.String ATTR_GROUPING_SETS
List of Lists of 0-based
integer indexes that reference the original list of properties. E.g.
when grouping by three properties, prop1,
prop2, and prop3, specifying a
List of {{0}, {1, 2}, {}} specifies a
grouping set on prop1, a separate grouping set on
prop2 and prop3, and a third grouping set on no
properties (a grand total).ATTR_GROUP_BY,
Constant Field Valuespublic java.lang.String getName()
Tag's name.Tag's name.protected java.util.List<java.lang.String> getRequiredAttributes()
List of required attribute names.getRequiredAttributes in class BaseTagList of required attribute names.protected java.util.List<java.lang.String> getOptionalAttributes()
List of optional attribute names.getOptionalAttributes in class BaseTagList of optional attribute names.public void validateAttributes()
throws TagParseException
Tag. The "items"
attribute must be a List. The "parallel" attribute must be
a positive integer (defaults to 1). The "aggs" attribute must be a
semicolon-separated list of valid Aggregator specification
strings. The "valuesVar" attribute must be a string that indicates the
name to which the aggregate values will be exposed in the
Map of beans. The "aggsVar" attribute must be a string that
indicates the name of the List that contains all created
AggregateFunctions and to which that will be exposed in the
Map of beans. The "groupBy" attribute must be a semicolon-
separated list of properties with which to "group" aggregated
calculations (defaults to no "group by" properties). The "agg" tag must
have a body.validateAttributes in class BaseTagTagParseException - If the attribute values are illegal or
unacceptable.public boolean process()
AggregateFunctions, get
the results, and expose the aggregate values and the
AggregateFunctions used.Copyright © 2012–2018 Jett Team. All rights reserved.