Package io.jmix.ui.component.data.table
Class ContainerGroupTableItems<E>
java.lang.Object
io.jmix.ui.component.data.table.ContainerTableItems<E>
io.jmix.ui.component.data.table.ContainerGroupTableItems<E>
- All Implemented Interfaces:
DataUnit
,GroupTableItems<E>
,ContainerDataUnit<E>
,EntityDataUnit
,EntityTableItems<E>
,TableItems<E>
,TableItems.Ordered<E>
,TableItems.Sortable<E>
public class ContainerGroupTableItems<E>
extends ContainerTableItems<E>
implements GroupTableItems<E>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.data.DataUnit
DataUnit.StateChangeEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.data.TableItems
TableItems.ItemSetChangeEvent<T>, TableItems.Ordered<T>, TableItems.SelectedItemChangeEvent<T>, TableItems.Sortable<T>, TableItems.ValueChangeEvent<T>
-
Field Summary
Modifier and TypeFieldDescriptionprotected Object[]
protected boolean
protected boolean[]
protected Object[]
Fields inherited from class io.jmix.ui.component.data.table.ContainerTableItems
aggregatableDelegate, container, events, suppressSorting
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsGroup
(GroupInfo groupId) Indicates that a group is contained in the groups treeprotected void
doGroup()
getChildItems
(GroupInfo groupId) getChildren
(GroupInfo groupId) getChildrenInternal
(GroupInfo groupId) getGroupItemIds
(GroupInfo groupId) int
getGroupItemsCount
(GroupInfo groupId) getGroupPath
(E item) Collection<?>
getGroupProperty
(GroupInfo groupId) getGroupPropertyValue
(GroupInfo groupId) getOwnChildItems
(GroupInfo groupId) getParentGroup
(E item) protected Object
getValueByProperty
(E item, MetaPropertyPath property) void
Perform grouping by the list of propertiesprotected GroupInfo<MetaPropertyPath>
groupItems
(int propertyIndex, GroupInfo parent, List<GroupInfo> children, E item, org.apache.commons.collections4.map.LinkedMap<MetaPropertyPath, Object> groupValues) boolean
hasChildren
(GroupInfo groupId) Indicates that group has nested groupsboolean
Indicated that a datasource has groupsvoid
Sorts data.Methods inherited from class io.jmix.ui.component.data.table.ContainerTableItems
addItemSetChangeListener, addSelectedItemChangeListener, addStateChangeListener, addValueChangeListener, containerCollectionChanged, containerItemChanged, containerItemPropertyChanged, containsId, createSort, enableSorting, firstItemId, getContainer, getEntityMetaClass, getItem, getItemIds, getItemNN, getItems, getItemValue, getSelectedItem, getState, getType, isFirstId, isLastId, lastItemId, nextItemId, prevItemId, resetSortOrder, setSelectedItem, size, supportsProperty, suppressSorting, updateItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.data.DataUnit
addStateChangeListener, getState
Methods inherited from interface io.jmix.ui.component.data.TableItems
addItemSetChangeListener, addSelectedItemChangeListener, addValueChangeListener, containsId, getItem, getItemIds, getItemNN, getItems, getItemValue, getType, size, supportsProperty, updateItem
Methods inherited from interface io.jmix.ui.component.data.TableItems.Ordered
firstItemId, isFirstId, isLastId, lastItemId, nextItemId, prevItemId
Methods inherited from interface io.jmix.ui.component.data.TableItems.Sortable
enableSorting, resetSortOrder, suppressSorting
-
Field Details
-
groupProperties
-
parents
-
children
-
roots
-
groupItems
-
itemGroups
-
isGrouping
protected boolean isGrouping -
sortProperties
-
sortAscending
protected boolean[] sortAscending
-
-
Constructor Details
-
ContainerGroupTableItems
-
-
Method Details
-
sort
Description copied from interface:TableItems.Sortable
Sorts data.- Specified by:
sort
in interfaceTableItems.Sortable<E>
- Overrides:
sort
in classContainerTableItems<E>
- Parameters:
propertyId
- id of propertyascending
- asc / desc flags
-
groupBy
Description copied from interface:GroupTableItems
Perform grouping by the list of properties- Specified by:
groupBy
in interfaceGroupTableItems<E>
-
doGroup
protected void doGroup() -
groupItems
@Nullable protected GroupInfo<MetaPropertyPath> groupItems(int propertyIndex, @Nullable GroupInfo parent, List<GroupInfo> children, E item, org.apache.commons.collections4.map.LinkedMap<MetaPropertyPath, Object> groupValues) -
getValueByProperty
-
rootGroups
- Specified by:
rootGroups
in interfaceGroupTableItems<E>
- Returns:
- the list of root groups
-
hasChildren
Description copied from interface:GroupTableItems
Indicates that group has nested groups- Specified by:
hasChildren
in interfaceGroupTableItems<E>
-
getChildren
- Specified by:
getChildren
in interfaceGroupTableItems<E>
- Returns:
- the list of nested groups
-
getOwnChildItems
- Specified by:
getOwnChildItems
in interfaceGroupTableItems<E>
- Returns:
- the list of nested items
-
getChildItems
- Specified by:
getChildItems
in interfaceGroupTableItems<E>
- Returns:
- the list of items from all nested group levels
-
getChildrenInternal
-
getParentGroup
- Specified by:
getParentGroup
in interfaceGroupTableItems<E>
- Returns:
- the parent group of passed item
-
getGroupPath
- Specified by:
getGroupPath
in interfaceGroupTableItems<E>
- Returns:
- the path through all parent groups
-
getGroupProperty
- Specified by:
getGroupProperty
in interfaceGroupTableItems<E>
- Returns:
- a group property
-
getGroupPropertyValue
- Specified by:
getGroupPropertyValue
in interfaceGroupTableItems<E>
- Returns:
- a group property value
-
getGroupItemIds
- Specified by:
getGroupItemIds
in interfaceGroupTableItems<E>
- Returns:
- item ids that are contained in the selected group
-
getGroupItemsCount
- Specified by:
getGroupItemsCount
in interfaceGroupTableItems<E>
- Returns:
- a count of items that are contained in the selected group
-
hasGroups
public boolean hasGroups()Description copied from interface:GroupTableItems
Indicated that a datasource has groups- Specified by:
hasGroups
in interfaceGroupTableItems<E>
-
getGroupProperties
- Specified by:
getGroupProperties
in interfaceGroupTableItems<E>
- Returns:
- group properties
-
containsGroup
Description copied from interface:GroupTableItems
Indicates that a group is contained in the groups tree- Specified by:
containsGroup
in interfaceGroupTableItems<E>
-