refs #513: Suggest Values for filter in accounting-analytics
https://support.d4science.org/issues/513 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-analytics@119327 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9963ed9020
commit
01cb569275
|
@ -173,4 +173,11 @@ public class ResourceRecordQuery {
|
||||||
return toSort;
|
return toSort;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getPossibleValuesForKey(@SuppressWarnings("rawtypes") Class<? extends AggregatedUsageRecord> usageRecordType, String key) throws Exception {
|
||||||
|
Set<String> keys = accountingPersistenceQuery.getPossibleValuesForKey(usageRecordType, key);
|
||||||
|
List<String> toSort = new ArrayList<String>(keys);
|
||||||
|
Collections.sort(toSort);
|
||||||
|
return toSort;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,9 +57,20 @@ public abstract class AccountingPersistenceQuery {
|
||||||
*/
|
*/
|
||||||
public abstract Set<String> getKeys(@SuppressWarnings("rawtypes") Class<? extends AggregatedUsageRecord> usageRecordType) throws Exception;
|
public abstract Set<String> getKeys(@SuppressWarnings("rawtypes") Class<? extends AggregatedUsageRecord> usageRecordType) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the list of possible values for a key for a certain usage record type
|
||||||
|
* @param usageRecordType the usage record type
|
||||||
|
* @param key the key
|
||||||
|
* @return a set containing the list of possible values
|
||||||
|
* @throws Exception if fails
|
||||||
|
*/
|
||||||
|
public abstract Set<String> getPossibleValuesForKey(@SuppressWarnings("rawtypes") Class<? extends AggregatedUsageRecord> usageRecordType, String key) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close the connection to persistence
|
* Close the connection to persistence
|
||||||
* @throws Exception if the close fails
|
* @throws Exception if the close fails
|
||||||
*/
|
*/
|
||||||
public abstract void close() throws Exception;
|
public abstract void close() throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue