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