net.esper.client.soda
Class InsertIntoClause

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

public class InsertIntoClause
extends Object
implements Serializable

An insert-into clause consists of a stream name and column names and an optional stream selector.

See Also:
Serialized Form

Constructor Summary
InsertIntoClause(String streamName)
          Ctor.
InsertIntoClause(String streamName, List<String> columnNames, boolean isIStream)
          Ctor.
InsertIntoClause(String streamName, String[] columnNames)
          Ctor.
 
Method Summary
 void add(String columnName)
          Add a column name to the insert-into clause.
static InsertIntoClause create(String streamName)
          Creates the insert-into clause.
static InsertIntoClause create(String streamName, String... columns)
          Creates the insert-into clause.
static InsertIntoClause create(String streamName, String[] columns, StreamSelector streamSelector)
          Creates the insert-into clause.
 List<String> getColumnNames()
          Returns a list of column names specified optionally in the insert-into clause, or empty if none specified.
 String getStreamName()
          Returns name of stream name to use for insert-into stream.
 boolean isIStream()
          Returns true if insert (new data) events are fed, or false for remove (old data) events are fed.
 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

InsertIntoClause

public InsertIntoClause(String streamName)
Ctor.

Parameters:
streamName - is the stream name to insert into

InsertIntoClause

public InsertIntoClause(String streamName,
                        String[] columnNames)
Ctor.

Parameters:
streamName - is the stream name to insert into
columnNames - column names

InsertIntoClause

public InsertIntoClause(String streamName,
                        List<String> columnNames,
                        boolean isIStream)
Ctor.

Parameters:
streamName - is the stream name to insert into
columnNames - column names
isIStream - is true for selecting the insert stream (default)
Method Detail

create

public static InsertIntoClause create(String streamName)
Creates the insert-into clause.

Parameters:
streamName - the name of the stream to insert into
Returns:
clause

create

public static InsertIntoClause create(String streamName,
                                      String... columns)
Creates the insert-into clause.

Parameters:
streamName - the name of the stream to insert into
columns - is a list of column names
Returns:
clause

create

public static InsertIntoClause create(String streamName,
                                      String[] columns,
                                      StreamSelector streamSelector)
Creates the insert-into clause.

Parameters:
streamName - the name of the stream to insert into
columns - is a list of column names
streamSelector - selects the stream
Returns:
clause

isIStream

public boolean isIStream()
Returns true if insert (new data) events are fed, or false for remove (old data) events are fed.

Returns:
true for insert stream, false for remove stream

getStreamName

public String getStreamName()
Returns name of stream name to use for insert-into stream.

Returns:
stream name

getColumnNames

public List<String> getColumnNames()
Returns a list of column names specified optionally in the insert-into clause, or empty if none specified.

Returns:
column names or empty list if none supplied

add

public void add(String columnName)
Add a column name to the insert-into clause.

Parameters:
columnName - to add

toEQL

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

Parameters:
writer - to output to

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com