Class PersistentSortInfoImpl

java.lang.Object
io.jmix.flowui.component.grid.sort.impl.PersistentSortInfoImpl
All Implemented Interfaces:
PersistentSortInfo, SortInfo

public class PersistentSortInfoImpl extends Object implements PersistentSortInfo
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 Details

    • property

      protected final String property
    • ascending

      protected final boolean ascending
    • metaPropertyPath

      protected final @Nullable MetaPropertyPath metaPropertyPath
    • expressions

      protected List<String> expressions
  • Constructor Details

    • PersistentSortInfoImpl

      public PersistentSortInfoImpl(String property, boolean ascending, @Nullable MetaPropertyPath metaPropertyPath, List<String> expressions)
  • Method Details

    • getMetaPropertyPath

      public @Nullable MetaPropertyPath getMetaPropertyPath()
      Description copied from interface: SortInfo
      Returns the MetaPropertyPath object representing the property path.
      Specified by:
      getMetaPropertyPath in interface SortInfo
      Returns:
      the property path object or null if not set
    • getSortKey

      public String getSortKey()
      Description copied from interface: SortInfo
      Returns the sorting key that can be a column key or a property path.
      Specified by:
      getSortKey in interface SortInfo
      Returns:
      the sorting key
    • getExpressions

      public List<String> getExpressions()
      Description copied from interface: PersistentSortInfo
      Retrieves a list of expressions used for persistent sorting.
      Specified by:
      getExpressions in interface PersistentSortInfo
      Returns:
      a list of expressions
    • setExpressions

      public void setExpressions(List<String> expressions)
      Description copied from interface: PersistentSortInfo
      Sets 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:
      setExpressions in interface PersistentSortInfo
      Parameters:
      expressions - the expressions to set
    • isAscending

      public boolean isAscending()
      Description copied from interface: SortInfo
      Indicates whether the sorting order is ascending.
      Specified by:
      isAscending in interface SortInfo
      Returns:
      true if the sorting order is ascending, false otherwise