Interface BlazeWindow


public interface BlazeWindow
Defines a window to use for a window function.
Since:
1.6.4
Author:
Christian Beikov
  • Method Details

    • orderBy

      BlazeWindow orderBy(Order... orderByItems)
      Sets the order by items for this window.
      Parameters:
      orderByItems - order by items
      Returns:
      this for method chaining
    • orderBy

      BlazeWindow orderBy(List<Order> orderByItems)
      Sets the order by items for this window.
      Parameters:
      orderByItems - order by items
      Returns:
      this for method chaining
    • getOrderList

      List<BlazeOrder> getOrderList()
      Returns the order by items.
      Returns:
      the order by items
    • partitionBy

      BlazeWindow partitionBy(Expression<?>... expressions)
      Sets the partition by items for this window.
      Parameters:
      expressions - The partition by expressions
      Returns:
      this for method chaining
    • partitionBy

      BlazeWindow partitionBy(List<Expression<?>> expressions)
      Sets the partition by items for this window.
      Parameters:
      expressions - The partition by expressions
      Returns:
      this for method chaining
    • getPartitionList

      List<BlazeExpression<?>> getPartitionList()
      Returns the partition by items.
      Returns:
      the partition by items
    • rows

      Sets the window frame to the ROWS mode with the given start and CURRENT ROW as end type.
      Parameters:
      start - The frame start type
      Returns:
      this for method chaining
    • rows

      Sets the window frame to the ROWS mode with the given start and CURRENT ROW as end type.
      Parameters:
      start - The amount of rows preceding or following to use for the start of the frame
      startKind - Whether the frame start should be preceding or following the current row
      Returns:
      this for method chaining
    • rowsBetween

      Sets the window frame to the ROWS mode with the given start and end.
      Parameters:
      start - The frame start type
      end - The frame end type
      Returns:
      this for method chaining
    • rowsBetween

      Sets the window frame to the ROWS mode with the given start and end.
      Parameters:
      start - The frame start type
      end - The amount of rows preceding or following to use for the end of the frame
      endKind - Whether the frame end should be preceding or following the current row
      Returns:
      this for method chaining
    • rowsBetween

      Sets the window frame to the ROWS mode with the given start and end.
      Parameters:
      start - The amount of rows preceding or following to use for the start of the frame
      startKind - Whether the frame start should be preceding or following the current row
      end - The frame end type
      Returns:
      this for method chaining
    • rowsBetween

      BlazeWindow rowsBetween(Expression<Integer> start, BlazeWindowFrameKind startKind, Expression<Integer> end, BlazeWindowFrameKind endKind)
      Sets the window frame to the ROWS mode with the given start and end.
      Parameters:
      start - The amount of rows preceding or following to use for the start of the frame
      startKind - Whether the frame start should be preceding or following the current row
      end - The amount of rows preceding or following to use for the end of the frame
      endKind - Whether the frame end should be preceding or following the current row
      Returns:
      this for method chaining
    • range

      Sets the window frame to the RANGE mode with the given start and CURRENT ROW as end type.
      Parameters:
      start - The frame start type
      Returns:
      this for method chaining
    • range

      BlazeWindow range(Expression<?> start, BlazeWindowFrameKind startKind)
      Sets the window frame to the RANGE mode with the given start and CURRENT ROW as end type.
      Parameters:
      start - The maximum difference of the value of the current row and the rows preceding or following to use for the start of the frame
      startKind - Whether the frame start should be preceding or following the current row
      Returns:
      this for method chaining
    • rangeBetween

      Sets the window frame to the RANGE mode with the given start and end.
      Parameters:
      start - The frame start type
      end - The frame end type
      Returns:
      this for method chaining
    • rangeBetween

      BlazeWindow rangeBetween(BlazeWindowFrameStartType start, Expression<?> end, BlazeWindowFrameKind endKind)
      Sets the window frame to the RANGE mode with the given start and end.
      Parameters:
      start - The frame start type
      end - The maximum difference of the value of the current row and the rows preceding or following to use for the end of the frame
      endKind - Whether the frame end should be preceding or following the current row
      Returns:
      this for method chaining
    • rangeBetween

      BlazeWindow rangeBetween(Expression<?> start, BlazeWindowFrameKind startKind, BlazeWindowFrameEndType end)
      Sets the window frame to the RANGE mode with the given start and end.
      Parameters:
      start - The maximum difference of the value of the current row and the rows preceding or following to use for the start of the frame
      startKind - Whether the frame start should be preceding or following the current row
      end - The frame end type
      Returns:
      this for method chaining
    • rangeBetween

      BlazeWindow rangeBetween(Expression<?> start, BlazeWindowFrameKind startKind, Expression<?> end, BlazeWindowFrameKind endKind)
      Sets the window frame to the RANGE mode with the given start and end.
      Parameters:
      start - The maximum difference of the value of the current row and the rows preceding or following to use for the start of the frame
      startKind - Whether the frame start should be preceding or following the current row
      end - The maximum difference of the value of the current row and the rows preceding or following to use for the end of the frame
      endKind - Whether the frame end should be preceding or following the current row
      Returns:
      this for method chaining
    • groups

      Sets the window frame to the GROUPS mode with the given start and CURRENT ROW as end type.
      Parameters:
      start - The frame start type
      Returns:
      this for method chaining
    • groups

      BlazeWindow groups(Expression<Integer> start, BlazeWindowFrameKind startKind)
      Sets the window frame to the GROUPS mode with the given start and CURRENT ROW as end type.
      Parameters:
      start - The amount of groups preceding or following to use for the start of the frame
      startKind - Whether the frame start should be preceding or following the current rows group
      Returns:
      this for method chaining
    • groupsBetween

      Sets the window frame to the GROUPS mode with the given start and end.
      Parameters:
      start - The frame start type
      end - The frame end type
      Returns:
      this for method chaining
    • groupsBetween

      Sets the window frame to the GROUPS mode with the given start and end.
      Parameters:
      start - The frame start type
      end - The amount of groups preceding or following to use for the end of the frame
      endKind - Whether the frame end should be preceding or following the current rows group
      Returns:
      this for method chaining
    • groupsBetween

      Sets the window frame to the GROUPS mode with the given start and end.
      Parameters:
      start - The amount of groups preceding or following to use for the start of the frame
      startKind - Whether the frame start should be preceding or following the current rows group
      end - The frame end type
      Returns:
      this for method chaining
    • groupsBetween

      BlazeWindow groupsBetween(Expression<Integer> start, BlazeWindowFrameKind startKind, Expression<Integer> end, BlazeWindowFrameKind endKind)
      Sets the window frame to the GROUPS mode with the given start and end.
      Parameters:
      start - The amount of groups preceding or following to use for the start of the frame
      startKind - Whether the frame start should be preceding or following the current rows group
      end - The amount of groups preceding or following to use for the end of the frame
      endKind - Whether the frame end should be preceding or following the current rows group
      Returns:
      this for method chaining
    • getFrameMode

      BlazeWindowFrameMode getFrameMode()
      Returns the frame mode used for this window.
      Returns:
      the frame mode
    • getFrameStart

      BlazeExpression<?> getFrameStart()
      Returns the frame start expression used for this window, or null if it uses a special frame start type.
      Returns:
      the frame start expression, or null
    • getFrameStartKind

      BlazeWindowFrameKind getFrameStartKind()
      Returns the frame start kind used for this window, or null if it uses a special frame start type.
      Returns:
      the frame start kind, or null
    • getFrameStartType

      BlazeWindowFrameStartType getFrameStartType()
      Returns the frame start type used for this window.
      Returns:
      the frame start type
    • getFrameEnd

      BlazeExpression<?> getFrameEnd()
      Returns the frame end expression used for this window, or null if it uses a special frame end type.
      Returns:
      the frame end expression, or null
    • getFrameEndKind

      BlazeWindowFrameKind getFrameEndKind()
      Returns the frame end kind used for this window, or null if it uses a special frame end type.
      Returns:
      the frame end kind, or null
    • getFrameEndType

      BlazeWindowFrameEndType getFrameEndType()
      Returns the frame end type used for this window.
      Returns:
      the frame end type
    • exclude

      Sets the window frame exclusion for this window.
      Parameters:
      exclusion - The frame exclusion
      Returns:
      this for method chaining
    • getFrameExclusion

      BlazeWindowFrameExclusion getFrameExclusion()
      Returns the frame exclusion for this window.
      Returns:
      the frame exclusion