refs #543: Accounting Manager - When the filters are enabled, the serie generated does not match to the time interval required
https://support.d4science.org/issues/543 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-analytics@118912 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7d3722c393
commit
d6d850913a
|
@ -11,6 +11,8 @@ import org.gcube.accounting.analytics.Filter;
|
|||
import org.gcube.accounting.analytics.Info;
|
||||
import org.gcube.accounting.analytics.TemporalConstraint;
|
||||
import org.gcube.accounting.datamodel.AggregatedUsageRecord;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||
|
@ -18,6 +20,8 @@ import org.gcube.accounting.datamodel.AggregatedUsageRecord;
|
|||
*/
|
||||
public abstract class AccountingPersistenceQuery {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(AccountingPersistenceQuery.class);
|
||||
|
||||
protected abstract void prepareConnection(AccountingPersistenceQueryConfiguration configuration) throws Exception;
|
||||
|
||||
protected abstract Map<Calendar, Info> reallyQuery(@SuppressWarnings("rawtypes") Class<? extends AggregatedUsageRecord> usageRecordType,
|
||||
|
@ -25,6 +29,9 @@ public abstract class AccountingPersistenceQuery {
|
|||
|
||||
public Map<Calendar, Info> query(@SuppressWarnings("rawtypes") Class<? extends AggregatedUsageRecord> usageRecordType,
|
||||
TemporalConstraint temporalConstraint, List<Filter> filters) throws Exception{
|
||||
logger.trace("Request query: UsageRecordType={}, {}={}, {}s={}", usageRecordType.newInstance().getUsageRecordType(),
|
||||
TemporalConstraint.class.getSimpleName(), temporalConstraint.toString(),
|
||||
Filter.class.getSimpleName(), filters);
|
||||
return reallyQuery(usageRecordType, temporalConstraint, filters);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue