|
|
@ -45,6 +45,7 @@ import org.gcube.accounting.datamodel.aggregation.AggregatedStorageStatusRecord;
|
|
|
|
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
|
|
|
|
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
|
|
|
|
import org.gcube.accounting.persistence.AccountingPersistenceConfiguration;
|
|
|
|
import org.gcube.accounting.persistence.AccountingPersistenceConfiguration;
|
|
|
|
import org.gcube.documentstore.records.AggregatedRecord;
|
|
|
|
import org.gcube.documentstore.records.AggregatedRecord;
|
|
|
|
|
|
|
|
import org.gcube.documentstore.records.Record;
|
|
|
|
import org.gcube.documentstore.records.RecordUtility;
|
|
|
|
import org.gcube.documentstore.records.RecordUtility;
|
|
|
|
import org.json.JSONArray;
|
|
|
|
import org.json.JSONArray;
|
|
|
|
import org.json.JSONException;
|
|
|
|
import org.json.JSONException;
|
|
|
@ -1510,12 +1511,13 @@ public class AccountingPersistenceQueryCouchBase implements AccountingPersistenc
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getRecord(String recordId, String recordType) throws Exception {
|
|
|
|
public Record getRecord(String recordId, String recordType) throws Exception {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Bucket bucket = getBucket(recordType);
|
|
|
|
Bucket bucket = getBucket(recordType);
|
|
|
|
JsonDocument recordJson = bucket.get(recordId);
|
|
|
|
JsonDocument recordJson = bucket.get(recordId);
|
|
|
|
return recordJson.content().toString();
|
|
|
|
String recordJsonString = recordJson.content().toString();
|
|
|
|
|
|
|
|
return RecordUtility.getRecord(recordJsonString);
|
|
|
|
} catch(Exception e) {
|
|
|
|
} catch(Exception e) {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|