Class PostProcessingUtils

java.lang.Object
org.springframework.data.aerospike.core.PostProcessingUtils

public final class PostProcessingUtils extends Object
A utility class providing methods for post-processing queries results.
  • Method Details

    • applyPostProcessingOnResults

      public static <T> Stream<T> applyPostProcessingOnResults(Stream<T> results, @Nullable Query query)
      Applies post-processing operations (sorting, offset, limit) to a given Stream based on the provided Query object. If the query specifies sorting, the stream is sorted using a comparator derived from the query. If an offset is present, elements are skipped. If a limit (rows) is present, the stream is truncated.
      Type Parameters:
      T - The type of elements in the stream
      Parameters:
      results - The input Stream of results
      query - The Query object specifying criteria. Can be null
      Returns:
      A new Stream with post-processing operations applied