Skip to content

Commit 79d0ea9

Browse files
committed
Better names
1 parent c547841 commit 79d0ea9

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

specimen/src/org/labkey/specimen/SpecimenModule.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ protected void startupAfterSpringConfig(ModuleContext moduleContext)
273273
{
274274
svc.registerUsageMetrics(NAME, () -> {
275275
// Collect and add specimen repository statistics: simple vs. advanced study count, event/vial/specimen count, count of studies with requests enabled, request count by status
276-
MultiSet<String> specimenBag = new HashMultiSet<>();
276+
MultiSet<String> specimenMultiSet = new HashMultiSet<>();
277277
MutableInt requestsEnabled = new MutableInt(0);
278278
MutableInt hasLocations = new MutableInt(0);
279279

@@ -284,35 +284,35 @@ protected void startupAfterSpringConfig(ModuleContext moduleContext)
284284

285285
if (settings.isSimple())
286286
{
287-
specimenBag.add("simple");
287+
specimenMultiSet.add("simple");
288288
TableInfo simpleSpecimens = schema.getTable(SpecimenTablesProvider.SIMPLE_SPECIMEN_TABLE_NAME);
289-
specimenBag.add("simpleSpecimens", (int) new TableSelector(simpleSpecimens).getRowCount());
289+
specimenMultiSet.add("simpleSpecimens", (int) new TableSelector(simpleSpecimens).getRowCount());
290290
}
291291
else
292292
{
293-
specimenBag.add("advanced");
293+
specimenMultiSet.add("advanced");
294294
TableInfo events = schema.getTable(SpecimenTablesProvider.SPECIMEN_EVENT_TABLE_NAME);
295295
TableInfo vials = schema.getTable(SpecimenTablesProvider.SPECIMEN_DETAIL_TABLE_NAME);
296296
TableInfo specimens = schema.getTable(SpecimenTablesProvider.SPECIMEN_SUMMARY_TABLE_NAME);
297-
specimenBag.add("events", (int) new TableSelector(events).getRowCount());
298-
specimenBag.add("vials", (int) new TableSelector(vials).getRowCount());
299-
specimenBag.add("specimens", (int) new TableSelector(specimens).getRowCount());
297+
specimenMultiSet.add("events", (int) new TableSelector(events).getRowCount());
298+
specimenMultiSet.add("vials", (int) new TableSelector(vials).getRowCount());
299+
specimenMultiSet.add("specimens", (int) new TableSelector(specimens).getRowCount());
300300
}
301301

302302
if (settings.isEnableRequests())
303303
requestsEnabled.increment();
304304

305305
TableInfo locations = schema.getTable(SpecimenQuerySchema.LOCATION_TABLE_NAME);
306306
long locationCount = new TableSelector(locations).getRowCount();
307-
specimenBag.add("locations", (int) locationCount);
308-
specimenBag.add("locationsInUse", (int) new TableSelector(locations, new SimpleFilter(FieldKey.fromParts("In Use"), true), null).getRowCount());
307+
specimenMultiSet.add("locations", (int) locationCount);
308+
specimenMultiSet.add("locationsInUse", (int) new TableSelector(locations, new SimpleFilter(FieldKey.fromParts("In Use"), true), null).getRowCount());
309309
if (locationCount > 0)
310310
hasLocations.increment();
311311

312-
LOG.debug(specimenBag.toString());
312+
LOG.debug(specimenMultiSet.toString());
313313
});
314314

315-
Map<String, Object> specimensMap = specimenBag.uniqueSet().stream().collect(Collectors.toMap(s -> s, specimenBag::getCount));
315+
Map<String, Object> specimensMap = specimenMultiSet.uniqueSet().stream().collect(Collectors.toMap(s -> s, specimenMultiSet::getCount));
316316
Map<String, Object> requestsMap = new SqlSelector(SpecimenSchema.get().getSchema(), new SQLFragment("SELECT Label, COUNT(*) FROM study.SampleRequest INNER JOIN study.SampleRequestStatus srs ON StatusId = srs.RowId GROUP BY Label")).getValueMap(String.class);
317317
requestsMap.put("enabled", requestsEnabled);
318318
specimensMap.put("requests", requestsMap);

0 commit comments

Comments
 (0)