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 boolean |
isGrouping |
protected java.util.Map<K,GroupInfo> |
itemGroups |
protected java.util.Map<GroupInfo,GroupInfo> |
parents |
protected java.util.List<GroupInfo> |
roots |
Modifier | Constructor and Description |
---|---|
protected |
GroupDelegate(CollectionDatasource<T,K> datasource) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsGroup(GroupInfo groupInfo) |
protected void |
doGroup() |
protected void |
doGroupSort(CollectionDatasource.Sortable.SortInfo<com.haulmont.chile.core.model.MetaPropertyPath>[] sortInfo) |
protected abstract void |
doSort(CollectionDatasource.Sortable.SortInfo<com.haulmont.chile.core.model.MetaPropertyPath>[] sortInfo) |
java.util.List<T> |
getChildItems(GroupInfo groupId) |
java.util.List<GroupInfo> |
getChildren(GroupInfo groupId) |
java.util.List<GroupInfo> |
getChildrenInternal(GroupInfo groupId) |
java.util.List<K> |
getGroupItemIds(GroupInfo group) |
int |
getGroupItemsCount(GroupInfo groupId) |
java.util.List<GroupInfo> |
getGroupPath(T entity) |
java.util.Collection<?> |
getGroupProperties() |
java.lang.Object |
getGroupProperty(GroupInfo groupId) |
java.lang.Object |
getGroupPropertyValue(GroupInfo groupId) |
java.util.List<T> |
getOwnChildItems(GroupInfo groupId) |
GroupInfo |
getParentGroup(T entity) |
protected java.lang.Object |
getValueByProperty(T item,
com.haulmont.chile.core.model.MetaPropertyPath property) |
void |
groupBy(java.lang.Object[] properties,
CollectionDatasource.Sortable.SortInfo<com.haulmont.chile.core.model.MetaPropertyPath>[] sortInfos) |
protected GroupInfo<com.haulmont.chile.core.model.MetaPropertyPath> |
groupItems(int propertyIndex,
GroupInfo parent,
java.util.List<GroupInfo> children,
T item,
org.apache.commons.collections4.map.LinkedMap<com.haulmont.chile.core.model.MetaPropertyPath,java.lang.Object> groupValues) |
boolean |
hasChildren(GroupInfo group) |
boolean |
hasGroups() |
java.util.List<GroupInfo> |
rootGroups() |
protected java.lang.Object[] groupProperties
protected java.util.List<GroupInfo> roots
protected boolean isGrouping
protected CollectionDatasource<T extends Entity<K>,K> datasource
protected GroupDelegate(CollectionDatasource<T,K> datasource)
public void groupBy(java.lang.Object[] properties, CollectionDatasource.Sortable.SortInfo<com.haulmont.chile.core.model.MetaPropertyPath>[] sortInfos)
protected void doGroup()
protected GroupInfo<com.haulmont.chile.core.model.MetaPropertyPath> groupItems(int propertyIndex, GroupInfo parent, java.util.List<GroupInfo> children, T item, org.apache.commons.collections4.map.LinkedMap<com.haulmont.chile.core.model.MetaPropertyPath,java.lang.Object> groupValues)
protected abstract void doSort(CollectionDatasource.Sortable.SortInfo<com.haulmont.chile.core.model.MetaPropertyPath>[] sortInfo)
protected void doGroupSort(CollectionDatasource.Sortable.SortInfo<com.haulmont.chile.core.model.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, com.haulmont.chile.core.model.MetaPropertyPath property)