Package io.jmix.core
Class FluentValueLoader<T>
java.lang.Object
io.jmix.core.FluentValueLoader<T>
@Component("core_FluentValueLoader")
@Scope("prototype")
public class FluentValueLoader<T>
extends Object
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.jmix.core.AbstractFluentValueLoader
accessConstraints
(List<AccessConstraint<?>> accessConstraints) Sets access constraints.protected ValueLoadContext
firstResult
(int firstResult) Sets results offset.hint
(String hintName, Serializable value) Sets custom hint that should be used by the query.hints
(Map<String, Serializable> hints) Sets custom hints that should be used by the query.protected ValueLoadContext
io.jmix.core.AbstractFluentValueLoader
joinTransaction
(boolean join) 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 query parameter.Sets value for a parameter ofjava.util.Date
type.void
setDataManager
(UnconstrainedDataManager dataManager) setParameters
(Map<String, Object> parameters) Sets the map of query parameters.Sets DataStore name.
-
Field Details
-
dataManager
-
-
Constructor Details
-
FluentValueLoader
-
-
Method Details
-
createLoadContext
-
list
Loads a list of entities. -
optional
Loads a single instance and wraps it in Optional. -
one
Loads a single instance.- Throws:
IllegalStateException
- if nothing was loaded
-
store
Sets DataStore name. -
hint
Sets custom hint that should be used by the query. -
hints
Sets custom hints that should be used by the query. -
parameter
Sets value for a query parameter.- Parameters:
name
- parameter namevalue
- parameter value
-
parameter
public FluentValueLoader<T> parameter(String name, Date value, javax.persistence.TemporalType temporalType) Sets value for a parameter ofjava.util.Date
type.- Parameters:
name
- parameter namevalue
- parameter valuetemporalType
- how to interpret the value
-
parameter
Sets value for a query parameter.- Parameters:
name
- parameter namevalue
- parameter valueimplicitConversion
- whether to do parameter value conversions, e.g. convert an entity to its ID
-
setParameters
Sets the map of query parameters. -
firstResult
Sets results offset. -
maxResults
Sets results limit. -
setDataManager
-
joinTransaction
public io.jmix.core.AbstractFluentValueLoader joinTransaction(boolean join) -
accessConstraints
public io.jmix.core.AbstractFluentValueLoader accessConstraints(List<AccessConstraint<?>> accessConstraints) Sets access constraints. -
instantiateValueLoadContext
-