Class PersistentSortInfoImpl
java.lang.Object
io.jmix.flowui.component.grid.sort.impl.PersistentSortInfoImpl
- All Implemented Interfaces:
PersistentSortInfo,SortInfo
Implementation of the
PersistentSortInfo interface that represents
detailed information for persistent sorting operations.
This class is used to define sorting behaviors that can be applied to data when interacting with persistent storage.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final @Nullable MetaPropertyPathprotected final String -
Constructor Summary
ConstructorsConstructorDescriptionPersistentSortInfoImpl(String property, boolean ascending, @Nullable MetaPropertyPath metaPropertyPath, List<String> expressions) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a list of expressions used for persistent sorting.@Nullable MetaPropertyPathReturns theMetaPropertyPathobject representing the property path.Returns the sorting key that can be a column key or a property path.booleanIndicates whether the sorting order is ascending.voidsetExpressions(List<String> expressions) Sets the expressions to be used for persistent sorting.
-
Field Details
-
property
-
ascending
protected final boolean ascending -
metaPropertyPath
-
expressions
-
-
Constructor Details
-
PersistentSortInfoImpl
public PersistentSortInfoImpl(String property, boolean ascending, @Nullable MetaPropertyPath metaPropertyPath, List<String> expressions)
-
-
Method Details
-
getMetaPropertyPath
Description copied from interface:SortInfoReturns theMetaPropertyPathobject representing the property path.- Specified by:
getMetaPropertyPathin interfaceSortInfo- Returns:
- the property path object or
nullif not set
-
getSortKey
Description copied from interface:SortInfoReturns the sorting key that can be a column key or a property path.- Specified by:
getSortKeyin interfaceSortInfo- Returns:
- the sorting key
-
getExpressions
Description copied from interface:PersistentSortInfoRetrieves a list of expressions used for persistent sorting.- Specified by:
getExpressionsin interfacePersistentSortInfo- Returns:
- a list of expressions
-
setExpressions
Description copied from interface:PersistentSortInfoSets the expressions to be used for persistent sorting.In case of JPQL, the
{E}alias can be used for JPA entities. For instance,"function('calc_total_sum', {E}.id)".Note that for
KeyValueEntity, the{E}alias is not supported. Use the concrete alias from the query, e.g."function('calc_total_sum', e.id)".- Specified by:
setExpressionsin interfacePersistentSortInfo- Parameters:
expressions- the expressions to set
-
isAscending
public boolean isAscending()Description copied from interface:SortInfoIndicates whether the sorting order is ascending.- Specified by:
isAscendingin interfaceSortInfo- Returns:
trueif the sorting order is ascending,falseotherwise
-