com.espertech.esper.client.soda
Class InsertIntoClause

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

public class InsertIntoClause
extends java.lang.Object
implements java.io.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()
          Ctor.
InsertIntoClause(java.lang.String streamName)
          Ctor.
InsertIntoClause(java.lang.String streamName, java.util.List<java.lang.String> columnNames, StreamSelector streamSelector)
          Ctor.
InsertIntoClause(java.lang.String streamName, java.lang.String[] columnNames)
          Ctor.
 
Method Summary
 void add(java.lang.String columnName)
          Add a column name to the insert-into clause.
static InsertIntoClause create(java.lang.String streamName)
          Creates the insert-into clause.
static InsertIntoClause create(java.lang.String streamName, java.lang.String... columns)
          Creates the insert-into clause.
static InsertIntoClause create(java.lang.String streamName, java.lang.String[] columns, StreamSelector streamSelector)
          Creates the insert-into clause.
 java.util.List<java.lang.String> getColumnNames()
          Returns a list of column names specified optionally in the insert-into clause, or empty if none specified.
 java.lang.String getStreamName()
          Returns name of stream name to use for insert-into stream.
 StreamSelector getStreamSelector()
          Returns the stream selector for the insert into.
 void setColumnNames(java.util.List<java.lang.String> columnNames)
          Set column names.
 void setStreamName(java.lang.String streamName)
          Set stream name.
 void setStreamSelector(StreamSelector streamSelector)
          Sets the stream selector for the insert into.
 void toEPL(java.io.StringWriter writer, EPStatementFormatter formatter, boolean isTopLevel)
          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()
Ctor.


InsertIntoClause

public InsertIntoClause(java.lang.String streamName)
Ctor.

Parameters:
streamName - is the stream name to insert into

InsertIntoClause

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

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

InsertIntoClause

public InsertIntoClause(java.lang.String streamName,
                        java.util.List<java.lang.String> columnNames,
                        StreamSelector streamSelector)
Ctor.

Parameters:
streamName - is the stream name to insert into
columnNames - column names
streamSelector - selector for either insert stream (the default) or remove stream or both
Method Detail

create

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

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

create

public static InsertIntoClause create(java.lang.String streamName,
                                      java.lang.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(java.lang.String streamName,
                                      java.lang.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

getStreamSelector

public StreamSelector getStreamSelector()
Returns the stream selector for the insert into.

Returns:
stream selector

setStreamSelector

public void setStreamSelector(StreamSelector streamSelector)
Sets the stream selector for the insert into.

Parameters:
streamSelector - stream selector

getStreamName

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

Returns:
stream name

getColumnNames

public java.util.List<java.lang.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

setStreamName

public void setStreamName(java.lang.String streamName)
Set stream name.

Parameters:
streamName - name

add

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

Parameters:
columnName - to add

setColumnNames

public void setColumnNames(java.util.List<java.lang.String> columnNames)
Set column names.

Parameters:
columnNames - names

toEPL

public void toEPL(java.io.StringWriter writer,
                  EPStatementFormatter formatter,
                  boolean isTopLevel)
Renders the clause in textual representation.

Parameters:
writer - to output to
formatter - for newline-whitespace formatting
isTopLevel - to indicate if this insert-into-clause is inside other clauses.

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