Class EntityFetcher

java.lang.Object
io.jmix.data.impl.EntityFetcher

@Component("data_EntityFetcher") public class EntityFetcher extends Object
Fetches entities by fetch plans by accessing reference attributes.
  • Field Details

  • Constructor Details

    • EntityFetcher

      public EntityFetcher()
  • Method Details

    • fetch

      public void fetch(Object instance, @Nullable FetchPlan fetchPlan)
      Fetch instance by fetch plan.
      Parameters:
      fetchPlan - if null, nothing happens
    • fetch

      public void fetch(Object instance, @Nullable String fetchPlanName)
      Fetch instance by fetch plan.
      Parameters:
      fetchPlanName - if null, nothing happens
    • fetch

      public void fetch(Object instance, @Nullable FetchPlan fetchPlan, boolean optimizeForDetached)
      Fetch instance by fetch plan.
      Parameters:
      fetchPlan - if null, nothing happens
      optimizeForDetached - if true, detached objects encountered in the graph will be first checked whether all required attributes are already loaded, and reloaded only when needed. If the argument is false, all detached objects are reloaded anyway.
    • fetch

      public void fetch(Object instance, @Nullable String fetchPlanName, boolean optimizeForDetached)
      Fetch instance by fetch plan.
      Parameters:
      fetchPlanName - if null, nothing happens
      optimizeForDetached - if true, detached objects encountered in the graph will be first checked whether all required attributes are already loaded, and reloaded only when needed. If the argument is false, all detached objects are reloaded anyway.
    • fetch

      protected void fetch(Object entity, FetchPlan fetchPlan, Map<Object,Set<FetchPlan>> visited, boolean optimizeForDetached)
    • fetchReloaded

      protected void fetchReloaded(Object entity, FetchPlan fetchPlan, Map<Object,Set<FetchPlan>> visited, boolean optimizeForDetached, Consumer<Object> managedEntityConsumer)
    • needReloading

      protected boolean needReloading(Object entity, FetchPlan fetchPlan)
    • isLazyFetchedLocalAttribute

      protected boolean isLazyFetchedLocalAttribute(MetaProperty metaProperty)