Package io.jmix.core
Class FluentLoader.ById<E>
java.lang.Object
io.jmix.core.FluentLoader.ById<E>
- Enclosing class:
- FluentLoader<E>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessConstraints
(Class<? extends AccessConstraint> accessConstraintsClass) Adds registered access constraints that are subclasses of the given class.accessConstraints
(Collection<AccessConstraint<?>> accessConstraints) Adds access constraints.Sets a fetch plan.Sets a fetch plan by name.fetchPlan
(Consumer<FetchPlanBuilder> fetchPlanBuilderConfigurer) Configure the fetch plan.fetchPlanProperties
(String... properties) Sets a fetch plan containing the given properties.hint
(String hintName, Serializable value) Adds a custom hint that should be used by the query.hints
(Map<String, Serializable> hints) Adds custom hints that should be used by the query.joinTransaction
(boolean join) Indicates that the operation must be performed in an existing transaction if it exists.lockMode
(javax.persistence.LockModeType lockMode) Sets a lock mode to be used when executing query.one()
Loads a single instance.optional()
Loads a single instance and wraps it in Optional.
-
Constructor Details
-
ById
-
-
Method Details
-
optional
Loads a single instance and wraps it in Optional. -
one
Loads a single instance.- Throws:
IllegalStateException
- if nothing was loaded
-
fetchPlan
Sets a fetch plan. -
fetchPlan
Sets a fetch plan by name. -
fetchPlan
Configure the fetch plan. -
fetchPlanProperties
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) .id(petId) .fetchPlanProperties( "name", "owner.name", "owner.address.city") .list();
-
hint
Adds a custom hint that should be used by the query. -
hints
Adds custom hints that should be used by the query. -
accessConstraints
Adds access constraints. -
accessConstraints
public FluentLoader.ById<E> accessConstraints(Class<? extends AccessConstraint> accessConstraintsClass) Adds registered access constraints that are subclasses of the given class. -
joinTransaction
Indicates that the operation must be performed in an existing transaction if it exists. True by default. -
lockMode
Sets a lock mode to be used when executing query.
-