public class RowLimitClause extends Object implements Serializable
Constructor and Description |
---|
RowLimitClause()
Ctor.
|
RowLimitClause(Integer numRows,
Integer optionalOffsetRows,
String numRowsVariable,
String optionalOffsetRowsVariable)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
static RowLimitClause |
create(int numRows)
Creates a row limit clause.
|
static RowLimitClause |
create(int numRows,
int offset)
Creates a row limit clause.
|
static RowLimitClause |
create(String numRowsVariable)
Creates a row limit clause.
|
static RowLimitClause |
create(String numRowsVariable,
String offsetVariable)
Creates a row limit clause.
|
Integer |
getNumRows()
Returns the maximum number of rows, or null if using variable.
|
String |
getNumRowsVariable()
Returns the variable providing maximum number of rows, or null if using constant.
|
Integer |
getOptionalOffsetRows()
Returns the offset, or null if using variable or not using offset.
|
String |
getOptionalOffsetRowsVariable()
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.
|
public RowLimitClause()
public RowLimitClause(Integer numRows, Integer optionalOffsetRows, String numRowsVariable, String optionalOffsetRowsVariable)
numRows
- maximum number of rowsoptionalOffsetRows
- offsetnumRowsVariable
- name of the variable providing the maximum number of rowsoptionalOffsetRowsVariable
- name of the variable providing the offsetpublic static RowLimitClause create(String numRowsVariable)
numRowsVariable
- name of the variable providing the maximum number of rowspublic static RowLimitClause create(String numRowsVariable, String offsetVariable)
numRowsVariable
- name of the variable providing the maximum number of rowsoffsetVariable
- name of the variable providing the offsetpublic static RowLimitClause create(int numRows)
numRows
- maximum number of rowspublic static RowLimitClause create(int numRows, int offset)
numRows
- maximum number of rowsoffset
- offsetpublic Integer getNumRows()
public void setNumRows(Integer numRows)
numRows
- max num rowspublic Integer getOptionalOffsetRows()
public void setOptionalOffsetRows(Integer optionalOffsetRows)
optionalOffsetRows
- offsetpublic String getNumRowsVariable()
public void setNumRowsVariable(String numRowsVariable)
numRowsVariable
- max num rows variablepublic String getOptionalOffsetRowsVariable()
public void setOptionalOffsetRowsVariable(String optionalOffsetRowsVariable)
optionalOffsetRowsVariable
- variable name for offsetpublic void toEPL(StringWriter writer)
writer
- to output to