public class InsertIntoClause extends Object implements Serializable
Constructor and Description |
---|
InsertIntoClause()
Ctor.
|
InsertIntoClause(String streamName)
Ctor.
|
InsertIntoClause(String streamName,
List<String> columnNames,
StreamSelector streamSelector)
Ctor.
|
InsertIntoClause(String streamName,
String[] columnNames)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
StreamSelector |
getStreamSelector()
Returns the stream selector for the insert into.
|
void |
setColumnNames(List<String> columnNames)
Set column names.
|
void |
setStreamName(String streamName)
Set stream name.
|
void |
setStreamSelector(StreamSelector streamSelector)
Sets the stream selector for the insert into.
|
void |
toEPL(StringWriter writer,
EPStatementFormatter formatter,
boolean isTopLevel)
Renders the clause in textual representation.
|
public InsertIntoClause()
public InsertIntoClause(String streamName)
streamName
- is the stream name to insert intopublic InsertIntoClause(String streamName, String[] columnNames)
streamName
- is the stream name to insert intocolumnNames
- column namespublic InsertIntoClause(String streamName, List<String> columnNames, StreamSelector streamSelector)
streamName
- is the stream name to insert intocolumnNames
- column namesstreamSelector
- selector for either insert stream (the default) or remove stream or bothpublic static InsertIntoClause create(String streamName)
streamName
- the name of the stream to insert intopublic static InsertIntoClause create(String streamName, String... columns)
streamName
- the name of the stream to insert intocolumns
- is a list of column namespublic static InsertIntoClause create(String streamName, String[] columns, StreamSelector streamSelector)
streamName
- the name of the stream to insert intocolumns
- is a list of column namesstreamSelector
- selects the streampublic StreamSelector getStreamSelector()
public void setStreamSelector(StreamSelector streamSelector)
streamSelector
- stream selectorpublic String getStreamName()
public List<String> getColumnNames()
public void setStreamName(String streamName)
streamName
- namepublic void add(String columnName)
columnName
- to addpublic void setColumnNames(List<String> columnNames)
columnNames
- namespublic void toEPL(StringWriter writer, EPStatementFormatter formatter, boolean isTopLevel)
writer
- to output toformatter
- for newline-whitespace formattingisTopLevel
- to indicate if this insert-into-clause is inside other clauses.