de.unidu.is.expressions
Class AbstractExpression

java.lang.Object
  extended byde.unidu.is.expressions.AbstractExpression
All Implemented Interfaces:
Expression
Direct Known Subclasses:
Arg2Expression, ArgNExpression, BinaryStandardFunctionExpression, DBColumnExpression, DBProbExpression, FunctionExpression, LiteralExpression, PlainExpression, ProbExpression, StringExpression, VariableExpression

public class AbstractExpression
extends java.lang.Object
implements Expression

An abstract class for expressions.

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

Constructor Summary
AbstractExpression()
           
 
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExpression

public AbstractExpression()
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.

Here, the same untouched expression is returned. Subclasses can overwrite this behaviour.

Specified by:
substitute in interface Expression
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
Returns:
template for SQL statements