Project

General

Profile

task #9678

Remove Derived- and FieldUnitFacadeCacheStrategies

Added by Andreas Müller 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
06/25/2021
Due date:
% Done:

100%

Severity:
normal

Description

Cache strategies for FieldUnits and DerivedUnits are currently using the DerivedUnitFacadeCacheStrategy or DerivedUnitFacadeFieldUnitCacheStrategy.

This is problematic because

  1. these cache strategies are only available in cdmlib-service and therefore can be loaded only with workaround within the model classes.
  2. for units that have data that are against the facade contract an exception is thrown when trying to compute the titleCaches

We should implement cache strategies within cdmlib-model doing more or less the same as the facade cachestrategies. At some places the code can be much more simple then in the facade as the facade is intened to also be used for writing data which makes it much more complex.

This ticket is also a prerequisit for implementing the "identityCache" or "shortCache" for SpecimenOrObservationBase.


Related issues

Related to Edit - feature request #5952: Second cache field for specimen (identityCache) Closed 07/05/2016
Related to Edit - feature request #5951: Add collector, field number and collection to specimen search label New 07/05/2016
Related to Edit - task #9679: Formatter and update script for SpecimenOrObservationBase short cache New 06/25/2021
Related to Edit - bug #8517: SpecimenOrObservation: data from protected titleCache missig in portal pages Closed 09/03/2019
Related to Edit - feature request #5575: DNA Sample requires CacheStrategy Closed 02/18/2016
Related to Edit - feature request #5573: Cache Strategy for Media Specimen required Closed 02/18/2016
Related to Edit - bug #9683: Auto-initialize root bean Closed 06/28/2021
Related to Edit - bug #7904: DerivedUnitFacadeFieldUnitCacheStrategy.getCollectorAndFieldNumber() creates temporary Team objects which can not be garbage collected. Closed 11/13/2018

Associated revisions

Revision bd4c6676 (diff)
Added by Andreas Müller 4 months ago

ref #9678 implement cache strategies for field unit and derived unti within cdmlib model

Revision 111967be (diff)
Added by Andreas Müller 4 months ago

ref #9678 improve titleGeneration for derived units with empty field units

History

#1 Updated by Andreas Müller 4 months ago

#2 Updated by Andreas Müller 4 months ago

  • Related to feature request #5951: Add collector, field number and collection to specimen search label added

#3 Updated by Andreas Müller 4 months ago

  • Related to task #9679: Formatter and update script for SpecimenOrObservationBase short cache added

#4 Updated by Andreas Müller 4 months ago

  • Tags set to formatting

#5 Updated by Andreas Müller 4 months ago

  • Related to bug #8517: SpecimenOrObservation: data from protected titleCache missig in portal pages added

#6 Updated by Andreas Müller 4 months ago

#7 Updated by Andreas Müller 4 months ago

#8 Updated by Andreas Müller 4 months ago

  • Tags deleted (formatting)
  • Status changed from New to In Progress

Mostly implemented but there is still a test in vaadin that fails due to a lazy initialization exception when calling specimen.getTitleCache().

#9 Updated by Andreas Müller 4 months ago

  • Related to bug #9683: Auto-initialize root bean added

#10 Updated by Andreas Müller 4 months ago

  • Status changed from In Progress to Resolved

The failing test in vaadin is related to incorrect autoinitialization (#9683) which is fixed now. So this ticket should be resolved and is up for review.

#11 Updated by Andreas Müller 4 months ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100

I think we can close this ticket now. Also the failing test in dataportal is fixed now (mediaspecimen are shown there in typification context with short label as the MediaSpecimenDefaultCacheStrategy is used there now, which is correct).

However, we need to adapt all SpecimenOrObservationBase cachestrategies in a way that they have a long version and a short version which is related to the "identityCache" (#5952).

If anybody wants to review this ticket, please feel free to reopen.

#12 Updated by Andreas Müller 3 months ago

  • Related to bug #7904: DerivedUnitFacadeFieldUnitCacheStrategy.getCollectorAndFieldNumber() creates temporary Team objects which can not be garbage collected. added

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)