com.espertech.esper.client.soda
Class CreateVariableClause

java.lang.Object
  extended by com.espertech.esper.client.soda.CreateVariableClause
All Implemented Interfaces:
java.io.Serializable

public class CreateVariableClause
extends java.lang.Object
implements java.io.Serializable

Represents a create-variable syntax for creating a new variable.

See Also:
Serialized Form

Constructor Summary
CreateVariableClause()
          Ctor.
CreateVariableClause(java.lang.String variableName)
          Ctor.
CreateVariableClause(java.lang.String variableType, java.lang.String variableName, Expression optionalAssignment, boolean constant)
          Ctor.
 
Method Summary
static CreateVariableClause create(java.lang.String variableType, java.lang.String variableName)
          Creates a create-variable syntax for declaring a variable.
static CreateVariableClause create(java.lang.String variableType, java.lang.String variableName, Expression expression)
          Creates a create-variable syntax for declaring a variable.
 Expression getOptionalAssignment()
          Returns the optional assignment expression, or null to initialize to a null value
 java.lang.String getVariableName()
          Returns the variable name.
 java.lang.String getVariableType()
          Returns the variable type name.
 boolean isArray()
          Returns indictor whether array or not array.
 boolean isArrayOfPrimitive()
          Returns true for array of primitive values (also set the array flag)
 boolean isConstant()
          Returns indicator whether the variable is a constant.
 void setArray(boolean array)
          Sets indictor whether array or not array.
 void setArrayOfPrimitive(boolean arrayOfPrimitive)
          Set true for array of primitive values (also set the array flag)
 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 value
 void setVariableName(java.lang.String variableName)
          Sets the variable name
 void setVariableType(java.lang.String variableType)
          Sets the variable type name.
 void toEPL(java.io.StringWriter writer)
          Render as EPL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateVariableClause

public CreateVariableClause()
Ctor.


CreateVariableClause

public CreateVariableClause(java.lang.String variableName)
Ctor.

Parameters:
variableName - variable name

CreateVariableClause

public CreateVariableClause(java.lang.String variableType,
                            java.lang.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 Detail

create

public static CreateVariableClause create(java.lang.String variableType,
                                          java.lang.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(java.lang.String variableType,
                                          java.lang.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 java.lang.String getVariableType()
Returns the variable type name.

Returns:
type of the variable

setVariableType

public void setVariableType(java.lang.String variableType)
Sets the variable type name.

Parameters:
variableType - type of the variable

getVariableName

public java.lang.String getVariableName()
Returns the variable name.

Returns:
name of the variable

setVariableName

public void setVariableName(java.lang.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

isArray

public boolean isArray()
Returns indictor whether array or not array.

Returns:
array indicator

setArray

public void setArray(boolean array)
Sets indictor whether array or not array.

Parameters:
array - array indicator

isArrayOfPrimitive

public boolean isArrayOfPrimitive()
Returns true for array of primitive values (also set the array flag)

Returns:
indicator

setArrayOfPrimitive

public void setArrayOfPrimitive(boolean arrayOfPrimitive)
Set true for array of primitive values (also set the array flag)

Parameters:
arrayOfPrimitive - indicator

toEPL

public void toEPL(java.io.StringWriter writer)
Render as EPL.

Parameters:
writer - to output to

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com