V
- value typepublic interface JpqlFilter<V> extends SingleFilterComponent<V>
DataLoader
.
The component contains JPQL expressions that will be added to the 'from' and 'where' data
loader query sections. The component can automatically render proper layout for setting a
condition value. In general case a JpqlFilter layout contains a label with caption and
a field for editing a condition value.HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
SupportsCaptionPosition.CaptionPosition
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getJoin()
Returns a JPQL expression which will be added to the 'from' data loader query section.
|
java.lang.Class |
getParameterClass() |
io.jmix.core.querycondition.JpqlCondition |
getQueryCondition() |
java.lang.String |
getWhere()
Returns a a JPQL expression which will be added to the 'where' data loader query section.
|
boolean |
hasInExpression() |
void |
setCondition(java.lang.String where,
java.lang.String join)
Sets JPQL expressions which will be added to the data loader query 'from' and 'where'
sections.
|
void |
setHasInExpression(boolean hasInExpression)
Sets whether the query condition has an IN expression and the value is a collection.
|
void |
setParameterClass(java.lang.Class parameterClass)
Sets a Java class of the associated query parameter.
|
getCaptionWidth, getCaptionWidthSizeUnit, getParameterName, getValueComponent, setCaptionWidth, setParameterName, setValueComponent
apply, getDataLoader, isAutoApply, isConditionModificationDelegated, setAutoApply, setConditionModificationDelegated, setDataLoader
getFrame, setFrame
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
getIcon, setIcon, setIconFromSet
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
isEditable, isEditableWithParent, setEditable
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
getCaptionPosition, setCaptionPosition
getRequiredMessage, isRequired, setRequired, setRequiredMessage
isValid, isValidateOnCommit, validate
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
static final java.lang.String NAME
io.jmix.core.querycondition.JpqlCondition getQueryCondition()
getQueryCondition
in interface FilterComponent
JpqlCondition
related to the current JpqlFilterjava.lang.Class getParameterClass()
void setParameterClass(java.lang.Class parameterClass)
parameterClass
- a Java class of the associated query parameterjava.lang.String getWhere()
The {E}
placeholder should be used in the expression instead of the alias
of the entity being selected. The condition can only have one parameter denoted by
?
if used.
Example of selecting Car entities by an attribute of the joined Repair collection:
r.description like ?
setCondition(String, String)
@Nullable java.lang.String getJoin()
This can be required to create a complex condition based on an attribute of a related
collection. The expression should be started with join
or
left join
statements.
The {E}
placeholder should be used in the expression instead of the alias
of the entity being selected.
Example of joining the Repair collection when selecting Car entities:
join {E}.repairs r
setCondition(String, String)
void setCondition(java.lang.String where, @Nullable java.lang.String join)
where
- a JPQL expression which will be added to the 'where' data loader query sectionjoin
- a JPQL expression which will be added to the 'from' data loader query sectiongetJoin()
,
getWhere()
void setHasInExpression(boolean hasInExpression)
hasInExpression
- whether the query condition has an IN expressionboolean hasInExpression()