net.esper.client.soda
Class CreateVariableClause

java.lang.Object
  extended by net.esper.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:
Serialized Form

Constructor Summary
CreateVariableClause(String variableType, String variableName, Expression optionalAssignment)
          Ctor.
 
Method Summary
static CreateVariableClause create(String variableType, String variableName)
          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.
 Expression getOptionalAssignment()
          Returns the optional assignment expression, or null to initialize to a null value
 String getVariableName()
          Returns the variable name.
 String getVariableType()
          Returns the variable type name.
 void setOptionalAssignment(Expression optionalAssignment)
          Sets the optional assignment expression, or null to initialize to a null value
 void setVariableName(String variableName)
          Sets the variable name
 void setVariableType(String variableType)
          Sets the variable type name.
 void toEQL(StringWriter writer)
          Render as EQL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateVariableClause

public CreateVariableClause(String variableType,
                            String variableName,
                            Expression optionalAssignment)
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
Method Detail

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

toEQL

public void toEQL(StringWriter writer)
Render as EQL.

Parameters:
writer - to output to

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com