Package com.microstrategy.web.objects
Class WebMetricHierarchicalSortConfigImpl
- java.lang.Object
-
- com.microstrategy.web.objects.WebMetricHierarchicalSortConfigImpl
-
- All Implemented Interfaces:
WebMetricHierarchicalSortConfig
,WebMetricSortConfig
,WebSort
,WebSortConfig
public class WebMetricHierarchicalSortConfigImpl extends java.lang.Object implements WebMetricHierarchicalSortConfig
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generateDelta(RWDelta delta)
int
getAxis()
Returns the axis name configuredint
getKey()
Returns the key of current sort object, which is used to look up the sort in the sorts collection.WebMetric
getMetric()
Returns the metric which is the target of the sort.int
getPosition()
Returns the position of current sort object in the sorts collection.boolean
getRespectParent()
Returns the Respect Parent flagint
getSortType()
Returns the sort type of this sort object.java.lang.String
getSubtotalID()
Returns the subtotal ID setint
getSubtotalsPosition()
Returns the position of subtotals in sorted result.int
getSubtotalType()
Returns the subtotal type set.WebObjectInfo
getTarget()
Returns the target of this sortboolean
isAscending()
Returns the sort order, which is ascending or not.void
setAscending(boolean ascending)
Sets the sort order to ascending or not.void
setAxis(int axisName)
Sets the axis namevoid
setElements(java.lang.String... elementIDs)
void
setMetric(WebMetric metric)
This method is used to set the metric which is the target of the sort.void
setRespectParent(boolean value)
Sets the Respect Parent flagvoid
setSubtotalByType(int type)
Sets the subtotal definition for the sort by specifying its subtotal type.void
setSubtotalID(java.lang.String id)
Sets the subtotal IDvoid
setSubtotalsPosition(int subtotalsPosition)
Sets the position of subtotals in sorted result.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.objects.WebMetricSortConfig
getMetric, setElements, setMetric
-
Methods inherited from interface com.microstrategy.web.objects.WebSort
getKey, getPosition, getRespectParent, getSortType, getSubtotalsPosition, getTarget, isAscending, setAscending, setRespectParent, setSubtotalsPosition
-
Methods inherited from interface com.microstrategy.web.objects.WebSortConfig
generateDelta, getAxis, setAxis
-
-
-
-
Method Detail
-
getSubtotalID
public java.lang.String getSubtotalID()
Description copied from interface:WebMetricHierarchicalSortConfig
Returns the subtotal ID set- Specified by:
getSubtotalID
in interfaceWebMetricHierarchicalSortConfig
-
getSubtotalType
public int getSubtotalType()
Description copied from interface:WebMetricHierarchicalSortConfig
Returns the subtotal type set.- Specified by:
getSubtotalType
in interfaceWebMetricHierarchicalSortConfig
-
setSubtotalByType
public void setSubtotalByType(int type) throws java.lang.IllegalArgumentException
Description copied from interface:WebMetricHierarchicalSortConfig
Sets the subtotal definition for the sort by specifying its subtotal type.- Specified by:
setSubtotalByType
in interfaceWebMetricHierarchicalSortConfig
- Throws:
java.lang.IllegalArgumentException
-
setSubtotalID
public void setSubtotalID(java.lang.String id)
Description copied from interface:WebMetricHierarchicalSortConfig
Sets the subtotal ID- Specified by:
setSubtotalID
in interfaceWebMetricHierarchicalSortConfig
-
setElements
public void setElements(java.lang.String... elementIDs)
- Specified by:
setElements
in interfaceWebMetricSortConfig
-
getMetric
public WebMetric getMetric()
Description copied from interface:WebMetricSortConfig
Returns the metric which is the target of the sort.- Specified by:
getMetric
in interfaceWebMetricSortConfig
- Returns:
- The metric which is the target of the sort, or null if it has not been set.
- See Also:
WebMetricSortConfig.setMetric(com.microstrategy.web.objects.WebMetric)
-
setMetric
public void setMetric(WebMetric metric) throws java.lang.IllegalArgumentException
Description copied from interface:WebMetricSortConfig
This method is used to set the metric which is the target of the sort.- Specified by:
setMetric
in interfaceWebMetricSortConfig
- Parameters:
metric
- The metric object which will be the target of the sort.- Throws:
java.lang.IllegalArgumentException
- Thrown if the parameter is null or the given metric does not exist on the template.- See Also:
WebMetricSortConfig.getMetric()
-
getTarget
public WebObjectInfo getTarget()
Description copied from interface:WebSort
Returns the target of this sort
-
getAxis
public int getAxis()
Description copied from interface:WebSortConfig
Returns the axis name configured- Specified by:
getAxis
in interfaceWebSortConfig
- Returns:
-
setAxis
public void setAxis(int axisName)
Description copied from interface:WebSortConfig
Sets the axis name- Specified by:
setAxis
in interfaceWebSortConfig
-
getKey
public int getKey()
Description copied from interface:WebSort
Returns the key of current sort object, which is used to look up the sort in the sorts collection. This has nothing to do with the sort-key.
-
getPosition
public int getPosition()
Description copied from interface:WebSort
Returns the position of current sort object in the sorts collection.- Specified by:
getPosition
in interfaceWebSort
- Returns:
- The position (1-based) of current sort object in the sorts collection.
-
getSortType
public int getSortType()
Description copied from interface:WebSort
Returns the sort type of this sort object. The sort type only can be specified on creation time.- Specified by:
getSortType
in interfaceWebSort
- Returns:
- The sort type, values from
EnumDSSXMLSortType
.
-
getSubtotalsPosition
public int getSubtotalsPosition()
Description copied from interface:WebSort
Returns the position of subtotals in sorted result. The possible value are inEnumDSSXMLSubtotalsPosition
. Default is EnumDSSXMLSubtotalsPosition.DssSubtotalsPositionInherit- Specified by:
getSubtotalsPosition
in interfaceWebSort
- Returns:
- The position of subtotals in sorted result, values from
EnumDSSXMLSubtotalsPosition
. - See Also:
WebSort.setSubtotalsPosition(int)
-
isAscending
public boolean isAscending()
Description copied from interface:WebSort
Returns the sort order, which is ascending or not.- Specified by:
isAscending
in interfaceWebSort
- Returns:
- True if the result will be sorted in ascending order; else false. Default value is true.
-
setAscending
public void setAscending(boolean ascending)
Description copied from interface:WebSort
Sets the sort order to ascending or not.- Specified by:
setAscending
in interfaceWebSort
- Parameters:
ascending
- True to sort in ascending order, false to descending order.
-
setSubtotalsPosition
public void setSubtotalsPosition(int subtotalsPosition)
Description copied from interface:WebSort
Sets the position of subtotals in sorted result. The possible value are inEnumDSSXMLSubtotalsPosition
. Default is EnumDSSXMLSubtotalsPosition.DssSubtotalsPositionInherit.- Specified by:
setSubtotalsPosition
in interfaceWebSort
- Parameters:
subtotalsPosition
- The position of subtotals in sorted result, values fromEnumDSSXMLSubtotalsPosition
.- See Also:
WebSort.getSubtotalsPosition()
-
getRespectParent
public boolean getRespectParent()
Description copied from interface:WebSort
Returns the Respect Parent flag- Specified by:
getRespectParent
in interfaceWebSort
- Returns:
-
setRespectParent
public void setRespectParent(boolean value)
Description copied from interface:WebSort
Sets the Respect Parent flag- Specified by:
setRespectParent
in interfaceWebSort
- Parameters:
value
- value
-
generateDelta
public void generateDelta(RWDelta delta)
- Specified by:
generateDelta
in interfaceWebSortConfig
-
-