Package io.jmix.flowui.model
Interface DataLoader
- All Known Subinterfaces:
BaseCollectionLoader
,CollectionLoader<E>
,InstanceLoader<E>
,KeyValueCollectionLoader
,KeyValueInstanceLoader
- All Known Implementing Classes:
CollectionLoaderImpl
,InstanceLoaderImpl
,KeyValueCollectionLoaderImpl
,KeyValueInstanceLoaderImpl
public interface DataLoader
The root interface in the data loaders hierarchy. Data loaders are designed to load entity instances and
collections from DataManager or custom services to data containers.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the root condition which is used together with the query when loading entities.Returns connected container.Returns data context.getHints()
Returns function that provides monitoring info about this data loader.getParameter
(String name) Returns a query parameter by its name.Returns the map of query parameters.getQuery()
Returns the query which is used for loading entities.void
load()
Loads data to the connected container.void
removeParameter
(String name) Removes a query parameter.void
setCondition
(Condition condition) Sets the root condition which will be used together with the query when loading entities.void
setDataContext
(DataContext dataContext) Sets the data context for the loader.void
setHint
(String hintName, Serializable value) Sets custom hint that should be used by the query for loading data.void
setMonitoringInfoProvider
(Function<DataLoader, DataLoaderMonitoringInfo> monitoringInfoProvider) Sets function that provides monitoring info about this data loader.void
setParameter
(String name, Object value) Sets a query parameter.void
setParameters
(Map<String, Object> parameters) Sets the map of query parameters.void
Sets a query which will be used for loading entities.
-
Method Details
-
load
void load()Loads data to the connected container. -
getContainer
InstanceContainer<?> getContainer()Returns connected container. -
getDataContext
Returns data context. If the data context is set, all loaded instance will be merged into it. -
setDataContext
Sets the data context for the loader. If the data context is set, all loaded instance will be merged into it. -
getQuery
String getQuery()Returns the query which is used for loading entities. -
setQuery
Sets a query which will be used for loading entities. -
getCondition
Returns the root condition which is used together with the query when loading entities. -
setCondition
Sets the root condition which will be used together with the query when loading entities. -
getParameters
Returns the map of query parameters. -
setParameters
Sets the map of query parameters. -
getParameter
Returns a query parameter by its name. -
setParameter
Sets a query parameter. -
removeParameter
Removes a query parameter. -
setHint
Sets custom hint that should be used by the query for loading data. -
getHints
Map<String,Serializable> getHints()- Returns:
- custom hints which are used by the query for loading data.
-
setMonitoringInfoProvider
void setMonitoringInfoProvider(Function<DataLoader, DataLoaderMonitoringInfo> monitoringInfoProvider) Sets function that provides monitoring info about this data loader. -
getMonitoringInfoProvider
Function<DataLoader,DataLoaderMonitoringInfo> getMonitoringInfoProvider()Returns function that provides monitoring info about this data loader.
-