IScriptExpression expr = (IScriptExpression) iter.next( ); selectedColumns[i] = expr.getText( );
IBaseExpression expr = (IBaseExpression) iter.next( ); if ( expr instanceof IConditionalExpression ) { IConditionalExpression condExpr = (IConditionalExpression) expr; selectedColumns[i] = condExpr.getExpression( ).getText( ); } else if ( expr instanceof IScriptExpression ) { IScriptExpression scriptExpr = (IScriptExpression) expr; selectedColumns[i] = scriptExpr.getText( ); }
	private void validateSelectedColumns( IBaseQueryDefinition query )			throws EngineException	{		assert query != null;		Collection exprs = query.getRowExpressions( );		if ( selectedColumns != null )		{			for ( int i = 0; i < selectedColumns.length; i++ )			{				boolean findColumn = false;				Iterator iter = exprs.iterator( );				while ( iter.hasNext( ) )				{					IScriptExpression expr = (IScriptExpression) iter.next( );					if ( expr.getText( ).equalsIgnoreCase( selectedColumns[i] ) )					{						findColumn = true;						break;					}				}				if ( findColumn == false )				{					throw new EngineException( "Invalid Columns" );				}			}		}		else		{			selectedColumns = new String[exprs.size( )];			Iterator iter = exprs.iterator( );						for ( int i = 0; i < selectedColumns.length; i++ )			{				IScriptExpression expr = (IScriptExpression) iter.next( );				selectedColumns[i] = expr.getText( );			}		} 	}