Bug 319902 Internal API Usage of the ODA framework components
data/org.eclipse.birt.report.data.oda.jdbc.dbprofile.ui/src/org/eclipse/birt/report/data/oda/jdbc/dbprofile/ui/internal/sqb/SQLQueryUtility.java
{
            int ordinalValue = ((OrderByOrdinal)orderBySpec).getOrdinalValue();
            sortKeyHint.setColumnPosition( ordinalValue );
            String sortColumnName = resolveResultColumnOrdinal( ordinalValue, resultSetDefn );
            sortKeyHint.setColumnName( sortColumnName );
       }
        else if( orderBySpec instanceof OrderByResultColumn )
        {
            ResultColumn sortColumn = ((OrderByResultColumn)orderBySpec).getResultCol();
            String sortColumnName = getColumnReferenceName( sortColumn );
            sortKeyHint.setColumnName( sortColumnName );
        }
        else if( orderBySpec instanceof OrderByValueExpression )
        {
            QueryValueExpression valueExpr = ((OrderByValueExpression)orderBySpec).getValueExpr();
            if( valueExpr != null )
            {
                String columnExpr = getColumnReferenceName( valueExpr, selectStmt );
                sortKeyHint.setColumnName( columnExpr );
            }
        }
        else 
            throw new OdaException( new IllegalStateException( 
                    Messages.bind( "Invalid OrderBySpecification in parsed SQL query model: {0}", $NON-NLS-1$
                            orderBySpec )));
        
        int orderingType = orderBySpec.getOrderingSpecOption().getValue();
        if( orderingType == OrderingSpecType.ASC )
            sortKeyHint.setSortDirection( SortDirectionType.ASCENDING );
        else if( orderingType == OrderingSpecType.DESC )