Class PersistentPropertyDescriptorSortInfoImpl
java.lang.Object
io.jmix.groupgridflowui.component.sort.impl.PersistentPropertyDescriptorSortInfoImpl
- All Implemented Interfaces:
PersistentSortInfo,SortInfo,PersistentPropertyDescriptorSortInfo
public class PersistentPropertyDescriptorSortInfoImpl
extends Object
implements PersistentPropertyDescriptorSortInfo
Implementation of
PersistentPropertyDescriptorSortInfo, which represents sorting information
for persistent operations based on GroupPropertyDescriptor.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final Stringprotected final List<PersistentSortInfo> -
Constructor Summary
ConstructorsConstructorDescriptionPersistentPropertyDescriptorSortInfoImpl(String key, List<PersistentSortInfo> persistentSortInfos, boolean ascending) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a list of expressions used for persistent sorting.@Nullable MetaPropertyPathReturns theMetaPropertyPathobject representing the property path.Retrieves a list ofPersistentSortInforepresenting sorting details for persistent operations.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
-
persistentSortInfos
-
key
-
expressions
-
ascending
protected boolean ascending
-
-
Constructor Details
-
PersistentPropertyDescriptorSortInfoImpl
public PersistentPropertyDescriptorSortInfoImpl(String key, List<PersistentSortInfo> persistentSortInfos, boolean ascending)
-
-
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
-
getPersistentSortInfos
Description copied from interface:PersistentPropertyDescriptorSortInfoRetrieves a list ofPersistentSortInforepresenting sorting details for persistent operations. These sorting details are based on theGroupPropertyDescriptor.getSortProperties().- Specified by:
getPersistentSortInfosin interfacePersistentPropertyDescriptorSortInfo- Returns:
- a list of
PersistentSortInfoinstances
-