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 Details

    • load

      void load()
      Loads data to the connected container.
    • getContainer

      InstanceContainer<?> getContainer()
      Returns connected container.
    • getDataContext

      @Nullable DataContext getDataContext()
      Returns data context. If the data context is set, all loaded instance will be merged into it.
    • setDataContext

      void setDataContext(@Nullable DataContext dataContext)
      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

      void setQuery(String query)
      Sets a query which will be used for loading entities.
    • getCondition

      @Nullable Condition getCondition()
      Returns the root condition which is used together with the query when loading entities.
    • setCondition

      void setCondition(Condition condition)
      Sets the root condition which will be used together with the query when loading entities.
    • getParameters

      Map<String,Object> getParameters()
      Returns the map of query parameters.
    • setParameters

      void setParameters(Map<String,Object> parameters)
      Sets the map of query parameters.
    • getParameter

      Object getParameter(String name)
      Returns a query parameter by its name.
    • setParameter

      void setParameter(String name, @Nullable Object value)
      Sets a query parameter.
    • removeParameter

      void removeParameter(String name)
      Removes a query parameter.
    • setHint

      void setHint(String hintName, Serializable value)
      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.