Class RowLimitClause
java.lang.Object
com.espertech.esper.common.client.soda.RowLimitClause
- All Implemented Interfaces:
Serializable
Specification object for a row limit.
- See Also:
-
Constructor Summary
ConstructorDescriptionCtor.RowLimitClause
(Integer numRows, Integer optionalOffsetRows, String numRowsVariable, String optionalOffsetRowsVariable) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionstatic RowLimitClause
create
(int numRows) Creates a row limit clause.static RowLimitClause
create
(int numRows, int offset) Creates a row limit clause.static RowLimitClause
Creates a row limit clause.static RowLimitClause
Creates a row limit clause.Returns the maximum number of rows, or null if using variable.Returns the variable providing maximum number of rows, or null if using constant.Returns the offset, or null if using variable or not using offset.Returns the name of the variable providing offset values.void
setNumRows
(Integer numRows) Sets the maximum number of rows.void
setNumRowsVariable
(String numRowsVariable) Sets the variable providing maximum number of rows.void
setOptionalOffsetRows
(Integer optionalOffsetRows) Sets the offset.void
setOptionalOffsetRowsVariable
(String optionalOffsetRowsVariable) Sets the name of the variable providing offset values.void
toEPL
(StringWriter writer) Renders the clause in textual representation.
-
Constructor Details
-
RowLimitClause
public RowLimitClause()Ctor. -
RowLimitClause
public RowLimitClause(Integer numRows, Integer optionalOffsetRows, String numRowsVariable, String optionalOffsetRowsVariable) Ctor.- Parameters:
numRows
- maximum number of rowsoptionalOffsetRows
- offsetnumRowsVariable
- name of the variable providing the maximum number of rowsoptionalOffsetRowsVariable
- name of the variable providing the offset
-
-
Method Details
-
create
Creates a row limit clause.- Parameters:
numRowsVariable
- name of the variable providing the maximum number of rows- Returns:
- clause
-
create
Creates a row limit clause.- Parameters:
numRowsVariable
- name of the variable providing the maximum number of rowsoffsetVariable
- name of the variable providing the offset- Returns:
- clause
-
create
Creates a row limit clause.- Parameters:
numRows
- maximum number of rows- Returns:
- clause
-
create
Creates a row limit clause.- Parameters:
numRows
- maximum number of rowsoffset
- offset- Returns:
- clause
-
getNumRows
Returns the maximum number of rows, or null if using variable.- Returns:
- max num rows
-
setNumRows
Sets the maximum number of rows.- Parameters:
numRows
- max num rows
-
getOptionalOffsetRows
Returns the offset, or null if using variable or not using offset.- Returns:
- offset
-
setOptionalOffsetRows
Sets the offset.- Parameters:
optionalOffsetRows
- offset
-
getNumRowsVariable
Returns the variable providing maximum number of rows, or null if using constant.- Returns:
- max num rows variable
-
setNumRowsVariable
Sets the variable providing maximum number of rows.- Parameters:
numRowsVariable
- max num rows variable
-
getOptionalOffsetRowsVariable
Returns the name of the variable providing offset values.- Returns:
- variable name for offset
-
setOptionalOffsetRowsVariable
Sets the name of the variable providing offset values.- Parameters:
optionalOffsetRowsVariable
- variable name for offset
-
toEPL
Renders the clause in textual representation.- Parameters:
writer
- to output to
-