Allow to specify a limit when querying values for suggestion. refs #9943
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-analytics@155176 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9e1f252c13
commit
99f2205b63
|
@ -167,6 +167,8 @@ public interface AccountingPersistenceBackendQuery {
|
||||||
*/
|
*/
|
||||||
public void close() throws Exception;
|
public void close() throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a sortedSet filter value
|
* Return a sortedSet filter value
|
||||||
*
|
*
|
||||||
|
@ -187,6 +189,22 @@ public interface AccountingPersistenceBackendQuery {
|
||||||
TemporalConstraint temporalConstraint, List<Filter> filters,
|
TemporalConstraint temporalConstraint, List<Filter> filters,
|
||||||
String key) throws Exception;
|
String key) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a sortedSet filter value
|
||||||
|
*
|
||||||
|
* @param clz
|
||||||
|
* @param temporalConstraint
|
||||||
|
* @param filters
|
||||||
|
* @param key
|
||||||
|
* @param limit
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public SortedSet<NumberedFilter> getFilterValues(
|
||||||
|
Class<? extends AggregatedRecord<?, ?>> clz,
|
||||||
|
TemporalConstraint temporalConstraint, List<Filter> filters,
|
||||||
|
String key, int limit) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a JsonObject with value
|
* Return a JsonObject with value
|
||||||
* e.g.for StorageUsageRecord {"dataVolume":1860328,"operationCount":4115}
|
* e.g.for StorageUsageRecord {"dataVolume":1860328,"operationCount":4115}
|
||||||
|
|
|
@ -277,11 +277,18 @@ public class AccountingPersistenceQuery implements AccountingPersistenceBackendQ
|
||||||
@Override
|
@Override
|
||||||
public SortedSet<NumberedFilter> getFilterValues(Class<? extends AggregatedRecord<?, ?>> clz,
|
public SortedSet<NumberedFilter> getFilterValues(Class<? extends AggregatedRecord<?, ?>> clz,
|
||||||
TemporalConstraint temporalConstraint, List<Filter> filters, String key) throws Exception {
|
TemporalConstraint temporalConstraint, List<Filter> filters, String key) throws Exception {
|
||||||
|
return getFilterValues(clz, temporalConstraint, filters, key, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SortedSet<NumberedFilter> getFilterValues(Class<? extends AggregatedRecord<?, ?>> clz,
|
||||||
|
TemporalConstraint temporalConstraint, List<Filter> filters, String key, int limit) throws Exception {
|
||||||
|
|
||||||
return AccountingPersistenceBackendQueryFactory.getInstance().getFilterValues(clz, temporalConstraint, filters,
|
return AccountingPersistenceBackendQueryFactory.getInstance().getFilterValues(clz, temporalConstraint, filters,
|
||||||
key);
|
key, limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject getUsageValue(Class<? extends AggregatedRecord<?, ?>> clz, TemporalConstraint temporalConstraint,
|
public JSONObject getUsageValue(Class<? extends AggregatedRecord<?, ?>> clz, TemporalConstraint temporalConstraint,
|
||||||
Filter applicant) throws Exception {
|
Filter applicant) throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue