de.unidu.is.expressions
Interface Expression

All Known Implementing Classes:
AbstractExpression

public interface Expression

An interface defining mathematical expressions. They can be used for differerent purpose, e.g. for defining abstract SQL statements.

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

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.
 

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.

How the substitution is managed is left to the implementing class. It is explicitly allowed to return a new expression object.

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.

Returns:
template for SQL statements