Number of subsets and datasets
For each Accession
it would be useful to have quick access to the number of associated published subsets and datasets.
Extend AccessionId
with two new properties long subsets = 0, datasets = 0
.
When a subset/dataset is published, the count for accessions in the list is increased by 1. When it is unpublished, it is decreased by 1.
This must be a very fast SQL update.
Updating these counters should not touch the lastModifiedDate or version fields, but it should schedule a reindex of accessions affected.
Implement an admin function that will:
- Reset the counters to 0.
- Scan for subsets and increase the counts
- Scan for datasets and increase the counts.