Package io.jmix.core
Class FluentLoader.ByCondition<E>
java.lang.Object
io.jmix.core.FluentLoader.ByCondition<E>
- Enclosing class:
- FluentLoader<E>
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedByCondition(FluentLoader.ByQuery<E> byQuery, Condition condition) protectedByCondition(FluentLoader<E> loader, String entityName, Condition condition) 
- 
Method SummaryModifier and TypeMethodDescriptionaccessConstraints(Class<? extends AccessConstraint> accessConstraintsClass) Adds registered access constraints that are subclasses of the given class.accessConstraints(Collection<AccessConstraint<?>> accessConstraints) Adds access constraints.cacheable(boolean cacheable) Indicates that the query results should be cached.Sets a fetch plan.Sets a fetchPlan by name.fetchPlan(Consumer<FetchPlanBuilder> fetchPlanBuilderConfigurer) Configure the fetch plan.fetchPlanProperties(String... properties) Sets a fetch plan containing the given properties.firstResult(int firstResult) Sets results offset.hint(String hintName, Serializable value) Adds 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.list()Loads a list of entities.maxResults(int maxResults) Sets results limit.one()Loads a single instance.optional()Loads a single instance and wraps it in Optional.Sets value for a query parameter.Sets value for a parameter ofjava.util.Datetype.parameters(Map<String, Object> parameters) Adds the given parameters to the map of query parameters.Sets sorting, for examplesort(Sort.by("name"))
- 
Constructor Details- 
ByCondition
- 
ByCondition
 
- 
- 
Method Details- 
listLoads a list of entities.
- 
optionalLoads a single instance and wraps it in Optional.
- 
oneLoads a single instance.- Throws:
- IllegalStateException- if nothing was loaded
 
- 
fetchPlanSets a fetch plan.
- 
fetchPlanSets a fetchPlan by name.
- 
fetchPlanConfigure the fetch plan.
- 
fetchPlanPropertiesSets 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) .condition(...) .fetchPlanProperties( "name", "owner.name", "owner.address.city") .list();
- 
hintAdds custom hint that should be used by the query.
- 
hintsAdds custom hints that should be used by the query.
- 
parameterSets value for a query parameter.- Parameters:
- name- parameter name
- value- parameter value
 
- 
parameterpublic FluentLoader.ByCondition<E> parameter(String name, Date value, javax.persistence.TemporalType temporalType) Sets value for a parameter ofjava.util.Datetype.- Parameters:
- name- parameter name
- value- parameter value
- temporalType- how to interpret the value
 
- 
parametersAdds the given parameters to the map of query parameters.
- 
firstResultSets results offset.
- 
maxResultsSets results limit.
- 
sortSets sorting, for examplesort(Sort.by("name"))
- 
cacheableIndicates that the query results should be cached. By default, queries are not cached.
- 
accessConstraintspublic FluentLoader.ByCondition<E> accessConstraints(Collection<AccessConstraint<?>> accessConstraints) Adds access constraints.
- 
accessConstraintspublic FluentLoader.ByCondition<E> accessConstraints(Class<? extends AccessConstraint> accessConstraintsClass) Adds registered access constraints that are subclasses of the given class.
- 
joinTransactionIndicates that the operation must be performed in an existing transaction if it exists. True by default.
 
-