Class ScriptExpression

java.lang.Object
com.espertech.esper.common.client.soda.ScriptExpression
All Implemented Interfaces:
Serializable

public class ScriptExpression extends Object implements Serializable
Script-expression is external scripting language expression such as JavaScript, Groovy or MVEL, for example.
See Also:
  • 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 name
      parameterNames - parameter list
      expressionText - script text
      optionalReturnType - return type
      optionalDialect - dialect
      optionalEventTypeName - optional event type name
    • ScriptExpression

      public ScriptExpression(String name, List<String> parameterNames, String expressionText, String optionalReturnType, String optionalDialect)
      Ctor.
      Parameters:
      name - script name
      parameterNames - parameter list
      expressionText - script text
      optionalReturnType - return type
      optionalDialect - dialect
  • Method Details

    • getName

      public String getName()
      Returns the script name.
      Returns:
      script name
    • setName

      public void setName(String name)
      Sets the script name.
      Parameters:
      name - script name to set
    • getOptionalReturnType

      public String getOptionalReturnType()
      Returns the return type, if any is specified.
      Returns:
      return type
    • setOptionalReturnType

      public void setOptionalReturnType(String optionalReturnType)
      Sets the return type, if any is specified.
      Parameters:
      optionalReturnType - return type
    • getOptionalDialect

      public String getOptionalDialect()
      Returns a dialect name, or null if none is defined and the configured default applies
      Returns:
      dialect name
    • setOptionalDialect

      public void setOptionalDialect(String optionalDialect)
      Sets a dialect name, or null if none is defined and the configured default applies
      Parameters:
      optionalDialect - dialect name
    • getExpressionText

      public String getExpressionText()
      Returns the script body.
      Returns:
      script body
    • setExpressionText

      public void setExpressionText(String expressionText)
      Sets the script body.
      Parameters:
      expressionText - script body
    • getParameterNames

      public List<String> getParameterNames()
      Returns the lambda expression parameters.
      Returns:
      lambda expression parameters
    • setParameterNames

      public void setParameterNames(List<String> parameterNames)
      Sets the lambda expression parameters.
      Parameters:
      parameterNames - lambda expression parameters
    • getOptionalEventTypeName

      public String getOptionalEventTypeName()
      Returns the optional event type name.
      Returns:
      type name
    • setOptionalEventTypeName

      public void setOptionalEventTypeName(String optionalEventTypeName)
      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 to
      scripts - scripts
      formatter - for newline-whitespace formatting
    • toEPL

      public void toEPL(StringWriter writer)
      Print part.
      Parameters:
      writer - to write to