Class CreateVariableClause

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

public class CreateVariableClause extends Object implements Serializable
Represents a create-variable syntax for creating a new variable.
See Also:
  • Constructor Details

    • CreateVariableClause

      public CreateVariableClause()
      Ctor.
    • CreateVariableClause

      public CreateVariableClause(String variableName)
      Ctor.
      Parameters:
      variableName - variable name
    • CreateVariableClause

      public CreateVariableClause(String variableType, String variableName, Expression optionalAssignment, boolean constant)
      Ctor.
      Parameters:
      variableType - is the variable type name
      variableName - is the name of the variable
      optionalAssignment - is the optional assignment expression supplying the initial value, or null if the initial value is null
      constant - true for constant, false for regular variable
  • Method Details

    • create

      public static CreateVariableClause create(String variableType, String variableName)
      Creates a create-variable syntax for declaring a variable.
      Parameters:
      variableType - is the variable type name
      variableName - is the name of the variable
      Returns:
      create-variable clause
    • create

      public static CreateVariableClause create(String variableType, String variableName, Expression expression)
      Creates a create-variable syntax for declaring a variable.
      Parameters:
      variableType - is the variable type name
      variableName - is the name of the variable
      expression - is the assignment expression supplying the initial value
      Returns:
      create-variable clause
    • getVariableType

      public String getVariableType()
      Returns the variable type name.
      Returns:
      type of the variable
    • setVariableType

      public void setVariableType(String variableType)
      Sets the variable type name.
      Parameters:
      variableType - type of the variable
    • getVariableName

      public String getVariableName()
      Returns the variable name.
      Returns:
      name of the variable
    • setVariableName

      public void setVariableName(String variableName)
      Sets the variable name
      Parameters:
      variableName - name of the variable
    • getOptionalAssignment

      public Expression getOptionalAssignment()
      Returns the optional assignment expression, or null to initialize to a null value
      Returns:
      assignment expression, if present
    • setOptionalAssignment

      public void setOptionalAssignment(Expression optionalAssignment)
      Sets the optional assignment expression, or null to initialize to a null value
      Parameters:
      optionalAssignment - assignment expression, if present
    • isConstant

      public boolean isConstant()
      Returns indicator whether the variable is a constant.
      Returns:
      constant false
    • setConstant

      public void setConstant(boolean constant)
      Sets the indicator whether the variable is a constant.
      Parameters:
      constant - constant false
    • toEPL

      public void toEPL(StringWriter writer)
      Render as EPL.
      Parameters:
      writer - to output to