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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearCache()
For performance reasons theIGroupByComparator
might cache several information e.g.ISortModel
getSortModel()
void
setDataLayer(GroupByDataLayer<T> dataLayer)
void
setSortModel(ISortModel sortModel)
void
setTreeLayer(IUniqueIndexLayer treeLayer)
-
Methods inherited from interface java.util.Comparator
compare, equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
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 benull
which leads to a static tree structure that only allows sorting for leafs within groups.
-
setSortModel
void setSortModel(ISortModel sortModel)
- Parameters:
sortModel
- TheISortModel
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 benull
which leads to a static tree structure that only allows sorting for leafs within groups.
-
setTreeLayer
void setTreeLayer(IUniqueIndexLayer treeLayer)
- Parameters:
treeLayer
- TheIUniqueIndexLayer
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 benull
which avoids specialized handling of tree / non tree columns.
-
setDataLayer
void setDataLayer(GroupByDataLayer<T> dataLayer)
- Parameters:
dataLayer
- TheGroupByDataLayer
that should be used to retrieve groupBy summary values for sorting the tree structure. Can benull
to avoid retrieving and inspecting summary values on sorting.
-
clearCache
void clearCache()
For performance reasons theIGroupByComparator
might cache several information e.g. retrieved viaGroupByDataLayer
. This method is intended to clear those cached informations to avoid memory leaks or sorting based on old information.
-
-