Class ScriptExpression
java.lang.Object
com.espertech.esper.common.client.soda.ScriptExpression
- All Implemented Interfaces:
Serializable
Script-expression is external scripting language expression such as JavaScript, Groovy or MVEL, for example.
- See Also:
-
Constructor Summary
ConstructorDescriptionCtor.ScriptExpression
(String name, List<String> parameterNames, String expressionText, String optionalReturnType, String optionalDialect) Ctor.ScriptExpression
(String name, List<String> parameterNames, String expressionText, String optionalReturnType, String optionalDialect, String optionalEventTypeName) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the script body.getName()
Returns the script name.Returns a dialect name, or null if none is defined and the configured default appliesReturns the optional event type name.Returns the return type, if any is specified.Returns the lambda expression parameters.void
setExpressionText
(String expressionText) Sets the script body.void
Sets the script name.void
setOptionalDialect
(String optionalDialect) Sets a dialect name, or null if none is defined and the configured default appliesvoid
setOptionalEventTypeName
(String optionalEventTypeName) Sets the optional event type name.void
setOptionalReturnType
(String optionalReturnType) Sets the return type, if any is specified.void
setParameterNames
(List<String> parameterNames) Sets the lambda expression parameters.void
toEPL
(StringWriter writer) Print part.static void
toEPL
(StringWriter writer, List<ScriptExpression> scripts, EPStatementFormatter formatter) Print.
-
Constructor Details
-
ScriptExpression
public ScriptExpression()Ctor. -
ScriptExpression
public ScriptExpression(String name, List<String> parameterNames, String expressionText, String optionalReturnType, String optionalDialect, String optionalEventTypeName) Ctor.- Parameters:
name
- script nameparameterNames
- parameter listexpressionText
- script textoptionalReturnType
- return typeoptionalDialect
- dialectoptionalEventTypeName
- optional event type name
-
ScriptExpression
public ScriptExpression(String name, List<String> parameterNames, String expressionText, String optionalReturnType, String optionalDialect) Ctor.- Parameters:
name
- script nameparameterNames
- parameter listexpressionText
- script textoptionalReturnType
- return typeoptionalDialect
- dialect
-
-
Method Details
-
getName
Returns the script name.- Returns:
- script name
-
setName
Sets the script name.- Parameters:
name
- script name to set
-
getOptionalReturnType
Returns the return type, if any is specified.- Returns:
- return type
-
setOptionalReturnType
Sets the return type, if any is specified.- Parameters:
optionalReturnType
- return type
-
getOptionalDialect
Returns a dialect name, or null if none is defined and the configured default applies- Returns:
- dialect name
-
setOptionalDialect
Sets a dialect name, or null if none is defined and the configured default applies- Parameters:
optionalDialect
- dialect name
-
getExpressionText
Returns the script body.- Returns:
- script body
-
setExpressionText
Sets the script body.- Parameters:
expressionText
- script body
-
getParameterNames
Returns the lambda expression parameters.- Returns:
- lambda expression parameters
-
setParameterNames
Sets the lambda expression parameters.- Parameters:
parameterNames
- lambda expression parameters
-
getOptionalEventTypeName
Returns the optional event type name.- Returns:
- type name
-
setOptionalEventTypeName
Sets the optional event type name.- Parameters:
optionalEventTypeName
- name
-
toEPL
public static void toEPL(StringWriter writer, List<ScriptExpression> scripts, EPStatementFormatter formatter) Print.- Parameters:
writer
- to print toscripts
- scriptsformatter
- for newline-whitespace formatting
-
toEPL
Print part.- Parameters:
writer
- to write to
-