de.unidu.is.expressions
Class Str2NumFunctionExpression

java.lang.Object
  extended byde.unidu.is.expressions.AbstractExpression
      extended byde.unidu.is.expressions.FunctionExpression
          extended byde.unidu.is.expressions.Str2NumFunctionExpression
All Implemented Interfaces:
Expression

public class Str2NumFunctionExpression
extends FunctionExpression

An expression for the str2num function.

Since:
2003-10-27
Version:
$Revision: 1.4 $, $Date: 2005/02/21 17:29:18 $
Author:
Henrik Nottelmann

Field Summary
 
Fields inherited from class de.unidu.is.expressions.FunctionExpression
arg, name
 
Constructor Summary
Str2NumFunctionExpression(Expression arg)
          Creates a new expression object.
 
Method Summary
 java.lang.String getSQLTemplate()
          Returns a string representation for this expression which can be used as a template in an SQL statement.
 Expression substitute(java.util.Map binding)
          Performs an substitution for variables, e.g. for each key variable in the specified binding, all occurences of ${key} are replaced by the corresponding value in the map.
 
Methods inherited from class de.unidu.is.expressions.FunctionExpression
getArgument, getName, setArgument, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Str2NumFunctionExpression

public Str2NumFunctionExpression(Expression arg)
Creates a new expression object.

Parameters:
arg - function argument
Method Detail

substitute

public Expression substitute(java.util.Map binding)
Performs an substitution for variables, e.g. for each key variable in the specified binding, all occurences of ${key} are replaced by the corresponding value in the map.

Only the argument is substituted.

Specified by:
substitute in interface Expression
Overrides:
substitute in class FunctionExpression
Parameters:
binding - variable binding
Returns:
expression after substitution

getSQLTemplate

public java.lang.String getSQLTemplate()
Returns a string representation for this expression which can be used as a template in an SQL statement.

Specified by:
getSQLTemplate in interface Expression
Overrides:
getSQLTemplate in class FunctionExpression
Returns:
template for SQL statements