Class CreateVariableClause
java.lang.Object
com.espertech.esper.common.client.soda.CreateVariableClause
- All Implemented Interfaces:
Serializable
Represents a create-variable syntax for creating a new variable.
- See Also:
-
Constructor Summary
ConstructorDescriptionCtor.CreateVariableClause
(String variableName) Ctor.CreateVariableClause
(String variableType, String variableName, Expression optionalAssignment, boolean constant) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionstatic CreateVariableClause
Creates a create-variable syntax for declaring a variable.static CreateVariableClause
create
(String variableType, String variableName, Expression expression) Creates a create-variable syntax for declaring a variable.Returns the optional assignment expression, or null to initialize to a null valueReturns the variable name.Returns the variable type name.boolean
Returns indicator whether the variable is a constant.void
setConstant
(boolean constant) Sets the indicator whether the variable is a constant.void
setOptionalAssignment
(Expression optionalAssignment) Sets the optional assignment expression, or null to initialize to a null valuevoid
setVariableName
(String variableName) Sets the variable namevoid
setVariableType
(String variableType) Sets the variable type name.void
toEPL
(StringWriter writer) Render as EPL.
-
Constructor Details
-
CreateVariableClause
public CreateVariableClause()Ctor. -
CreateVariableClause
Ctor.- Parameters:
variableName
- variable name
-
CreateVariableClause
public CreateVariableClause(String variableType, String variableName, Expression optionalAssignment, boolean constant) Ctor.- Parameters:
variableType
- is the variable type namevariableName
- is the name of the variableoptionalAssignment
- is the optional assignment expression supplying the initial value, or null if the initial value is nullconstant
- true for constant, false for regular variable
-
-
Method Details
-
create
Creates a create-variable syntax for declaring a variable.- Parameters:
variableType
- is the variable type namevariableName
- 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 namevariableName
- is the name of the variableexpression
- is the assignment expression supplying the initial value- Returns:
- create-variable clause
-
getVariableType
Returns the variable type name.- Returns:
- type of the variable
-
setVariableType
Sets the variable type name.- Parameters:
variableType
- type of the variable
-
getVariableName
Returns the variable name.- Returns:
- name of the variable
-
setVariableName
Sets the variable name- Parameters:
variableName
- name of the variable
-
getOptionalAssignment
Returns the optional assignment expression, or null to initialize to a null value- Returns:
- assignment expression, if present
-
setOptionalAssignment
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
Render as EPL.- Parameters:
writer
- to output to
-