net.esper.client.soda
Class OutputLimitClause

java.lang.Object
  extended by net.esper.client.soda.OutputLimitClause
All Implemented Interfaces:
Serializable

public class OutputLimitClause
extends Object
implements Serializable

An output limit clause defines how to limit output of statements and consists of a selector specifiying which events to select to output, a frequency and a unit.

See Also:
Serialized Form

Constructor Summary
OutputLimitClause(OutputLimitSelector selector, double frequency, OutputLimitUnit unit)
          Ctor.
 
Method Summary
static OutputLimitClause create(double frequency, OutputLimitUnit unit)
          Creates an output limit clause.
static OutputLimitClause create(OutputLimitSelector selector, double frequency, OutputLimitUnit unit)
          Creates an output limit clause.
 double getFrequency()
          Returns output frequency.
 OutputLimitSelector getSelector()
          Returns the selector indicating the events to output.
 OutputLimitUnit getUnit()
          Returns the unit the frequency is in.
 void setFrequency(double frequency)
          Sets output frequency.
 void setSelector(OutputLimitSelector selector)
          Sets the selector indicating the events to output.
 void setUnit(OutputLimitUnit unit)
          Sets the unit the frequency is in.
 void toEQL(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

OutputLimitClause

public OutputLimitClause(OutputLimitSelector selector,
                         double frequency,
                         OutputLimitUnit unit)
Ctor.

Parameters:
selector - is the events to select
frequency - a frequency to output at
unit - the unit for the frequency
Method Detail

create

public static OutputLimitClause create(OutputLimitSelector selector,
                                       double frequency,
                                       OutputLimitUnit unit)
Creates an output limit clause.

Parameters:
selector - is the events to select
frequency - a frequency to output at
unit - the unit for the frequency
Returns:
clause

create

public static OutputLimitClause create(double frequency,
                                       OutputLimitUnit unit)
Creates an output limit clause.

Parameters:
frequency - a frequency to output at
unit - the unit for the frequency
Returns:
clause

getSelector

public OutputLimitSelector getSelector()
Returns the selector indicating the events to output.

Returns:
selector

setSelector

public void setSelector(OutputLimitSelector selector)
Sets the selector indicating the events to output.

Parameters:
selector - to set

getFrequency

public double getFrequency()
Returns output frequency.

Returns:
frequency of output

setFrequency

public void setFrequency(double frequency)
Sets output frequency.

Parameters:
frequency - is the frequency of output

getUnit

public OutputLimitUnit getUnit()
Returns the unit the frequency is in.

Returns:
unit for the frequency.

setUnit

public void setUnit(OutputLimitUnit unit)
Sets the unit the frequency is in.

Parameters:
unit - is the unit for the frequency

toEQL

public void toEQL(StringWriter writer)
Renders the clause in textual representation.

Parameters:
writer - to output to