Class FilterComponentBuilder.JpqlFilterBuilder<V>
java.lang.Object
io.jmix.flowui.component.genericfilter.FilterComponentBuilder.JpqlFilterBuilder<V>
- Type Parameters:
V- the value type (Booleanfor a void/checkbox filter, or the parameter type)
- Enclosing class:
FilterComponentBuilder
Fluent builder for
JpqlFilter.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Vprotected final GenericFilterprotected FilterComponentsprotected booleanprotected Stringprotected JpqlFilterSupportprotected Stringprotected Metadataprotected final Class<?> protected Stringprotected String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJpqlFilterBuilder(GenericFilter filter, org.springframework.context.ApplicationContext applicationContext, Class<?> parameterClass) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidautowireDependencies(org.springframework.context.ApplicationContext applicationContext) build()Builds and returns the configuredJpqlFilter.defaultValue(@Nullable V defaultValue) Sets the default (pre-filled) value.hasInExpression(boolean hasInExpression) Marks the condition as having an IN expression (the value is a collection).Sets the optional JPQL JOIN clause fragment (e.g.Overrides the auto-generated label text.parameterName(String parameterName) Sets the query parameter name.Sets the JPQL WHERE clause fragment (use{E}as the entity alias and?as the parameter placeholder).
-
Field Details
-
filter
-
parameterClass
-
metadata
-
filterComponents
-
jpqlFilterSupport
-
where
-
join
-
parameterName
-
defaultValue
-
label
-
hasInExpression
protected boolean hasInExpression -
built
protected boolean built
-
-
Constructor Details
-
JpqlFilterBuilder
protected JpqlFilterBuilder(GenericFilter filter, org.springframework.context.ApplicationContext applicationContext, Class<?> parameterClass)
-
-
Method Details
-
autowireDependencies
protected void autowireDependencies(org.springframework.context.ApplicationContext applicationContext) -
where
Sets the JPQL WHERE clause fragment (use{E}as the entity alias and?as the parameter placeholder). Required. -
join
Sets the optional JPQL JOIN clause fragment (e.g."join {E}.tags t"). -
parameterName
Sets the query parameter name. Optional — if not set, a name is generated automatically (matching the behaviour of the XML loader). Set it explicitly only when the WHERE clause uses a named bind parameter (:paramName) that must match a specific name. -
defaultValue
Sets the default (pre-filled) value. Optional.For a void (checkbox) filter the value type is
Boolean:defaultValue(true)makes the condition active by default. -
label
Overrides the auto-generated label text. Optional. -
hasInExpression
Marks the condition as having an IN expression (the value is a collection). -
build
Builds and returns the configuredJpqlFilter.- Throws:
IllegalStateException- ifwherewas not set, if the owning filter has no DataLoader, or if this builder instance has already been used
-