Class AttributeSortItem

java.lang.Object
com.gooddata.sdk.model.executeafm.resultspec.AttributeSortItem
All Implemented Interfaces:
SortItem

public class AttributeSortItem
extends java.lang.Object
implements SortItem
Define sort by specific attribute

With "aggregation" active you can sort all elements of attribute by "aggregation fn" applied to all valid values belonging to each element. This is extremely useful when sorting stacked visualizations like stack bar/area charts. Currently supported is only "sum", see AttributeSortAggregation

Simple example (dimension = Year, measureGroup; 2 metrics; sort on Year with aggregation="sum", descending):

 Year       2006        2007
 Names     M1  M2      M1   M2
 Values    1    2       3    4
 

We take all values belonging to each attribute element of chosen attribute and apply selected function (sum) on them. Notice that we are summarising values from different metrics:

 2006 (1 + 2 = 3)
 2007 (3 + 4 = 7)
 

After that we shuffle year attribute elements related to results from "sum" function:

 Year       2007        2006
 Names     M1  M2      M1   M2
 Values    3    4       1    2
 
  • Constructor Summary

    Constructors 
    Constructor Description
    AttributeSortItem​(Direction direction, java.lang.String attributeIdentifier)  
    AttributeSortItem​(Direction direction, java.lang.String attributeIdentifier, AttributeSortAggregation aggregation)  
    AttributeSortItem​(java.lang.String direction, java.lang.String attributeIdentifier)  
    AttributeSortItem​(java.lang.String direction, java.lang.String attributeIdentifier, java.lang.String aggregation)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getAggregation()  
    java.lang.String getAttributeIdentifier()  
    java.lang.String getDirection()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait