com.microstrategy.web.objects.WebTemplateMetricSubtotals |
This interface is deprecated.
Subtotals are defined at the template level now.
Please use WebTemplateSubtotals
instead.
The WebTemplateMetricSubtotals object represents the collection of subtotals on a template metric. This object can be used to add and remove subtotals from the report for this metric.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract WebTemplateMetricSubtotal |
add(int subTotalType)
Attempts to add a
WebTemplateMetricSubtotal object to the collection, and
return it. | ||||||||||
abstract WebTemplateMetricSubtotal |
addCustom(WebMetric implementationMetric)
Adds a custom subtotal to the collection, and returns it.
| ||||||||||
abstract void |
clear()
Removes all subtotal objects from the collection.
| ||||||||||
abstract boolean |
containsActiveType(int subTotalType)
Returns whether the collection contains an object of the given subtotal type
which is active (meaning that it is turned on for some axis or unit).
| ||||||||||
abstract Enumeration |
elements()
Returns a java.util.Enumeration containing the objects in the collections.
| ||||||||||
abstract WebTemplateMetricSubtotals |
findTypedObjects(int[] types)
Returns a
WebTemplateMetricSubtotals object containing only
subtotal objects which are one of the given types. | ||||||||||
abstract WebTemplateMetricSubtotal |
get(int index)
Returns the
WebTemplateMetricSubtotal object with the given index in this collection. | ||||||||||
abstract WebTemplateMetricSubtotal |
getByType(int subTotalType)
Returns the first object in the collection with the given subtotal type.
| ||||||||||
abstract WebTemplateMetricSubtotal |
getItemByKey(int key)
Returns the
WebTemplateMetricSubtotal object with the given key. | ||||||||||
abstract boolean |
isEmpty()
Returns whether the collection is empty.
| ||||||||||
abstract boolean |
isReadOnly()
Returns whether the subtotal collection is read-only.
| ||||||||||
abstract void |
remove(WebTemplateMetricSubtotal object)
Removes the given
WebTemplateMetricSubtotal object from the collection. | ||||||||||
abstract void |
remove(int index)
Removes the
WebTemplateMetricSubtotal object with the given index from the collecton. | ||||||||||
abstract void |
removeCustom(WebTemplateMetricSubtotal metricSubtotal)
Removes the custom subtotal object from the collection.
| ||||||||||
abstract void |
removeItemByKey(int key)
Removes the
WebTemplateMetricSubtotal object with the given key from the collection. | ||||||||||
abstract int |
size()
Returns the number of items in the collection.
|
Attempts to add a WebTemplateMetricSubtotal
object to the collection, and
return it. This is the first step that must be taken to add a subtotal to a report.
This will not generate a delta XML; it will simply create the subtotal object, which
can then be used to add and remove that subtotal type.
subTotalType | The subtotal type to add to the collection, from EnumDSSXMLMetricType . |
---|
WebTemplateMetricSubtotal
object, which was either added to the collection or
already existed in the collection.IllegalArgumentException | Thrown if the metric type is invalid, or if a type of custom is given. |
---|---|
UnsupportedOperationException | Thrown if the subtotal collection is read-only. |
Adds a custom subtotal to the collection, and returns it. A custom subtotal is a subtotal which specifies an implementation metric. This is the first step that must be taken to add a subtotal to a report. This will not generate a delta XML; it will simply create the subtotal object, which can then be used to add and remove that subtotal type.
implementationMetric | The WebMetric object which implements the
custom subtotal. |
---|
WebTemplateMetricSubtotal
object, which was either added to the collection or
already existed in the collection.IllegalArgumentException | Thrown if the implementation metric is null. |
---|---|
UnsupportedOperationException | Thrown if the subtotal collection is read-only. |
Removes all subtotal objects from the collection. This will effectively remove all subtotals from the metric which this collection is associated with.
UnsupportedOperationException | Thrown if the collection is read-only. |
---|
Returns whether the collection contains an object of the given subtotal type which is active (meaning that it is turned on for some axis or unit).
subTotalType | The type of subtotal to check for, from EnumDSSXMLMetricType . |
---|
Returns a java.util.Enumeration containing the objects in the collections.
WebTemplateMetricSubtotal
objects in the collection.
Returns a WebTemplateMetricSubtotals
object containing only
subtotal objects which are one of the given types.
types | The types to filter into the new subtotal collection. |
---|
WebTemplateMetricSubtotals
object containing only
subtotal objects which are one of the given types.
Returns the WebTemplateMetricSubtotal
object with the given index in this collection.
index | The index to return in the collection. |
---|
WebTemplateMetricSubtotal
object at the given index.IndexOutOfBoundsException | Thrown if the index does not exist in the collection. |
---|
Returns the first object in the collection with the given subtotal type.
subTotalType | The subtotal type, from EnumDSSXMLMetricType . |
---|
WebTemplateMetricSubtotal
object found with the given type.IllegalArgumentException | Thrown if no object with the given type could be found. |
---|
Returns the WebTemplateMetricSubtotal
object with the given key.
key | The key to find in the collection. |
---|
WebTemplateMetricSubtotal
object with the given key.IllegalArgumentException | Thrown if the given key cannot be found in the collection. |
---|
Returns whether the collection is empty.
Returns whether the subtotal collection is read-only.
Removes the given WebTemplateMetricSubtotal
object from the collection.
object | The WebTemplateMetricSubtotal object to remove from the collection.
This must not refer to a custom subtotal. |
---|
IllegalArgumentException | Thrown if the object cannot be found in the collection. |
---|---|
UnsupportedOperationException | Thrown if the collection is read-only. |
Removes the WebTemplateMetricSubtotal
object with the given index from the collecton.
index | The index of the item to remove from the collection. |
---|
IndexOutOfBoundsException | Thrown if no item with the given index can be found. |
---|---|
UnsupportedOperationException | Thrown if the template which this collection belongs to is read-only. |
Removes the custom subtotal object from the collection.
metricSubtotal | The WebTemplateMetricSubtotal object in the collection to remove, corresponding
to a custom subtotal. |
---|
IllegalArgumentException | Thrown if the given object is not found in the collection. |
---|---|
UnsupportedOperationException | Thrown if the collection is read-only. |
Removes the WebTemplateMetricSubtotal
object with the given key from the collection.
key | The key of the item to remove from the collection. |
---|
IllegalArgumentException | Thrown if no item with the given key can be found. |
---|---|
UnsupportedOperationException | Thrown if the collection is read-only. |
Returns the number of items in the collection.