Bug 182895 Support sort on Level attribute.
Currently in OLAP engine we only support sort on level key value. We should go ahead to support sort on level attribute value.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/data/impl/aggregation/sort/AggregationSortHelper.java
import org.eclipse.birt.data.engine.olap.data.util.IStructure;
import org.eclipse.birt.data.engine.olap.data.util.IStructureCreator;
/**
 * Helper class to sort on aggregations.
 */
public class AggregationSortHelper
{
	/**
	 * The method by call which the sort on aggregation will be executed.
	 * @param base
	 * @param qualifier
	 * @param sortKeys
	 * @return
	 * @throws IOException
	 * @throws DataException
	 */
	public static IAggregationResultSet sort( IAggregationResultSet base,
			SortKey[] sortKeys ) throws IOException,
			DataException
	{
		createFilteredResultSet( sortKeys );
		IDiskArray baseDiskArray = getDiskArrayFromAggregationResultSet( base );
		IDiskArray keyDiskArray = populateAggrDiskArray( base, sortKeys );
		CompareUtil.sort( new WrapperedDiskArray( baseDiskArray, keyDiskArray ),
				new AggrResultRowComparator( populateNewSortKeys( base,
						sortKeys ) ),
				AggregationResultRow.getCreator( ) );
		return new AggregationResultSet( base.getAggregationDefinition( ),
				baseDiskArray,
				base.getKeyNames( ),