Class OnMergeClause
java.lang.Object
com.espertech.esper.common.client.soda.OnClause
com.espertech.esper.common.client.soda.OnMergeClause
- All Implemented Interfaces:
Serializable
A clause to insert, update or delete to/from a named window based on a triggering event arriving and correlated to the named window events to be updated.
- See Also:
-
Constructor Summary
ConstructorDescriptionCtor.OnMergeClause
(String windowName, String optionalAsName, List<OnMergeMatchItem> matchItems) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionaddAction
(OnMergeMatchItem action) Add a new action to the list of actions.static OnMergeClause
create
(String windowName, String optionalAsName, List<OnMergeMatchItem> matchItems) Creates an on-update clause.Reutrns an optional insert to executed without a match-clause.Returns all actions.Returns the as-provided name for the named window.Returns the name of the named window to update.void
setInsertNoMatch
(OnMergeMatchedInsertAction insertNoMatch) Sets an optional insert to executed without a match-clause.void
setMatchItems
(List<OnMergeMatchItem> matchItems) Sets all actions.void
setOptionalAsName
(String optionalAsName) Sets the as-provided for the named window.void
setWindowName
(String windowName) Sets the name of the named window.void
toEPL
(StringWriter writer, Expression optionalWhereClause, EPStatementFormatter formatter) Renders the clause in textual representation.Methods inherited from class com.espertech.esper.common.client.soda.OnClause
createOnDelete, createOnInsertSplitStream, createOnSelect, createOnSet, createOnUpdate
-
Constructor Details
-
OnMergeClause
public OnMergeClause()Ctor. -
OnMergeClause
Ctor.- Parameters:
windowName
- is the named window nameoptionalAsName
- is the as-provided name of the named windowmatchItems
- is the matched and non-matched action items
-
-
Method Details
-
create
public static OnMergeClause create(String windowName, String optionalAsName, List<OnMergeMatchItem> matchItems) Creates an on-update clause.- Parameters:
windowName
- is the named window nameoptionalAsName
- is the optional as-provided namematchItems
- is the matched and non-matched action items- Returns:
- on-update clause without assignments
-
toEPL
public void toEPL(StringWriter writer, Expression optionalWhereClause, EPStatementFormatter formatter) Renders the clause in textual representation.- Parameters:
writer
- to output tooptionalWhereClause
- where clause if present, or nullformatter
- for newline-whitespace formatting
-
getWindowName
Returns the name of the named window to update.- Returns:
- named window name
-
setWindowName
Sets the name of the named window.- Parameters:
windowName
- window name
-
getOptionalAsName
Returns the as-provided name for the named window.- Returns:
- name or null
-
setOptionalAsName
Sets the as-provided for the named window.- Parameters:
optionalAsName
- name to set for window
-
addAction
Add a new action to the list of actions.- Parameters:
action
- to add- Returns:
- clause
-
getMatchItems
Returns all actions.- Returns:
- actions
-
setMatchItems
Sets all actions.- Parameters:
matchItems
- to set
-
setInsertNoMatch
Sets an optional insert to executed without a match-clause. If set indicates there is no match-clause.- Parameters:
insertNoMatch
- insert
-
getInsertNoMatch
Reutrns an optional insert to executed without a match-clause. If set indicates there is no match-clause.- Returns:
- insert
-