Package io.jmix.groupgridflowui.data
Class EmptyGroupDataGridItems<T>
java.lang.Object
com.vaadin.flow.data.provider.AbstractDataProvider<T,Void>
io.jmix.flowui.data.grid.EmptyDataGridItems<T>
io.jmix.groupgridflowui.data.EmptyGroupDataGridItems<T>
- All Implemented Interfaces:
com.vaadin.flow.data.provider.DataProvider<T,,Void> com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T,,Void> GroupDataGridItems<T>,DataUnit,EmptyDataUnit,EntityDataUnit,DataGridItems<T>,DataGridItems.Sortable<T>,EntityDataGridItems<T>,HasType<T>,Serializable
public class EmptyGroupDataGridItems<T>
extends EmptyDataGridItems<T>
implements GroupDataGridItems<T>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.data.grid.DataGridItems
DataGridItems.ItemSetChangeEvent<T>, DataGridItems.SelectedItemChangeEvent<T>, DataGridItems.Sortable<T>, DataGridItems.ValueChangeEvent<T>Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEventNested classes/interfaces inherited from interface io.jmix.flowui.component.groupgrid.data.GroupDataGridItems
GroupDataGridItems.GroupPropertyDescriptorsChangedEvent<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGroupPropertyDescriptor(GroupPropertyDescriptor<T> groupPropertyDescriptor) Adds a group property descriptor for a custom grouping property.com.vaadin.flow.shared.RegistrationaddGroupPropertyDescriptorsChangedListener(Consumer<GroupDataGridItems.GroupPropertyDescriptorsChangedEvent<T>> listener) Adds a listener to be notified when the group property descriptors are changed.booleancontainsGroup(GroupInfo group) Indicates that a group is contained in the group treefetchChildren(com.vaadin.flow.data.provider.hierarchy.HierarchicalQuery<T, Void> query) intgetChildCount(com.vaadin.flow.data.provider.hierarchy.HierarchicalQuery<T, Void> query) getChildItems(GroupInfo group) getChildren(GroupInfo group) getGroupByItem(T groupItem) ReturnsGroupInfoby a group item.getGroupItems(GroupInfo group) intgetGroupItemsCount(GroupInfo group) getGroupPath(T item) getGroupPropertyDescriptor(GroupProperty property) getItemByGroup(GroupInfo group) Returns a group item that corresponds to the providedGroupInfo.getOwnChildItems(GroupInfo group) voidgroupBy(List<GroupProperty> properties) Perform grouping by the list of properties.booleanhasChildren(GroupInfo group) Indicates that the group has nested groupsbooleanhasChildren(T item) booleanIndicates that items have groupsvoidRemoves all group property descriptors previously added for grouping.voidremoveGroupPropertyDescriptor(GroupProperty property) Removes a group property descriptor for a custom property that was previously added for grouping.Methods inherited from class io.jmix.flowui.data.grid.EmptyDataGridItems
addItemSetChangeListener, addSelectedItemChangeListener, addStateChangeListener, addValueChangeListener, containsItem, fetch, getEntityMetaClass, getItem, getItems, getItemValue, getSelectedItem, getState, getType, isInMemory, resetSortOrder, setSelectedItem, size, sortMethods inherited from class com.vaadin.flow.data.provider.AbstractDataProvider
addDataProviderListener, addListener, fireEvent, refreshAll, refreshItem, refreshItemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.flowui.data.grid.DataGridItems
addItemSetChangeListener, addSelectedItemChangeListener, addValueChangeListener, containsItem, getItem, getItems, getItemValue, getSelectedItem, setSelectedItemMethods inherited from interface io.jmix.flowui.data.grid.DataGridItems.Sortable
enableSorting, suppressSortingMethods inherited from interface com.vaadin.flow.data.provider.DataProvider
addDataProviderListener, getId, isInMemory, refreshAll, refreshItem, refreshItemMethods inherited from interface io.jmix.flowui.data.DataUnit
addStateChangeListener, getStateMethods inherited from interface com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider
fetch, size, withConfigurableFilter, withConfigurableFilter, withConvertedFilter
-
Constructor Details
-
EmptyGroupDataGridItems
-
-
Method Details
-
groupBy
Description copied from interface:GroupDataGridItemsPerform grouping by the list of properties. The available values for properties are:- MetaPropertyPath can be a property of current or a reference entity.
- Column key (String) of a generated value.
- Specified by:
groupByin interfaceGroupDataGridItems<T>
-
getRootGroups
- Specified by:
getRootGroupsin interfaceGroupDataGridItems<T>- Returns:
- the list of root groups
-
hasChildren
Description copied from interface:GroupDataGridItemsIndicates that the group has nested groups- Specified by:
hasChildrenin interfaceGroupDataGridItems<T>- Parameters:
group- group info
-
getChildren
- Specified by:
getChildrenin interfaceGroupDataGridItems<T>- Returns:
- the list of own nested groups
-
getOwnChildItems
- Specified by:
getOwnChildItemsin interfaceGroupDataGridItems<T>- Returns:
- the list of nested items
-
getChildItems
- Specified by:
getChildItemsin interfaceGroupDataGridItems<T>- Returns:
- the list of items from all nested group levels
-
getGroup
- Specified by:
getGroupin interfaceGroupDataGridItems<T>- Returns:
- a group that the passed item belongs to
-
getGroupPath
- Specified by:
getGroupPathin interfaceGroupDataGridItems<T>- Parameters:
item- item (leaf) to get all parent groups for- Returns:
- the path through all parent groups
-
getGroupItems
- Specified by:
getGroupItemsin interfaceGroupDataGridItems<T>- Returns:
- items that are contained in the selected group
-
getGroupItemsCount
- Specified by:
getGroupItemsCountin interfaceGroupDataGridItems<T>- Returns:
- a count of items that are contained in the selected group
-
hasGroups
public boolean hasGroups()Description copied from interface:GroupDataGridItemsIndicates that items have groups- Specified by:
hasGroupsin interfaceGroupDataGridItems<T>
-
getGroupProperties
- Specified by:
getGroupPropertiesin interfaceGroupDataGridItems<T>- Returns:
- group properties
-
containsGroup
Description copied from interface:GroupDataGridItemsIndicates that a group is contained in the group tree- Specified by:
containsGroupin interfaceGroupDataGridItems<T>
-
addGroupPropertyDescriptor
Description copied from interface:GroupDataGridItemsAdds a group property descriptor for a custom grouping property. This method enables defining custom logic for computing property values during data grouping.For instance:
customersDataGrid.getItems().addGroupPropertyDescriptor( new BaseGroupPropertyDescriptor<Customer>("fullName", context -> { Customer item = context.getItem(); return item.getFirstName() + " " + item.getLastName(); }).withSortProperties(List.of("firstName", "lastName")));- Specified by:
addGroupPropertyDescriptorin interfaceGroupDataGridItems<T>- Parameters:
groupPropertyDescriptor- implementation ofGroupPropertyDescriptor
-
removeGroupPropertyDescriptor
Description copied from interface:GroupDataGridItemsRemoves a group property descriptor for a custom property that was previously added for grouping.- Specified by:
removeGroupPropertyDescriptorin interfaceGroupDataGridItems<T>- Parameters:
property- the custom property
-
getGroupPropertyDescriptor
- Specified by:
getGroupPropertyDescriptorin interfaceGroupDataGridItems<T>- Parameters:
property- the custom property- Returns:
- a group property descriptor for a custom property
-
removeAllGroupPropertyProviders
public void removeAllGroupPropertyProviders()Description copied from interface:GroupDataGridItemsRemoves all group property descriptors previously added for grouping.- Specified by:
removeAllGroupPropertyProvidersin interfaceGroupDataGridItems<T>
-
addGroupPropertyDescriptorsChangedListener
public com.vaadin.flow.shared.Registration addGroupPropertyDescriptorsChangedListener(Consumer<GroupDataGridItems.GroupPropertyDescriptorsChangedEvent<T>> listener) Description copied from interface:GroupDataGridItemsAdds a listener to be notified when the group property descriptors are changed.- Specified by:
addGroupPropertyDescriptorsChangedListenerin interfaceGroupDataGridItems<T>- Parameters:
listener- the listener to add- Returns:
- a registration object for removing the listener
-
getGroupByItem
Description copied from interface:GroupDataGridItemsReturnsGroupInfoby a group item.Group item is an empty entity object that represents a grouping row in a
GroupListDataComponent. It does not exist in the data container.- Specified by:
getGroupByItemin interfaceGroupDataGridItems<T>- Parameters:
groupItem- a group item- Returns:
- group info or
nullif there is no group info for the given item
-
getItemByGroup
Description copied from interface:GroupDataGridItemsReturns a group item that corresponds to the providedGroupInfo.Group item is an empty entity object that represents a grouping row in a
GroupListDataComponent. It does not exist in the data container.- Specified by:
getItemByGroupin interfaceGroupDataGridItems<T>- Parameters:
group- group info- Returns:
- group item or
nullif there is no item for the given group info
-
getChildCount
-
fetchChildren
-
hasChildren
-