if ( columnExprArray[i].getHandle() != null) value = ((CompiledExpression)columnExprArray[i].getHandle()).evaluate(cx, dataSet.getScriptScope() ); else value = ScriptEvalUtil.evaluateJSAsExpr( cx, dataSet.getJSDataSetObject(), ((IScriptExpression)columnExprArray[i]).getText(), "ComputedColumn", 0 );
	public boolean process( IResultObject resultObject, int rowIndex ) throws DataException	{			logger.entering( ComputedColumnHelper.class.getName( ), "process" );		assert resultObject != null;				IResultClass resultClass = resultObject.getResultClass( );		if ( isPrepared == false )			prepare( resultClass );		// check if no computed columns are found as custom fields in the result		// set		if ( columnExprArray.length == 0 )		{			logger.exiting( ComputedColumnHelper.class.getName( ), "process" );			return true; // done		}				// bind new object to row script object		dataSet.setRowObject( resultObject, true );		dataSet.setCurrentRowIndex( rowIndex );		// now assign the computed value to each of its projected computed		// columns		Context cx = Context.enter( );		try		{			// iterate through each projected computed column,			// and assign it the computed value			for ( int i = 0; i < columnExprArray.length; i++ )			{				if ( columnExprArray[i] != null )				{					Object value = null;									if ( columnExprArray[i].getHandle() != null)						value = ((CompiledExpression)columnExprArray[i].getHandle()).evaluate(cx,									dataSet.getScriptScope() );					else						value = ScriptEvalUtil.evaluateJSAsExpr( cx,								dataSet.getJSDataSetObject(),								((IScriptExpression)columnExprArray[i]).getText(),								"ComputedColumn",								0 );									try					{						value = DataTypeUtil.convert( value,								resultClass.getFieldValueClass( columnIndexArray[i] ) );					}					catch ( BirtException e )					{						String fieldName = resultClass.getFieldName( columnIndexArray[i] );						if( fieldName != null && fieldName.startsWith("_{$TEMP_"))						{//							 Data Type of computed column is not correct							throw new DataException( ResourceConstants.WRONG_DATA_TYPE_SCRIPT_RESULT,									new Object[]{										resultClass.getFieldValueClass( columnIndexArray[i] ).getName( ),											value.toString( ),									} );						}						// Data Type of computed column is not correct						throw new DataException( ResourceConstants.WRONG_DATA_TYPE_COMPUTED_COLUMN,								new Object[]{										resultClass.getFieldName( columnIndexArray[i] ),										resultClass.getFieldValueClass( columnIndexArray[i] )												.getName( ),										value.toString( ),								} );					}					resultObject.setCustomFieldValue( columnIndexArray[i],							value );				}				else				{					throw new DataException( ResourceConstants.EXPR_INVALID_COMPUTED_COLUMN,							resultObject.getResultClass( )									.getFieldName( columnIndexArray[i] ) );				}			}		}		finally		{			Context.exit( );		}		logger.exiting( ComputedColumnHelper.class.getName( ), "process" );		return true;	}