IResultIterator odiResult, Scriptable scope, Logger logger )
IResultIterator odiResult, Scriptable scope )
	public static Object evaluateExpression( IBaseExpression dataExpr,			IResultIterator odiResult, Scriptable scope, Logger logger )			throws BirtException	{		Object exprValue = null;				//TODO here the dataExpr should not be null.		//This is only a temporary solution.				if( dataExpr == null )			throw new DataException(ResourceConstants.BAD_DATA_EXPRESSION);				Object handle = dataExpr.getHandle( );		if ( handle instanceof CompiledExpression )		{			CompiledExpression expr = (CompiledExpression) handle;			Object value = evaluateCompiledExpression( expr, odiResult, scope );			try			{				exprValue = DataTypeUtil.convert( value, dataExpr.getDataType( ) );			}			catch ( BirtException e )			{				throw new DataException( ResourceConstants.INCONVERTIBLE_DATATYPE,						new Object[]{								value,								value.getClass( ),								DataType.getClass( dataExpr.getDataType( ) )						} );			}		}		else if ( handle instanceof ConditionalExpression )		{			ConditionalExpression ce = (ConditionalExpression) handle;			Object resultExpr = evaluateExpression( ce.getExpression( ),					odiResult,					scope,					logger );			Object resultOp1 = ce.getOperand1( ) != null					? evaluateExpression( ce.getOperand1( ), odiResult, scope, logger )					: null;			Object resultOp2 = ce.getOperand2( ) != null					? evaluateExpression( ce.getOperand2( ), odiResult, scope, logger )					: null;			String op1Text = ce.getOperand1( ) != null ? ce.getOperand1( )					.getText( ) : null;			String op2Text = ce.getOperand2( ) != null ? ce.getOperand2( )					.getText( ) : null;			exprValue = ScriptEvalUtil.evalConditionalExpr( resultExpr,					ce.getOperator( ),					ScriptEvalUtil.newExprInfo( op1Text, resultOp1 ),					ScriptEvalUtil.newExprInfo( op2Text, resultOp2 ) );		}		else		{			DataException e = new DataException( ResourceConstants.INVALID_EXPR_HANDLE );			logger.logp( Level.FINE,					ResultIterator.class.getName( ),					"getValue",					"Invalid expression handle.",					e );			throw e;		}		// the result might be a DataExceptionMocker.		if ( exprValue instanceof DataExceptionMocker )		{			throw ( (DataExceptionMocker) exprValue ).getCause( );		}		return exprValue;	}