Class RowLimitClause

java.lang.Object
com.espertech.esper.common.client.soda.RowLimitClause
All Implemented Interfaces:
Serializable

public class RowLimitClause extends Object implements Serializable
Specification object for a row limit.
See Also:
  • Constructor Details

    • RowLimitClause

      public RowLimitClause()
      Ctor.
    • RowLimitClause

      public RowLimitClause(Integer numRows, Integer optionalOffsetRows, String numRowsVariable, String optionalOffsetRowsVariable)
      Ctor.
      Parameters:
      numRows - maximum number of rows
      optionalOffsetRows - offset
      numRowsVariable - name of the variable providing the maximum number of rows
      optionalOffsetRowsVariable - name of the variable providing the offset
  • Method Details

    • create

      public static RowLimitClause create(String numRowsVariable)
      Creates a row limit clause.
      Parameters:
      numRowsVariable - name of the variable providing the maximum number of rows
      Returns:
      clause
    • create

      public static RowLimitClause create(String numRowsVariable, String offsetVariable)
      Creates a row limit clause.
      Parameters:
      numRowsVariable - name of the variable providing the maximum number of rows
      offsetVariable - name of the variable providing the offset
      Returns:
      clause
    • create

      public static RowLimitClause create(int numRows)
      Creates a row limit clause.
      Parameters:
      numRows - maximum number of rows
      Returns:
      clause
    • create

      public static RowLimitClause create(int numRows, int offset)
      Creates a row limit clause.
      Parameters:
      numRows - maximum number of rows
      offset - offset
      Returns:
      clause
    • getNumRows

      public Integer getNumRows()
      Returns the maximum number of rows, or null if using variable.
      Returns:
      max num rows
    • setNumRows

      public void setNumRows(Integer numRows)
      Sets the maximum number of rows.
      Parameters:
      numRows - max num rows
    • getOptionalOffsetRows

      public Integer getOptionalOffsetRows()
      Returns the offset, or null if using variable or not using offset.
      Returns:
      offset
    • setOptionalOffsetRows

      public void setOptionalOffsetRows(Integer optionalOffsetRows)
      Sets the offset.
      Parameters:
      optionalOffsetRows - offset
    • getNumRowsVariable

      public String getNumRowsVariable()
      Returns the variable providing maximum number of rows, or null if using constant.
      Returns:
      max num rows variable
    • setNumRowsVariable

      public void setNumRowsVariable(String numRowsVariable)
      Sets the variable providing maximum number of rows.
      Parameters:
      numRowsVariable - max num rows variable
    • getOptionalOffsetRowsVariable

      public String getOptionalOffsetRowsVariable()
      Returns the name of the variable providing offset values.
      Returns:
      variable name for offset
    • setOptionalOffsetRowsVariable

      public void setOptionalOffsetRowsVariable(String optionalOffsetRowsVariable)
      Sets the name of the variable providing offset values.
      Parameters:
      optionalOffsetRowsVariable - variable name for offset
    • toEPL

      public void toEPL(StringWriter writer)
      Renders the clause in textual representation.
      Parameters:
      writer - to output to