Package io.jmix.core

Class FluentLoader.ByIds<E>

java.lang.Object
io.jmix.core.FluentLoader.ByIds<E>
Enclosing class:
FluentLoader<E>

public static class FluentLoader.ByIds<E> extends Object
  • Constructor Details

  • Method Details

    • list

      public List<E> list()
      Loads a list of entities.
    • fetchPlan

      public FluentLoader.ByIds<E> fetchPlan(@Nullable FetchPlan fetchPlan)
      Sets a fetch plan.
    • fetchPlan

      public FluentLoader.ByIds<E> fetchPlan(@Nullable String fetchPlanName)
      Sets a fetch plan by name.
    • fetchPlan

      public FluentLoader.ByIds<E> fetchPlan(Consumer<FetchPlanBuilder> fetchPlanBuilderConfigurer)
      Sets a fetch plan configured by the FetchPlanBuilder. For example:
           dataManager.load(Pet.class)
               .ids(id1, id2)
               .fetchPlan(fetchPlanBuilder -> fetchPlanBuilder.addAll(
                       "name",
                       "owner.name"))
               .list();
       
    • fetchPlanProperties

      public FluentLoader.ByIds<E> fetchPlanProperties(String... properties)
      Sets a fetch plan containing the given properties. A property can be designated by a path in the entity graph. For example:
           dataManager.load(Pet.class)
               .ids(id1, id2)
               .fetchPlanProperties(
                       "name",
                       "owner.name",
                       "owner.address.city")
               .list();
       
    • hint

      public FluentLoader.ByIds<E> hint(String hintName, Serializable value)
      Adds custom hint that should be used by the query.
    • hints

      public FluentLoader.ByIds<E> hints(Map<String,Serializable> hints)
      Adds custom hints that should be used by the query.
    • accessConstraints

      public FluentLoader.ByIds<E> accessConstraints(Collection<AccessConstraint<?>> accessConstraints)
      Adds access constraints.
    • accessConstraints

      public FluentLoader.ByIds<E> accessConstraints(Class<? extends AccessConstraint> accessConstraintsClass)
      Adds registered access constraints that are subclasses of the given class.
    • joinTransaction

      public FluentLoader.ByIds<E> joinTransaction(boolean join)
      Indicates that the operation must be performed in an existing transaction if it exists. True by default.
    • lockMode

      public FluentLoader.ByIds<E> lockMode(jakarta.persistence.LockModeType lockMode)
      Sets a lock mode to be used when executing query.