Interface WindowDefinition<T,U extends Comparable<? super U>>

Type Parameters:
T - the type of Window element
U - the type of field to sort

public interface WindowDefinition<T,U extends Comparable<? super U>>
Represents window definition, which will define the result set to construct the window
Since:
4.0.0
  • Method Details

    • of

      static <T, U extends Comparable<? super U>> WindowDefinition<T,U> of()
      Factory method to create WindowDefinition instance
      Type Parameters:
      T - the type of Queryable element
      U - the type of field to sort
      Returns:
      the WindowDefinition instance
      Since:
      4.0.0
    • of

      static <T, U extends Comparable<? super U>> WindowDefinition<T,U> of(Function<? super T,?> partitionBy)
      Factory method to create WindowDefinition instance
      Type Parameters:
      T - the type of Queryable element
      U - the type of field to sort
      Parameters:
      partitionBy - partition definition
      Returns:
      the WindowDefinition instance
      Since:
      4.0.0
    • of

      static <T, U extends Comparable<? super U>> WindowDefinition<T,U> of(Queryable.Order<? super T,? extends U> orderBy)
      Factory method to create WindowDefinition instance
      Type Parameters:
      T - the type of Queryable element
      U - the type of field to sort
      Parameters:
      orderBy - order definition
      Returns:
      the WindowDefinition instance
      Since:
      4.0.0
    • of

      static <T, U extends Comparable<? super U>> WindowDefinition<T,U> of(List<Queryable.Order<? super T,? extends U>> orderBy)
      Factory method to create WindowDefinition instance
      Type Parameters:
      T - the type of Queryable element
      U - the type of field to sort
      Parameters:
      orderBy - order definition
      Returns:
      the WindowDefinition instance
      Since:
      4.0.0
    • of

      static <T, U extends Comparable<? super U>> WindowDefinition<T,U> of(Function<? super T,?> partitionBy, List<Queryable.Order<? super T,? extends U>> orderBy)
      Factory method to create WindowDefinition instance
      Type Parameters:
      T - the type of Queryable element
      U - the type of field to sort
      Parameters:
      partitionBy - partition definition
      orderBy - order definition
      Returns:
      the WindowDefinition instance
      Since:
      4.0.0
    • of

      static <T, U extends Comparable<? super U>> WindowDefinition<T,U> of(Function<? super T,?> partitionBy, List<Queryable.Order<? super T,? extends U>> orderBy, RowBound rows)
      Factory method to create WindowDefinition instance
      Type Parameters:
      T - the type of Queryable element
      U - the type of field to sort
      Parameters:
      partitionBy - partition definition
      orderBy - order definition
      rows - the window bounds
      Returns:
      the WindowDefinition instance
      Since:
      4.0.0
    • of

      static <T, U extends Comparable<? super U>> WindowDefinition<T,U> of(List<Queryable.Order<? super T,? extends U>> orderBy, RowBound rows)
      Factory method to create WindowDefinition instance
      Type Parameters:
      T - the type of Queryable element
      U - the type of field to sort
      Parameters:
      orderBy - order definition
      rows - the window bounds
      Returns:
      the WindowDefinition instance
      Since:
      4.0.0
    • of

      static <T, U extends Comparable<? super U>> WindowDefinition<T,U> of(Function<? super T,?> partitionBy, List<Queryable.Order<? super T,? extends U>> orderBy, ValueBound<? extends U> range)
      Factory method to create WindowDefinition instance
      Type Parameters:
      T - the type of Queryable element
      U - the type of field to sort
      Parameters:
      partitionBy - partition definition
      orderBy - order definition
      range - the window bounds
      Returns:
      the WindowDefinition instance
      Since:
      4.0.0
    • of

      static <T, U extends Comparable<? super U>> WindowDefinition<T,U> of(List<Queryable.Order<? super T,? extends U>> orderBy, ValueBound<? extends U> range)
      Factory method to create WindowDefinition instance
      Type Parameters:
      T - the type of Queryable element
      U - the type of field to sort
      Parameters:
      orderBy - order definition
      range - the window bounds
      Returns:
      the WindowDefinition instance
      Since:
      4.0.0
    • partitionBy

      default Function<? super T,?> partitionBy()
      Define partition, similar to SQL's partition by of window definition
      Returns:
      partition definition
    • orderBy

      default List<Queryable.Order<? super T,? extends U>> orderBy()
      Define order, similar to SQL's order by of window definition
      Returns:
      order definition
      Since:
      4.0.0
    • rows

      default RowBound rows()
      Define the window bounds by offsets, similar to MySQL's rows between 1 preceding and 1 following of window definition
      Returns:
      rows definition
      Since:
      4.0.0
    • range

      default ValueBound<? extends U> range()
      Define the window bounds by values, similar to MySQL's range between 1.0 preceding and 1.0 following of window definition
      Returns:
      range definition
      Since:
      4.0.0
    • getId

      Object getId()
      Get the id of window definition
      Returns:
      the id of window definition
      Since:
      4.0.0
    • setId

      WindowDefinition<T,U> setId(Object id)
      Set the id of window definition
      Parameters:
      id - the id of window definition
      Returns:
      self, i.e. current WindowDefinition instance
      Since:
      4.0.0