Package io.jmix.flowui.component.grid
Class JmixTreeGridDataProvider<T>
java.lang.Object
com.vaadin.flow.data.provider.AbstractDataProvider<T,Void>
io.jmix.flowui.component.grid.AbstractContainerGridDataProvider<T>
io.jmix.flowui.component.grid.JmixGridDataProvider<T>
io.jmix.flowui.component.grid.JmixTreeGridDataProvider<T>
- All Implemented Interfaces:
com.vaadin.flow.data.provider.DataProvider<T,
,Void> com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T,
,Void> JmixBinding
,ContainerDataUnit<T>
,DataUnit
,EntityDataUnit
,EntityGridDataItems<T>
,EntityTreeGridDataItems<T>
,GridDataItems<T>
,GridDataItems.Sortable<T>
,TreeGridDataItems<T>
,HasType<T>
,Serializable
public class JmixTreeGridDataProvider<T>
extends JmixGridDataProvider<T>
implements com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T,Void>, EntityTreeGridDataItems<T>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEvent
Nested classes/interfaces inherited from interface io.jmix.flowui.data.grid.GridDataItems
GridDataItems.ItemSetChangeEvent<T>, GridDataItems.SelectedItemChangeEvent<T>, GridDataItems.Sortable<T>, GridDataItems.ValueChangeEvent<T>
-
Field Summary
Fields inherited from class io.jmix.flowui.component.grid.JmixGridDataProvider
suppressSorting
Fields inherited from class io.jmix.flowui.component.grid.AbstractContainerGridDataProvider
container, containerCollectionChangeSubscription, containerItemChangeSubscription, containerItemPropertyChangeSubscription, eventBus, itemSetChangeListeners, selectedItemChangeListeners, state, valueChangeListeners
-
Constructor Summary
ConstructorDescriptionJmixTreeGridDataProvider
(CollectionContainer<T> container, String hierarchyProperty) JmixTreeGridDataProvider
(CollectionContainer<T> container, String hierarchyProperty, boolean showOrphans) -
Method Summary
Modifier and TypeMethodDescriptionfetchChildren
(com.vaadin.flow.data.provider.hierarchy.HierarchicalQuery<T, Void> query) int
getChildCount
(com.vaadin.flow.data.provider.hierarchy.HierarchicalQuery<T, Void> query) int
getChildCount
(T parent) getChildren
(T item) Returns the property of entity which forms the hierarchy.int
Returns the hierarchy level of an item.boolean
hasChildren
(T item) Methods inherited from class io.jmix.flowui.component.grid.JmixGridDataProvider
createSort, enableSorting, resetSortOrder, sort, suppressSorting
Methods inherited from class io.jmix.flowui.component.grid.AbstractContainerGridDataProvider
addItemSetChangeListener, addSelectedItemChangeListener, addStateChangeListener, addValueChangeListener, bind, containerItemPropertyChanged, containsItem, fetch, getContainer, getEntityMetaClass, getItem, getItemByIndex, getItemId, getItems, getItems, getItemValue, getSelectedItem, getState, getType, indexOfItem, isInMemory, onContainerCollectionChanged, onContainerItemChanged, setSelectedItem, setState, size, size, unbind
Methods inherited from class com.vaadin.flow.data.provider.AbstractDataProvider
addDataProviderListener, addListener, fireEvent, refreshAll, refreshItem, refreshItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.data.provider.DataProvider
addDataProviderListener, getId, isInMemory, refreshAll, refreshItem, refreshItem
Methods inherited from interface io.jmix.flowui.data.DataUnit
addStateChangeListener, getState
Methods inherited from interface io.jmix.flowui.data.EntityDataUnit
getEntityMetaClass
Methods inherited from interface io.jmix.flowui.data.grid.GridDataItems
addItemSetChangeListener, addSelectedItemChangeListener, addValueChangeListener, containsItem, getItem, getItemByIndex, getItemId, getItems, getItems, getItemValue, getSelectedItem, indexOfItem, setSelectedItem, size
Methods inherited from interface com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider
fetch, size, withConfigurableFilter, withConfigurableFilter, withConvertedFilter
-
Field Details
-
hierarchyProperty
-
-
Constructor Details
-
JmixTreeGridDataProvider
-
JmixTreeGridDataProvider
public JmixTreeGridDataProvider(CollectionContainer<T> container, String hierarchyProperty, boolean showOrphans)
-
-
Method Details
-
getChildCount
-
fetchChildren
-
hasChildren
- Specified by:
hasChildren
in interfacecom.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T,
Void> - Specified by:
hasChildren
in interfaceTreeGridDataItems<T>
- Parameters:
item
- the item to check- Returns:
true
if the item has children,false
otherwise
-
getLevel
Description copied from interface:TreeGridDataItems
Returns the hierarchy level of an item.- Specified by:
getLevel
in interfaceTreeGridDataItems<T>
- Parameters:
item
- the item to get level- Returns:
- the level of the given item
-
getChildCount
- Specified by:
getChildCount
in interfaceTreeGridDataItems<T>
- Parameters:
parent
- the parent item- Returns:
- child count of the given parent item
-
getChildren
- Specified by:
getChildren
in interfaceTreeGridDataItems<T>
- Parameters:
item
- the item to obtain children ornull
to get root items- Returns:
- children of the given item
-
getParent
- Specified by:
getParent
in interfaceTreeGridDataItems<T>
- Parameters:
item
- the item to get parent- Returns:
- the parent of the given item or
null
if no parent
-
getHierarchyPropertyName
Description copied from interface:TreeGridDataItems
Returns the property of entity which forms the hierarchy.- Specified by:
getHierarchyPropertyName
in interfaceTreeGridDataItems<T>
- Returns:
- hierarchy property name
-