Class ContainerCalendarDataProvider<E>
java.lang.Object
io.jmix.fullcalendarflowui.component.data.AbstractEntityCalendarDataProvider
io.jmix.fullcalendarflowui.component.data.ContainerCalendarDataProvider<E>
- Type Parameters:
E
- entity type
- All Implemented Interfaces:
DataUnit
,EntityDataUnit
,CalendarDataProvider
,EntityCalendarDataProvider
,ItemsCalendarDataProvider
public class ContainerCalendarDataProvider<E>
extends AbstractEntityCalendarDataProvider
implements EntityDataUnit, ItemsCalendarDataProvider
Data provider that loads entities from containers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEvent
Nested classes/interfaces inherited from interface io.jmix.fullcalendarflowui.component.data.ItemsCalendarDataProvider
ItemsCalendarDataProvider.ItemSetChangeEvent
-
Field Summary
Fields inherited from class io.jmix.fullcalendarflowui.component.data.AbstractEntityCalendarDataProvider
additionalProperties, allDayProperty, backgroundColorProperty, borderColorProperty, classNamesProperty, constraintProperty, descriptionProperty, displayProperty, durationEditableProperty, endDateTimeProperty, groupIdProperty, id, interactiveProperty, overlapProperty, recurringDaysOfWeekProperty, recurringEndDateProperty, recurringEndTimeProperty, recurringStartDateProperty, recurringStartTimeProperty, startDateTimeProperty, startEditableProperty, textColorProperty, titleProperty
-
Constructor Summary
ConstructorDescriptionContainerCalendarDataProvider
(InstanceContainer<E> container) ContainerCalendarDataProvider
(String id, InstanceContainer<E> container) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
Adds an item set change listener.com.vaadin.flow.shared.Registration
Registers a new state change listener.protected List<CalendarEvent>
addToCache
(Collection<E> items) protected void
protected void
protected void
protected void
fireItemSetChangeEvent
(DataChangeOperation operation, List<CalendarEvent> items) Class<?>
protected EventBus
getItems()
Class<?>
getState()
protected void
initContainer
(InstanceContainer<E> container) protected void
protected List<CalendarEvent>
removeFromCache
(Collection<E> items) protected void
replaceInCache
(E item) protected List<CalendarEvent>
updateCache
(Collection<E> items) Methods inherited from class io.jmix.fullcalendarflowui.component.data.AbstractEntityCalendarDataProvider
getAdditionalProperties, getAllDayProperty, getBackgroundColorProperty, getBorderColorProperty, getClassNamesProperty, getConstraintProperty, getDescriptionProperty, getDisplayProperty, getDurationEditableProperty, getEndDateTimeProperty, getGroupIdProperty, getId, getInteractiveProperty, getOverlapProperty, getRecurringDaysOfWeekProperty, getRecurringEndDateProperty, getRecurringEndTimeProperty, getRecurringStartDateProperty, getRecurringStartTimeProperty, getStartDateTimeProperty, getStartEditableProperty, getTextColorProperty, getTitleProperty, isAdditionalProperty, isEventPropertyChanged, setAdditionalProperties, setAllDayProperty, setBackgroundColorProperty, setBorderColorProperty, setClassNamesProperty, setConstraintProperty, setDescriptionProperty, setDisplayProperty, setDurationEditableProperty, setEndDateTimeProperty, setGroupIdProperty, setInteractiveProperty, setOverlapProperty, setRecurringDaysOfWeekProperty, setRecurringEndDateProperty, setRecurringEndTimeProperty, setRecurringStartDateProperty, setRecurringStartTimeProperty, setStartDateTimeProperty, setStartEditableProperty, setTextColorProperty, setTitleProperty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.fullcalendarflowui.component.data.CalendarDataProvider
getId
-
Field Details
-
itemsCache
-
container
-
-
Constructor Details
-
ContainerCalendarDataProvider
-
ContainerCalendarDataProvider
-
-
Method Details
-
initContainer
-
containerItemChanged
-
containerCollectionChanged
-
containerItemPropertyChanged
-
getContainer
-
getEntityMetaClass
- Specified by:
getEntityMetaClass
in interfaceEntityCalendarDataProvider
- Specified by:
getEntityMetaClass
in interfaceEntityDataUnit
- Returns:
MetaClass
of an entity contained in the source
-
getState
-
addStateChangeListener
public com.vaadin.flow.shared.Registration addStateChangeListener(Consumer<DataUnit.StateChangeEvent> listener) Description copied from interface:DataUnit
Registers a new state change listener.- Specified by:
addStateChangeListener
in interfaceDataUnit
- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
getItems
- Specified by:
getItems
in interfaceItemsCalendarDataProvider
- Returns:
- loaded calendar events
-
getItem
- Specified by:
getItem
in interfaceItemsCalendarDataProvider
- Parameters:
itemId
- ID of calendar event- Returns:
- calendar event or
null
if no event with provided ID
-
addItemSetChangeListener
public com.vaadin.flow.shared.Registration addItemSetChangeListener(Consumer<ItemsCalendarDataProvider.ItemSetChangeEvent> listener) Description copied from interface:ItemsCalendarDataProvider
Adds an item set change listener.- Specified by:
addItemSetChangeListener
in interfaceItemsCalendarDataProvider
- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a data provider
-
getStartPropertyJavaType
- Specified by:
getStartPropertyJavaType
in interfaceEntityCalendarDataProvider
- Returns:
- java type of start date-time property or
null
if property is not specified
-
getEndPropertyJavaType
- Specified by:
getEndPropertyJavaType
in interfaceEntityCalendarDataProvider
- Returns:
- java type of end date-time property or
null
if property is not specified
-
getEventBus
-
replaceInCache
-
addToCache
-
updateCache
-
removeFromCache
-
refreshCache
protected void refreshCache() -
getContainerItems
-
fireItemSetChangeEvent
-