de.unidu.is.expressions
Class BinaryStandardFunctionExpression

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

public class BinaryStandardFunctionExpression
extends AbstractExpression

An expression for binary functions without preceding ampersend.

Since:
2005-03-17
Version:
$Revision: 1.1 $, $Date: 2005/03/17 22:30:15 $
Author:
Henrik Nottelmann

Field Summary
protected  Expression arg1
          First argument of this expression.
protected  Expression arg2
          Second argument of this expression.
protected  java.lang.String funcName
          Function name.
 
Constructor Summary
BinaryStandardFunctionExpression(java.lang.String funcName, Expression arg1, Expression arg2)
          Creates a new expression object.
 
Method Summary
 Expression getArg1()
          Returns the first argument.
 Expression getArg2()
          Returns the second argument.
 java.lang.String getFunctionName()
          Returns the function name.
 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.
 java.lang.String toString()
          Returns the expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

funcName

protected java.lang.String funcName
Function name.


arg1

protected Expression arg1
First argument of this expression.


arg2

protected Expression arg2
Second argument of this expression.

Constructor Detail

BinaryStandardFunctionExpression

public BinaryStandardFunctionExpression(java.lang.String funcName,
                                        Expression arg1,
                                        Expression arg2)
Creates a new expression object.

Parameters:
funcName - function name
arg1 - first argument of this expression
arg2 - second argument of this expression
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 arguments are substituted.

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

toString

public java.lang.String toString()
Returns the expression.

Returns:
expression as a string

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 AbstractExpression
Returns:
template for SQL statements

getArg1

public Expression getArg1()
Returns the first argument.

Returns:
first argument

getArg2

public Expression getArg2()
Returns the second argument.

Returns:
second argument

getFunctionName

public java.lang.String getFunctionName()
Returns the function name.

Returns:
function name