Returning keys as sorted list
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-analytics@118934 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1821a1613e
commit
096d4e503f
|
@ -5,6 +5,7 @@ package org.gcube.accounting.analytics;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -165,8 +166,11 @@ public class ResourceRecordQuery {
|
||||||
* @return a set containing the list of key
|
* @return a set containing the list of key
|
||||||
* @throws Exception if fails
|
* @throws Exception if fails
|
||||||
*/
|
*/
|
||||||
public Set<String> getKeys(@SuppressWarnings("rawtypes") Class<? extends AggregatedUsageRecord> usageRecordType) throws Exception{
|
public List<String> getKeys(@SuppressWarnings("rawtypes") Class<? extends AggregatedUsageRecord> usageRecordType) throws Exception{
|
||||||
return accountingPersistenceQuery.getKeys(usageRecordType);
|
Set<String> keys = accountingPersistenceQuery.getKeys(usageRecordType);
|
||||||
|
List<String> toSort = new ArrayList<String>(keys);
|
||||||
|
Collections.sort(toSort);
|
||||||
|
return toSort;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue