org.objectweb.medor.expression.converter.rdb
Class Expression2WhereClauseImpl

java.lang.Object
  extended byorg.objectweb.medor.expression.converter.rdb.Expression2WhereClauseImpl
All Implemented Interfaces:
Expression2WhereClause

public class Expression2WhereClauseImpl
extends java.lang.Object
implements Expression2WhereClause

This class implements the Expression2WhereClause interface.

Author:
A. Lefebvre

Constructor Summary
Expression2WhereClauseImpl()
           
 
Method Summary
 java.lang.String convertExp2WhereClause(Expression exp, RdbAdapter rdbAdapter)
          Converts an expression to a relational where clause
 void convertExp2WhereClause(Expression exp, RdbAdapter rdbAdapter, java.lang.StringBuffer sb)
          These method build a where clause in a StrinbBuffer from a medor expression.
 void convertExp2WhereClauseBuilder(Expression exp, java.lang.String rdbAdapterVarName, java.lang.StringBuffer sb)
          These method build a where clause in a StrinbBuffer from a medor expression.
 java.lang.String toSqlOperator(java.lang.String in)
          Returns the SQL equivalent of the Java operator String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expression2WhereClauseImpl

public Expression2WhereClauseImpl()
Method Detail

convertExp2WhereClause

public final java.lang.String convertExp2WhereClause(Expression exp,
                                                     RdbAdapter rdbAdapter)
                                              throws ExpressionException
Description copied from interface: Expression2WhereClause
Converts an expression to a relational where clause

Specified by:
convertExp2WhereClause in interface Expression2WhereClause
Parameters:
exp - the Expression to be converted
rdbAdapter - the RdbAdapter which can be necessary to compute parts of the query which may depend from the relational database
Returns:
the SQL WHERE clause corresponding to the input Expression, as a String
Throws:
ExpressionException

convertExp2WhereClause

public void convertExp2WhereClause(Expression exp,
                                   RdbAdapter rdbAdapter,
                                   java.lang.StringBuffer sb)
                            throws ExpressionException
These method build a where clause in a StrinbBuffer from a medor expression.

Parameters:
exp - is the medor expression to translate
rdbAdapter - is the RdbAdapter permetting to
sb -
Throws:
ExpressionException

toSqlOperator

public java.lang.String toSqlOperator(java.lang.String in)
Returns the SQL equivalent of the Java operator String.


convertExp2WhereClauseBuilder

public void convertExp2WhereClauseBuilder(Expression exp,
                                          java.lang.String rdbAdapterVarName,
                                          java.lang.StringBuffer sb)
                                   throws ExpressionException
These method build a where clause in a StrinbBuffer from a medor expression.

Parameters:
exp - is the medor expression to translate
rdbAdapterVarName - is the RdbAdapter permetting to
sb -
Throws:
ExpressionException