public abstract class GroupDelegate<T extends Entity<K>,K>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<GroupInfo,java.util.List<GroupInfo>> |
children |
protected CollectionDatasource<T,K> |
datasource |
protected java.util.Map<GroupInfo,java.util.List<K>> |
groupItems |
protected java.lang.Object[] |
groupProperties |
protected GroupDatasource.GroupSortDelegate |
groupSortDelegate |
protected boolean |
isGrouping |
protected java.util.Map<K,GroupInfo> |
itemGroups |
protected java.util.Map<GroupInfo,GroupInfo> |
parents |
protected java.util.List<GroupInfo> |
roots |
protected CollectionDatasource.SortDelegate<T,K> |
sortDelegate |
Modifier | Constructor and Description |
---|---|
protected |
GroupDelegate(CollectionDatasource<T,K> datasource,
CollectionDatasource.SortDelegate<T,K> sortDelegate,
GroupDatasource.GroupSortDelegate groupSortDelegate) |
protected java.lang.Object[] groupProperties
protected java.util.List<GroupInfo> roots
protected boolean isGrouping
protected CollectionDatasource<T extends Entity<K>,K> datasource
protected CollectionDatasource.SortDelegate<T extends Entity<K>,K> sortDelegate
protected GroupDatasource.GroupSortDelegate groupSortDelegate
protected GroupDelegate(CollectionDatasource<T,K> datasource, CollectionDatasource.SortDelegate<T,K> sortDelegate, GroupDatasource.GroupSortDelegate groupSortDelegate)
public void groupBy(java.lang.Object[] properties, CollectionDatasource.Sortable.SortInfo<MetaPropertyPath>[] sortInfos)
protected void doGroup()
protected GroupInfo<MetaPropertyPath> groupItems(int propertyIndex, GroupInfo parent, java.util.List<GroupInfo> children, T item, org.apache.commons.collections4.map.LinkedMap<MetaPropertyPath,java.lang.Object> groupValues)
protected abstract void doSort(CollectionDatasource.Sortable.SortInfo<MetaPropertyPath>[] sortInfo)
protected void doGroupSort(CollectionDatasource.Sortable.SortInfo<MetaPropertyPath>[] sortInfo)
public java.util.List<GroupInfo> rootGroups()
public boolean hasChildren(GroupInfo group)
public java.lang.Object getGroupProperty(GroupInfo groupId)
public java.lang.Object getGroupPropertyValue(GroupInfo groupId)
public int getGroupItemsCount(GroupInfo groupId)
public boolean hasGroups()
public java.util.Collection<?> getGroupProperties()
public boolean containsGroup(GroupInfo groupInfo)
protected java.lang.Object getValueByProperty(T item, MetaPropertyPath property)
public void setSortDelegate(CollectionDatasource.SortDelegate<T,K> sortDelegate)
public void setGroupSortDelegate(GroupDatasource.GroupSortDelegate groupSortDelegate)