|
|
|
@ -21,6 +21,7 @@ import org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQu
|
|
|
|
|
import org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryConfiguration;
|
|
|
|
|
import org.gcube.accounting.datamodel.BasicUsageRecord;
|
|
|
|
|
import org.gcube.accounting.datamodel.UsageRecord;
|
|
|
|
|
import org.gcube.common.scope.api.ScopeProvider;
|
|
|
|
|
import org.gcube.documentstore.records.AggregatedRecord;
|
|
|
|
|
import org.gcube.documentstore.records.Record;
|
|
|
|
|
import org.gcube.documentstore.records.RecordUtility;
|
|
|
|
@ -108,7 +109,8 @@ public class AccountingPersistenceQueryCouchBase extends AccountingPersistenceBa
|
|
|
|
|
TemporalConstraint temporalConstraint, List<Filter> filters)
|
|
|
|
|
throws Exception {
|
|
|
|
|
|
|
|
|
|
String currentScope = BasicUsageRecord.getScopeFromToken();
|
|
|
|
|
//String currentScope = BasicUsageRecord.getScopeFromToken();
|
|
|
|
|
String currentScope = ScopeProvider.instance.get();
|
|
|
|
|
String recordType = recordClass.newInstance().getRecordType();
|
|
|
|
|
|
|
|
|
|
Expression expression = x(BasicUsageRecord.SCOPE).eq(s(currentScope));
|
|
|
|
|