com.espertech.esper.client.soda
Class RowLimitClause

java.lang.Object
  extended by com.espertech.esper.client.soda.RowLimitClause
All Implemented Interfaces:
java.io.Serializable

public class RowLimitClause
extends java.lang.Object
implements java.io.Serializable

Specification object for a row limit.

See Also:
Serialized Form

Constructor Summary
RowLimitClause()
          Ctor.
RowLimitClause(java.lang.Integer numRows, java.lang.Integer optionalOffsetRows, java.lang.String numRowsVariable, java.lang.String optionalOffsetRowsVariable)
          Ctor.
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowLimitClause

public RowLimitClause()
Ctor.


RowLimitClause

public RowLimitClause(java.lang.Integer numRows,
                      java.lang.Integer optionalOffsetRows,
                      java.lang.String numRowsVariable,
                      java.lang.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 Detail

create

public static RowLimitClause create(java.lang.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(java.lang.String numRowsVariable,
                                    java.lang.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 java.lang.Integer getNumRows()
Returns the maximum number of rows, or null if using variable.

Returns:
max num rows

setNumRows

public void setNumRows(java.lang.Integer numRows)
Sets the maximum number of rows.

Parameters:
numRows - max num rows

getOptionalOffsetRows

public java.lang.Integer getOptionalOffsetRows()
Returns the offset, or null if using variable or not using offset.

Returns:
offset

setOptionalOffsetRows

public void setOptionalOffsetRows(java.lang.Integer optionalOffsetRows)
Sets the offset.

Parameters:
optionalOffsetRows - offset

getNumRowsVariable

public java.lang.String getNumRowsVariable()
Returns the variable providing maximum number of rows, or null if using constant.

Returns:
max num rows variable

setNumRowsVariable

public void setNumRowsVariable(java.lang.String numRowsVariable)
Sets the variable providing maximum number of rows.

Parameters:
numRowsVariable - max num rows variable

getOptionalOffsetRowsVariable

public java.lang.String getOptionalOffsetRowsVariable()
Returns the name of the variable providing offset values.

Returns:
variable name for offset

setOptionalOffsetRowsVariable

public void setOptionalOffsetRowsVariable(java.lang.String optionalOffsetRowsVariable)
Sets the name of the variable providing offset values.

Parameters:
optionalOffsetRowsVariable - variable name for offset

toEPL

public void toEPL(java.io.StringWriter writer)
Renders the clause in textual representation.

Parameters:
writer - to output to

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com