net.esper.client.soda
Class CastExpression

java.lang.Object
  extended by net.esper.client.soda.ExpressionBase
      extended by net.esper.client.soda.CastExpression
All Implemented Interfaces:
Serializable, Expression

public class CastExpression
extends ExpressionBase

Cast expression casts the return value of an expression to a specified type.

See Also:
Serialized Form

Constructor Summary
CastExpression(Expression expressionToCheck, String typeName)
          Ctor.
CastExpression(String typeName)
          Ctor - for use to create an expression tree, without child expression.
 
Method Summary
 String getTypeName()
          Returns the name of the type to cast to.
 void setTypeName(String typeName)
          Sets the name of the type to cast to.
 void toEQL(StringWriter writer)
          Renders the clause in textual representation.
 
Methods inherited from class net.esper.client.soda.ExpressionBase
addChild, getChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CastExpression

public CastExpression(String typeName)
Ctor - for use to create an expression tree, without child expression.

Parameters:
typeName - is the type to cast to: a fully-qualified class name or Java primitive type name or "string"

CastExpression

public CastExpression(Expression expressionToCheck,
                      String typeName)
Ctor.

Parameters:
expressionToCheck - provides values to cast
typeName - is the type to cast to: a fully-qualified class names or Java primitive type names or "string"
Method Detail

toEQL

public void toEQL(StringWriter writer)
Renders the clause in textual representation.

Parameters:
writer - to output to

getTypeName

public String getTypeName()
Returns the name of the type to cast to.

Returns:
type name

setTypeName

public void setTypeName(String typeName)
Sets the name of the type to cast to.

Parameters:
typeName - is the name of type to cast to

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