renamed variable
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-analytics@125581 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d53fc8d80a
commit
ec4cb526eb
|
@ -30,7 +30,7 @@ public abstract class AccountingPersistenceBackendQuery {
|
|||
* #Info is the value. The result is relative to an Usage Record Type,
|
||||
* respect a TemporalConstraint and can be applied one or more filters.
|
||||
*
|
||||
* @param aggregatedRecordClass
|
||||
* @param clz
|
||||
* the Record Class of interest
|
||||
* @param temporalConstraint
|
||||
* the TemporalConstraint (interval and aggregation)
|
||||
|
@ -47,7 +47,7 @@ public abstract class AccountingPersistenceBackendQuery {
|
|||
* if fails
|
||||
*/
|
||||
public abstract SortedMap<Calendar, Info> getTimeSeries(
|
||||
Class<? extends AggregatedRecord<?, ?>> aggregatedRecordClass,
|
||||
Class<? extends AggregatedRecord<?,?>> clz,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters)
|
||||
throws Exception;
|
||||
|
||||
|
@ -58,7 +58,7 @@ public abstract class AccountingPersistenceBackendQuery {
|
|||
* an Exception is thrown. The values are ordered from the most occurred
|
||||
* value.
|
||||
*
|
||||
* @param aggregatedRecordClass
|
||||
* @param clz
|
||||
* the Usage Record Class of interest
|
||||
* @param temporalConstraint
|
||||
* the TemporalConstraint (interval and aggregation)
|
||||
|
@ -77,17 +77,17 @@ public abstract class AccountingPersistenceBackendQuery {
|
|||
* if fails
|
||||
*/
|
||||
public SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues(
|
||||
Class<? extends AggregatedRecord<?, ?>> aggregatedRecordClass,
|
||||
Class<? extends AggregatedRecord<?,?>> clz,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters)
|
||||
throws Exception {
|
||||
String orderingProperty = AccountingPersistenceQuery
|
||||
.getDefaultOrderingProperties(aggregatedRecordClass);
|
||||
return getTopValues(aggregatedRecordClass, temporalConstraint, filters,
|
||||
.getDefaultOrderingProperties(clz);
|
||||
return getTopValues(clz, temporalConstraint, filters,
|
||||
orderingProperty);
|
||||
}
|
||||
|
||||
public abstract SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues(
|
||||
Class<? extends AggregatedRecord<?, ?>> aggregatedRecordClass,
|
||||
Class<? extends AggregatedRecord<?,?>> clz,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters,
|
||||
String orderingProperty) throws Exception;
|
||||
|
||||
|
@ -98,7 +98,7 @@ public abstract class AccountingPersistenceBackendQuery {
|
|||
* allowed otherwise an Exception is thrown. The values are ordered from the
|
||||
* most occurred value.
|
||||
*
|
||||
* @param aggregatedRecordClass
|
||||
* @param clz
|
||||
* the Usage Record Class of interest
|
||||
* @param temporalConstraint
|
||||
* the TemporalConstraint (interval and aggregation)
|
||||
|
@ -117,17 +117,17 @@ public abstract class AccountingPersistenceBackendQuery {
|
|||
* if fails
|
||||
*/
|
||||
public SortedSet<NumberedFilter> getNextPossibleValues(
|
||||
Class<? extends AggregatedRecord<?, ?>> aggregatedRecordClass,
|
||||
Class<? extends AggregatedRecord<?,?>> clz,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters)
|
||||
throws Exception {
|
||||
String orderingProperty = AccountingPersistenceQuery
|
||||
.getDefaultOrderingProperties(aggregatedRecordClass);
|
||||
return getNextPossibleValues(aggregatedRecordClass, temporalConstraint,
|
||||
.getDefaultOrderingProperties(clz);
|
||||
return getNextPossibleValues(clz, temporalConstraint,
|
||||
filters, orderingProperty);
|
||||
}
|
||||
|
||||
public abstract SortedSet<NumberedFilter> getNextPossibleValues(
|
||||
Class<? extends AggregatedRecord<?, ?>> aggregatedRecordClass,
|
||||
Class<? extends AggregatedRecord<?, ?>> clz,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters,
|
||||
String orderingProperty) throws Exception;
|
||||
|
||||
|
|
|
@ -61,14 +61,14 @@ public class AccountingPersistenceQuery {
|
|||
}
|
||||
|
||||
public static SortedSet<String> getQuerableKeys(
|
||||
Class<? extends AggregatedRecord<?,?>> aggregatedRecordClass)
|
||||
Class<? extends AggregatedRecord<?,?>> clz)
|
||||
throws Exception {
|
||||
AggregatedRecord<?,?> instance = aggregatedRecordClass.newInstance();
|
||||
AggregatedRecord<?,?> instance = clz.newInstance();
|
||||
return getQuerableKeys(instance);
|
||||
}
|
||||
|
||||
public static String getDefaultOrderingProperties(Class<? extends AggregatedRecord<?, ?>> recordClass){
|
||||
if(recordClass.isAssignableFrom(AggregatedStorageUsageRecord.class)){
|
||||
public static String getDefaultOrderingProperties(Class<? extends AggregatedRecord<?, ?>> clz){
|
||||
if(clz.isAssignableFrom(AggregatedStorageUsageRecord.class)){
|
||||
return AggregatedStorageUsageRecord.DATA_VOLUME;
|
||||
}
|
||||
return AggregatedRecord.OPERATION_COUNT;
|
||||
|
@ -119,12 +119,12 @@ public class AccountingPersistenceQuery {
|
|||
}
|
||||
|
||||
public SortedMap<Calendar, Info> getTimeSeries(
|
||||
Class<? extends AggregatedRecord<?,?>> aggregatedRecordClass,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters, boolean pad)
|
||||
throws Exception {
|
||||
Class<? extends AggregatedRecord<?,?>> clz,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters,
|
||||
boolean pad) throws Exception {
|
||||
SortedMap<Calendar, Info> ret =
|
||||
AccountingPersistenceBackendQueryFactory.getInstance()
|
||||
.getTimeSeries(aggregatedRecordClass, temporalConstraint,
|
||||
.getTimeSeries(clz, temporalConstraint,
|
||||
filters);
|
||||
|
||||
if(pad){
|
||||
|
@ -135,18 +135,18 @@ public class AccountingPersistenceQuery {
|
|||
}
|
||||
|
||||
public SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues(
|
||||
Class<? extends AggregatedRecord<?,?>> aggregatedRecordClass,
|
||||
Class<? extends AggregatedRecord<?,?>> clz,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters,
|
||||
String orderingProperty, boolean pad, int limit) throws Exception {
|
||||
|
||||
SortedMap<NumberedFilter, SortedMap<Calendar, Info>> ret;
|
||||
|
||||
if(orderingProperty==null){
|
||||
orderingProperty = getDefaultOrderingProperties(aggregatedRecordClass);
|
||||
orderingProperty = getDefaultOrderingProperties(clz);
|
||||
}
|
||||
|
||||
ret = AccountingPersistenceBackendQueryFactory.getInstance()
|
||||
.getTopValues(aggregatedRecordClass, temporalConstraint,
|
||||
.getTopValues(clz, temporalConstraint,
|
||||
filters, orderingProperty);
|
||||
|
||||
|
||||
|
@ -163,20 +163,20 @@ public class AccountingPersistenceQuery {
|
|||
}
|
||||
|
||||
public SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues(
|
||||
Class<? extends AggregatedRecord<?,?>> aggregatedRecordClass,
|
||||
Class<? extends AggregatedRecord<?,?>> clz,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters)
|
||||
throws Exception {
|
||||
return AccountingPersistenceBackendQueryFactory.getInstance()
|
||||
.getTopValues(aggregatedRecordClass, temporalConstraint,
|
||||
.getTopValues(clz, temporalConstraint,
|
||||
filters);
|
||||
}
|
||||
|
||||
public SortedSet<NumberedFilter> getNextPossibleValues(
|
||||
Class<? extends AggregatedRecord<?,?>> aggregatedRecordClass,
|
||||
Class<? extends AggregatedRecord<?,?>> clz,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters)
|
||||
throws Exception {
|
||||
return AccountingPersistenceBackendQueryFactory.getInstance()
|
||||
.getNextPossibleValues(aggregatedRecordClass,
|
||||
.getNextPossibleValues(clz,
|
||||
temporalConstraint, filters);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue