Interface IGroupByComparator<T>

  • Type Parameters:
    T - The type of the base objects carried in the TreeList
    All Superinterfaces:
    Comparator<Object>
    All Known Implementing Classes:
    GroupByComparator

    public interface IGroupByComparator<T>
    extends Comparator<Object>
    Comparator interface specialization for a comparator that can be used to sort the tree structure in a groupBy composition.
    • Method Detail

      • getSortModel

        ISortModel getSortModel()
        Returns:
        The ISortModel that is used to retrieve the column value comparators and the sort direction in case a groupBy value is sorted which will directly affect the tree structure build. Can be null which leads to a static tree structure that only allows sorting for leafs within groups.
      • setSortModel

        void setSortModel​(ISortModel sortModel)
        Parameters:
        sortModel - The ISortModel that is used to retrieve the column value comparators and the sort direction in case a groupBy value is sorted which will directly affect the tree structure build. Can be null which leads to a static tree structure that only allows sorting for leafs within groups.
      • setTreeLayer

        void setTreeLayer​(IUniqueIndexLayer treeLayer)
        Parameters:
        treeLayer - The IUniqueIndexLayer that should be used to retrieve config labels for a column. Needed to be able to determine if the column which is used for sorting is the tree column. Can be null which avoids specialized handling of tree / non tree columns.
      • setDataLayer

        void setDataLayer​(GroupByDataLayer<T> dataLayer)
        Parameters:
        dataLayer - The GroupByDataLayer that should be used to retrieve groupBy summary values for sorting the tree structure. Can be null to avoid retrieving and inspecting summary values on sorting.
      • clearCache

        void clearCache()
        For performance reasons the IGroupByComparator might cache several information e.g. retrieved via GroupByDataLayer. This method is intended to clear those cached informations to avoid memory leaks or sorting based on old information.