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:
Luca Frosini 2016-03-17 11:16:30 +00:00
parent d53fc8d80a
commit ec4cb526eb
2 changed files with 27 additions and 27 deletions

View File

@ -30,7 +30,7 @@ public abstract class AccountingPersistenceBackendQuery {
* #Info is the value. The result is relative to an Usage Record Type, * #Info is the value. The result is relative to an Usage Record Type,
* respect a TemporalConstraint and can be applied one or more filters. * respect a TemporalConstraint and can be applied one or more filters.
* *
* @param aggregatedRecordClass * @param clz
* the Record Class of interest * the Record Class of interest
* @param temporalConstraint * @param temporalConstraint
* the TemporalConstraint (interval and aggregation) * the TemporalConstraint (interval and aggregation)
@ -47,7 +47,7 @@ public abstract class AccountingPersistenceBackendQuery {
* if fails * if fails
*/ */
public abstract SortedMap<Calendar, Info> getTimeSeries( public abstract SortedMap<Calendar, Info> getTimeSeries(
Class<? extends AggregatedRecord<?, ?>> aggregatedRecordClass, Class<? extends AggregatedRecord<?,?>> clz,
TemporalConstraint temporalConstraint, List<Filter> filters) TemporalConstraint temporalConstraint, List<Filter> filters)
throws Exception; throws Exception;
@ -58,7 +58,7 @@ public abstract class AccountingPersistenceBackendQuery {
* an Exception is thrown. The values are ordered from the most occurred * an Exception is thrown. The values are ordered from the most occurred
* value. * value.
* *
* @param aggregatedRecordClass * @param clz
* the Usage Record Class of interest * the Usage Record Class of interest
* @param temporalConstraint * @param temporalConstraint
* the TemporalConstraint (interval and aggregation) * the TemporalConstraint (interval and aggregation)
@ -77,17 +77,17 @@ public abstract class AccountingPersistenceBackendQuery {
* if fails * if fails
*/ */
public SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues( public SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues(
Class<? extends AggregatedRecord<?, ?>> aggregatedRecordClass, Class<? extends AggregatedRecord<?,?>> clz,
TemporalConstraint temporalConstraint, List<Filter> filters) TemporalConstraint temporalConstraint, List<Filter> filters)
throws Exception { throws Exception {
String orderingProperty = AccountingPersistenceQuery String orderingProperty = AccountingPersistenceQuery
.getDefaultOrderingProperties(aggregatedRecordClass); .getDefaultOrderingProperties(clz);
return getTopValues(aggregatedRecordClass, temporalConstraint, filters, return getTopValues(clz, temporalConstraint, filters,
orderingProperty); orderingProperty);
} }
public abstract SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues( public abstract SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues(
Class<? extends AggregatedRecord<?, ?>> aggregatedRecordClass, Class<? extends AggregatedRecord<?,?>> clz,
TemporalConstraint temporalConstraint, List<Filter> filters, TemporalConstraint temporalConstraint, List<Filter> filters,
String orderingProperty) throws Exception; String orderingProperty) throws Exception;
@ -98,7 +98,7 @@ public abstract class AccountingPersistenceBackendQuery {
* allowed otherwise an Exception is thrown. The values are ordered from the * allowed otherwise an Exception is thrown. The values are ordered from the
* most occurred value. * most occurred value.
* *
* @param aggregatedRecordClass * @param clz
* the Usage Record Class of interest * the Usage Record Class of interest
* @param temporalConstraint * @param temporalConstraint
* the TemporalConstraint (interval and aggregation) * the TemporalConstraint (interval and aggregation)
@ -117,17 +117,17 @@ public abstract class AccountingPersistenceBackendQuery {
* if fails * if fails
*/ */
public SortedSet<NumberedFilter> getNextPossibleValues( public SortedSet<NumberedFilter> getNextPossibleValues(
Class<? extends AggregatedRecord<?, ?>> aggregatedRecordClass, Class<? extends AggregatedRecord<?,?>> clz,
TemporalConstraint temporalConstraint, List<Filter> filters) TemporalConstraint temporalConstraint, List<Filter> filters)
throws Exception { throws Exception {
String orderingProperty = AccountingPersistenceQuery String orderingProperty = AccountingPersistenceQuery
.getDefaultOrderingProperties(aggregatedRecordClass); .getDefaultOrderingProperties(clz);
return getNextPossibleValues(aggregatedRecordClass, temporalConstraint, return getNextPossibleValues(clz, temporalConstraint,
filters, orderingProperty); filters, orderingProperty);
} }
public abstract SortedSet<NumberedFilter> getNextPossibleValues( public abstract SortedSet<NumberedFilter> getNextPossibleValues(
Class<? extends AggregatedRecord<?, ?>> aggregatedRecordClass, Class<? extends AggregatedRecord<?, ?>> clz,
TemporalConstraint temporalConstraint, List<Filter> filters, TemporalConstraint temporalConstraint, List<Filter> filters,
String orderingProperty) throws Exception; String orderingProperty) throws Exception;

View File

@ -61,14 +61,14 @@ public class AccountingPersistenceQuery {
} }
public static SortedSet<String> getQuerableKeys( public static SortedSet<String> getQuerableKeys(
Class<? extends AggregatedRecord<?,?>> aggregatedRecordClass) Class<? extends AggregatedRecord<?,?>> clz)
throws Exception { throws Exception {
AggregatedRecord<?,?> instance = aggregatedRecordClass.newInstance(); AggregatedRecord<?,?> instance = clz.newInstance();
return getQuerableKeys(instance); return getQuerableKeys(instance);
} }
public static String getDefaultOrderingProperties(Class<? extends AggregatedRecord<?, ?>> recordClass){ public static String getDefaultOrderingProperties(Class<? extends AggregatedRecord<?, ?>> clz){
if(recordClass.isAssignableFrom(AggregatedStorageUsageRecord.class)){ if(clz.isAssignableFrom(AggregatedStorageUsageRecord.class)){
return AggregatedStorageUsageRecord.DATA_VOLUME; return AggregatedStorageUsageRecord.DATA_VOLUME;
} }
return AggregatedRecord.OPERATION_COUNT; return AggregatedRecord.OPERATION_COUNT;
@ -119,12 +119,12 @@ public class AccountingPersistenceQuery {
} }
public SortedMap<Calendar, Info> getTimeSeries( public SortedMap<Calendar, Info> getTimeSeries(
Class<? extends AggregatedRecord<?,?>> aggregatedRecordClass, Class<? extends AggregatedRecord<?,?>> clz,
TemporalConstraint temporalConstraint, List<Filter> filters, boolean pad) TemporalConstraint temporalConstraint, List<Filter> filters,
throws Exception { boolean pad) throws Exception {
SortedMap<Calendar, Info> ret = SortedMap<Calendar, Info> ret =
AccountingPersistenceBackendQueryFactory.getInstance() AccountingPersistenceBackendQueryFactory.getInstance()
.getTimeSeries(aggregatedRecordClass, temporalConstraint, .getTimeSeries(clz, temporalConstraint,
filters); filters);
if(pad){ if(pad){
@ -135,18 +135,18 @@ public class AccountingPersistenceQuery {
} }
public SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues( public SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues(
Class<? extends AggregatedRecord<?,?>> aggregatedRecordClass, Class<? extends AggregatedRecord<?,?>> clz,
TemporalConstraint temporalConstraint, List<Filter> filters, TemporalConstraint temporalConstraint, List<Filter> filters,
String orderingProperty, boolean pad, int limit) throws Exception { String orderingProperty, boolean pad, int limit) throws Exception {
SortedMap<NumberedFilter, SortedMap<Calendar, Info>> ret; SortedMap<NumberedFilter, SortedMap<Calendar, Info>> ret;
if(orderingProperty==null){ if(orderingProperty==null){
orderingProperty = getDefaultOrderingProperties(aggregatedRecordClass); orderingProperty = getDefaultOrderingProperties(clz);
} }
ret = AccountingPersistenceBackendQueryFactory.getInstance() ret = AccountingPersistenceBackendQueryFactory.getInstance()
.getTopValues(aggregatedRecordClass, temporalConstraint, .getTopValues(clz, temporalConstraint,
filters, orderingProperty); filters, orderingProperty);
@ -163,20 +163,20 @@ public class AccountingPersistenceQuery {
} }
public SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues( public SortedMap<NumberedFilter, SortedMap<Calendar, Info>> getTopValues(
Class<? extends AggregatedRecord<?,?>> aggregatedRecordClass, Class<? extends AggregatedRecord<?,?>> clz,
TemporalConstraint temporalConstraint, List<Filter> filters) TemporalConstraint temporalConstraint, List<Filter> filters)
throws Exception { throws Exception {
return AccountingPersistenceBackendQueryFactory.getInstance() return AccountingPersistenceBackendQueryFactory.getInstance()
.getTopValues(aggregatedRecordClass, temporalConstraint, .getTopValues(clz, temporalConstraint,
filters); filters);
} }
public SortedSet<NumberedFilter> getNextPossibleValues( public SortedSet<NumberedFilter> getNextPossibleValues(
Class<? extends AggregatedRecord<?,?>> aggregatedRecordClass, Class<? extends AggregatedRecord<?,?>> clz,
TemporalConstraint temporalConstraint, List<Filter> filters) TemporalConstraint temporalConstraint, List<Filter> filters)
throws Exception { throws Exception {
return AccountingPersistenceBackendQueryFactory.getInstance() return AccountingPersistenceBackendQueryFactory.getInstance()
.getNextPossibleValues(aggregatedRecordClass, .getNextPossibleValues(clz,
temporalConstraint, filters); temporalConstraint, filters);
} }