Package io.jmix.flowui.data.items
Class ContainerDataProvider<E>
java.lang.Object
com.vaadin.flow.data.provider.AbstractDataProvider<E,com.vaadin.flow.function.SerializablePredicate<E>>
 
io.jmix.flowui.data.items.ContainerDataProvider<E>
- All Implemented Interfaces:
- com.vaadin.flow.data.provider.ConfigurableFilterDataProvider<E,,- com.vaadin.flow.function.SerializablePredicate<E>, - com.vaadin.flow.function.SerializablePredicate<E>> - com.vaadin.flow.data.provider.DataProvider<E,,- com.vaadin.flow.function.SerializablePredicate<E>> - com.vaadin.flow.data.provider.InMemoryDataProvider<E>,- ContainerDataUnit<E>,- DataUnit,- EntityDataUnit,- EntityItems<E>,- Serializable
public class ContainerDataProvider<E>
extends com.vaadin.flow.data.provider.AbstractDataProvider<E,com.vaadin.flow.function.SerializablePredicate<E>>
implements com.vaadin.flow.data.provider.InMemoryDataProvider<E>, ContainerDataUnit<E>, EntityItems<E> 
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnitDataUnit.StateChangeEventNested classes/interfaces inherited from interface io.jmix.flowui.data.EntityItemsEntityItems.ItemsChangeEvent<T>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected CollectionContainer<E>protected Eprotected com.vaadin.flow.function.SerializablePredicate<E>protected DataLoaderprotected com.vaadin.flow.function.SerializableComparator<E>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddItemsChangeListener(Consumer<EntityItems.ItemsChangeEvent<E>> listener) Adds an items change listener.com.vaadin.flow.shared.RegistrationRegisters a new state change listener.protected voidprotected voidbooleancontainsItem(E item) fetch(com.vaadin.flow.data.provider.Query<E, com.vaadin.flow.function.SerializablePredicate<E>> query) protected EventBuscom.vaadin.flow.function.SerializablePredicate<E>getFilteredItems(com.vaadin.flow.data.provider.Query<E, com.vaadin.flow.function.SerializablePredicate<E>> query) getItems()com.vaadin.flow.function.SerializableComparator<E>getState()voidrefresh()Refreshes the source moving it to theBindingState.ACTIVEstatevoidvoidsetSelectedItem(E item) Set current item in the source.voidsetSortComparator(com.vaadin.flow.function.SerializableComparator<E> comparator) intsize(com.vaadin.flow.data.provider.Query<E, com.vaadin.flow.function.SerializablePredicate<E>> query) voidupdateItem(E item) Update an item in the collection if it is already there.Methods inherited from class com.vaadin.flow.data.provider.AbstractDataProvideraddDataProviderListener, addListener, fireEvent, refreshAll, refreshItem, refreshItemMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.data.provider.DataProvideraddDataProviderListener, getId, refreshAll, refreshItem, refreshItem, withConfigurableFilter, withConfigurableFilter, withConvertedFilterMethods inherited from interface com.vaadin.flow.data.provider.InMemoryDataProvideraddFilter, addFilter, addFilterByValue, addSortComparator, addSortOrder, clearFilters, filteringBy, filteringBy, filteringByEquals, filteringByPrefix, filteringByPrefix, filteringBySubstring, filteringBySubstring, isInMemory, setFilter, setFilterByValue, setSortOrder
- 
Field Details- 
container
- 
loader
- 
deferredSelectedItem
- 
sortOrder
- 
filter
 
- 
- 
Constructor Details- 
ContainerDataProvider
 
- 
- 
Method Details- 
containerCollectionChanged
- 
containerItemPropertyChanged
- 
getEntityMetaClass- Specified by:
- getEntityMetaClassin interface- EntityDataUnit
- Returns:
- MetaClassof an entity contained in the source
 
- 
getContainer- Specified by:
- getContainerin interface- ContainerDataUnit<E>
 
- 
setSelectedItemDescription copied from interface:EntityItemsSet current item in the source.- Specified by:
- setSelectedItemin interface- EntityItems<E>
- Parameters:
- item- the item to set
 
- 
containsItem- Specified by:
- containsItemin interface- EntityItems<E>
- Returns:
- true if the underlying collection contains an item with the specified ID
 
- 
updateItemDescription copied from interface:EntityItemsUpdate an item in the collection if it is already there.- Specified by:
- updateItemin interface- EntityItems<E>
 
- 
refreshpublic void refresh()Description copied from interface:EntityItemsRefreshes the source moving it to theBindingState.ACTIVEstate- Specified by:
- refreshin interface- EntityItems<E>
 
- 
addItemsChangeListenerpublic com.vaadin.flow.shared.Registration addItemsChangeListener(Consumer<EntityItems.ItemsChangeEvent<E>> listener) Description copied from interface:EntityItemsAdds an items change listener. The listener is called when the item collection is changed.- Specified by:
- addItemsChangeListenerin interface- EntityItems<E>
- Parameters:
- listener- a listener to register, not null
- Returns:
- a registration for the listener
 
- 
size
- 
fetch
- 
getFilteredItems
- 
getItems
- 
getFilter- Specified by:
- getFilterin interface- com.vaadin.flow.data.provider.InMemoryDataProvider<E>
 
- 
setFilter
- 
getSortComparator- Specified by:
- getSortComparatorin interface- com.vaadin.flow.data.provider.InMemoryDataProvider<E>
 
- 
setSortComparator- Specified by:
- setSortComparatorin interface- com.vaadin.flow.data.provider.InMemoryDataProvider<E>
 
- 
getState
- 
addStateChangeListenerpublic com.vaadin.flow.shared.Registration addStateChangeListener(Consumer<DataUnit.StateChangeEvent> listener) Description copied from interface:DataUnitRegisters a new state change listener.- Specified by:
- addStateChangeListenerin interface- DataUnit
- Parameters:
- listener- the listener to be added
- Returns:
- a registration object for removing an event listener added to a source
 
- 
getEventBus
 
-