Module storm
Package st.orm.spi

Interface Orderable<T extends Orderable<T>>

Type Parameters:
T - the type of the orderable class.
All Known Subinterfaces:
EntityRepositoryProvider, ORMConverterProvider, ORMReflectionProvider, ProjectionRepositoryProvider, Provider, QueryBuilderProvider, SqlDialectProvider
All Known Implementing Classes:
DefaultEntityRepositoryProviderImpl, DefaultORMReflectionProviderImpl, DefaultProjectionRepositoryProviderImpl, DefaultQueryBuilderProviderImpl, DefaultSqlDialectProviderImpl

public interface Orderable<T extends Orderable<T>>
Interface for classes that can be ordered.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static @interface 
    Ordering constraint that indicates that the current class should come after the specified classes.
    static @interface 
    Ordering constraint that indicates that the current class should come after any other class.
    static @interface 
    Ordering constraint that indicates that the current class should come before the specified classes.
    static @interface 
    Ordering constraint that indicates that the current class should come before any other class.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static <T extends Orderable<?>>
    List<T>
    sort(List<T> orderables)
    Sorts the provided Orderable instances based on the ordering constraints defined by the orderable constraints.
    static <T extends Orderable<?>>
    List<T>
    sort(List<T> orderables, boolean cache)
    Sorts the provided Orderable instances based on the ordering constraints defined by the orderable constraints.
    static <T extends Orderable<?>>
    Stream<T>
    sort(Stream<T> orderableStream)
    Sorts the provided Orderable instances based on the ordering constraints defined by the orderable constraints.
    static <T extends Orderable<?>>
    Stream<T>
    sort(Stream<T> orderableStream, boolean cache)
    Sorts the provided Orderable instances based on the ordering constraints defined by the orderable constraints.
  • Method Details

    • sort

      static <T extends Orderable<?>> List<T> sort(@Nonnull List<T> orderables)
      Sorts the provided Orderable instances based on the ordering constraints defined by the orderable constraints.
      Type Parameters:
      T - the type parameter for the Orderable instances.
      Parameters:
      orderables - the orderable instances to sort.
      Returns:
      the sorted orderable instances.
    • sort

      static <T extends Orderable<?>> List<T> sort(@Nonnull List<T> orderables, boolean cache)
      Sorts the provided Orderable instances based on the ordering constraints defined by the orderable constraints.
      Type Parameters:
      T - the type parameter for the Orderable instances.
      Parameters:
      orderables - the orderable instances to sort.
      cache - use caching for improved performance.
      Returns:
      the sorted orderable instances.
    • sort

      static <T extends Orderable<?>> Stream<T> sort(@Nonnull Stream<T> orderableStream)
      Sorts the provided Orderable instances based on the ordering constraints defined by the orderable constraints.
      Type Parameters:
      T - the type parameter for the Orderable instances.
      Parameters:
      orderableStream - the orderable instances to sort.
      Returns:
      the sorted orderable instances.
    • sort

      static <T extends Orderable<?>> Stream<T> sort(@Nonnull Stream<T> orderableStream, boolean cache)
      Sorts the provided Orderable instances based on the ordering constraints defined by the orderable constraints.
      Type Parameters:
      T - the type parameter for the Orderable instances.
      Parameters:
      orderableStream - the orderable instances to sort.
      cache - use caching for improved performance.
      Returns:
      the sorted orderable instances.