Class EntityDataLoadQueryParameter
java.lang.Object
io.jmix.aitools.dataload.generation.EntityDataLoadQueryParameter
A parameter that generated query text may reference: its name, the Java type of the value it will
be bound to, and how it is bound. Carries no value — a generated query references it by name and is
given values only when it runs.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the Java type the value is bound as at execution.getName()Returns the name a generated query references this parameter by.booleanTells a parameter bound as a collection from a single-valued one, so a query matches it withIN.booleanTells a parameter a caller may leave empty from one it always supplies.setMultiValued(boolean multiValued) Marks the parameter as bound to a collection, so a query matches it withIN.setOptional(boolean optional) Marks the parameter as one a caller may leavenull, so a query referencing it must guard the condition.
-
Field Details
-
name
-
javaType
-
multiValued
protected boolean multiValued -
optional
protected boolean optional
-
-
Constructor Details
-
EntityDataLoadQueryParameter
-
-
Method Details
-
setMultiValued
Marks the parameter as bound to a collection, so a query matches it withIN.- Parameters:
multiValued- whether the value is a collection ofgetJavaType()- Returns:
- this parameter
-
setOptional
Marks the parameter as one a caller may leavenull, so a query referencing it must guard the condition.- Parameters:
optional- whether the value may benull- Returns:
- this parameter
-
getName
Returns the name a generated query references this parameter by.- Returns:
- the JPQL parameter name, without the leading colon
-
getJavaType
Returns the Java type the value is bound as at execution.- Returns:
- the fully qualified Java type, or
""when unknown
-
isMultiValued
public boolean isMultiValued()Tells a parameter bound as a collection from a single-valued one, so a query matches it withIN.- Returns:
trueif the value is a collection ofgetJavaType()
-
isOptional
public boolean isOptional()Tells a parameter a caller may leave empty from one it always supplies. A query referencing an optional parameter must survive anullvalue, which in JPQL means guarding the condition.- Returns:
trueif the value may benull
-