Project

General

Profile

Revision bfa30d38

IDbfa30d386a174253ec596a813640d48d2933f834
Parent 5d2a77b2
Child e11d18c9

Added by Andreas Müller 3 months ago

ref #8030 add tests for nameService (not yet finished) and fixing updateCache handling in TaxonName

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/TaxonName.java
3592 3592
        //updates the authorship cache if necessary and via the listener updates all higher caches
3593 3593
        if (protectedAuthorshipCache == false){
3594 3594
            String oldCache = this.authorshipCache;
3595
            String newCache = this.getAuthorshipCache();
3595
            String newCache = cacheStrategy.getAuthorshipCache(this);
3596 3596
            if (!CdmUtils.nullSafeEqual(oldCache, newCache)){
3597
                this.setAuthorshipCache(this.getAuthorshipCache(), false);
3597
                this.setAuthorshipCache(null, false);
3598
                this.getAuthorshipCache();
3598 3599
                return true;
3599 3600
            }
3600 3601
        }
......
3608 3609
        //updates the name cache if necessary and via the listener updates all higher caches
3609 3610
        if (protectedNameCache == false){
3610 3611
            String oldCache = this.nameCache;
3611
            String newCache = this.getNameCache();
3612
            String newCache = cacheStrategy.getNameCache(this);
3612 3613
            if (!CdmUtils.nullSafeEqual(oldCache, newCache)){
3613
                this.setNameCache(this.getNameCache(), false);
3614
                this.setNameCache(null, false);
3615
                this.getNameCache();
3614 3616
                return true;
3615 3617
            }
3616 3618
        }
......
3624 3626
    private boolean updateFullTitleCache() {
3625 3627
        if (protectedFullTitleCache == false){
3626 3628
            String oldCache = this.fullTitleCache;
3627
            String newCache = this.getFullTitleCache();
3629
            String newCache = cacheStrategy.getFullTitleCache(this);
3628 3630
            if (!CdmUtils.nullSafeEqual(oldCache, newCache)){
3629
                this.setFullTitleCache(this.getFullTitleCache(), false);
3631
                this.setFullTitleCache(null, false);
3632
                this.getFullTitleCache();
3630 3633
                return true;
3631 3634
            }
3632 3635
        }
......
3642 3645
     * modifying only some of the attributes.<BR><BR>
3643 3646
     * Usages of this name in a taxon concept are <b>not</b> cloned.<BR>
3644 3647
     * <b>The name gets a newly created homotypical group</b><BR>
3645
     * (CAUTION: this behaviour needs to be discussed and may change in future).<BR><BR>
3648
     * (CAUTION: this behavior needs to be discussed and may change in future).<BR><BR>
3646 3649
     * {@link TaxonNameDescription Name descriptions} are cloned and not reused.<BR>
3647 3650
     * {@link TypeDesignationBase Type designations} are cloned and not reused.<BR>
3648 3651
     *

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)