Class EntityCalendarDataRetriever
java.lang.Object
io.jmix.fullcalendarflowui.component.data.AbstractEntityCalendarDataProvider
io.jmix.fullcalendarflowui.component.data.EntityCalendarDataRetriever
- All Implemented Interfaces:
CalendarDataProvider,CallbackCalendarDataProvider,EntityCalendarDataProvider,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Component("fcalen_CallbackCalendarDataRetriever")
@Scope("prototype")
public class EntityCalendarDataRetriever
extends AbstractEntityCalendarDataProvider
implements CallbackCalendarDataProvider, org.springframework.context.ApplicationContextAware
Data provider for loading entities by request. It is created when calendar's XML description defines
callback data provider.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.fullcalendarflowui.component.data.CallbackCalendarDataProvider
CallbackCalendarDataProvider.ItemsFetchContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataManagerprotected DateTimeTransformationsprotected static final Stringprotected Class<?>protected FetchPlanprotected Metadataprotected Stringprotected static final StringFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectClass<?>Class<?>protected ObjectClass<?>protected booleanisEndDateUsed(String query) protected booleanisStartDateUsed(String query) protected List<CalendarEvent>load(CallbackCalendarDataProvider.ItemsFetchContext fetchContext) protected List<?>loadItems(CallbackCalendarDataProvider.ItemsFetchContext fetchContext) A callback method that is invoked byFullCalendar, for instance, when the user navigates to next/previous dates.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetEntityClass(Class<?> entityClass) Sets entity class that should be used for loading entities using JPQL query.voidsetFetchPlan(FetchPlan fetchPlan) Sets fetch plan for loading entities using JPQL query.voidsetLoadDelegate(Function<CallbackCalendarDataProvider.ItemsFetchContext, List<CalendarEvent>> loadDelegate) Sets load delegate that will be used for loading events.voidsetQueryString(String queryString) Sets JPQL query string.protected ObjecttransformToValueWithSystemTimeZone(LocalDate value, TimeZone timeZone, String propertyName) 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, setTitlePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.fullcalendarflowui.component.data.CalendarDataProvider
getId
-
Field Details
-
START_DATE_PARAMETER
- See Also:
-
END_DATE_PARAMETER
- See Also:
-
dataManager
-
metadata
-
dateTimeTransformations
-
entityClass
-
queryString
-
fetchPlan
-
loadDelegate
-
-
Constructor Details
-
EntityCalendarDataRetriever
public EntityCalendarDataRetriever() -
EntityCalendarDataRetriever
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getLoadDelegate
@Nullable public Function<CallbackCalendarDataProvider.ItemsFetchContext,List<CalendarEvent>> getLoadDelegate()- Returns:
- load delegate or
nullif not set
-
setLoadDelegate
public void setLoadDelegate(@Nullable Function<CallbackCalendarDataProvider.ItemsFetchContext, List<CalendarEvent>> loadDelegate) Sets load delegate that will be used for loading events.- Parameters:
loadDelegate- delegate to set
-
getEntityMetaClass
- Specified by:
getEntityMetaClassin interfaceEntityCalendarDataProvider- Returns:
- entity meta class
-
getEntityClass
- Returns:
- entity class or
nullif not set
-
setEntityClass
Sets entity class that should be used for loading entities using JPQL query.Is not used if load delegate is set.
- Parameters:
entityClass- entity class, can not be null
-
getQueryString
- Returns:
- query string or
nullif not set
-
setQueryString
Sets JPQL query string.Is not used if load delegate is set.
- Parameters:
queryString- JPQL query string
-
getFetchPlan
- Returns:
- fetch plan or
nullif not set
-
setFetchPlan
Sets fetch plan for loading entities using JPQL query.Is not used if load delegate is set.
- Parameters:
fetchPlan- fetch plan
-
onItemsFetch
Description copied from interface:CallbackCalendarDataProviderA callback method that is invoked byFullCalendar, for instance, when the user navigates to next/previous dates.- Specified by:
onItemsFetchin interfaceCallbackCalendarDataProvider- Parameters:
context- context that contains information about date range- Returns:
- a list of fetched calendar events
-
getStartPropertyJavaType
- Specified by:
getStartPropertyJavaTypein interfaceEntityCalendarDataProvider- Returns:
- java type of start date-time property or
nullif property is not specified
-
getEndPropertyJavaType
- Specified by:
getEndPropertyJavaTypein interfaceEntityCalendarDataProvider- Returns:
- java type of end date-time property or
nullif property is not specified
-
load
-
loadItems
-
getStartParameterValue
protected Object getStartParameterValue(CallbackCalendarDataProvider.ItemsFetchContext fetchContext) -
getEndParameterValue
-
transformToValueWithSystemTimeZone
-
isStartDateUsed
-
isEndDateUsed
-