Project

General

Profile

« Previous | Next » 

Revision 9f6a56c9

Added by Andreas Müller almost 3 years ago

ref #9664 first implementation for TeamOrPersonBase.nomenclaturalTitleCache (update script still missing)

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/utils/ImportDeduplicationHelper.java
109 109
         }
110 110
         try {
111 111
             referenceMatcher.setMatchMode("title", MatchMode.EQUAL);
112
             teamMatcher.setMatchMode("nomenclaturalTitle", MatchMode.EQUAL_OR_SECOND_NULL);
112
             teamMatcher.setMatchMode("nomenclaturalTitleCache", MatchMode.EQUAL_OR_SECOND_NULL);
113 113
         } catch (MatchException e) {
114 114
             throw new RuntimeException(e);  //should not happen
115 115
         }
......
428 428
     */
429 429
    private <T extends TeamOrPersonBase<?>> void initAuthorTitleCaches(T author) {
430 430
        //NOTE: this is more or less redundant copy from CdmPreDataChangeListener
431
        String nomTitle = author.getNomenclaturalTitle();
431
        String nomTitle = author.getNomenclaturalTitleCache();
432 432
        if (author instanceof Team){
433 433
            Team team = (Team)author;
434 434
            //nomTitle is not necessarily cached when it is created
435
            team.setNomenclaturalTitle(nomTitle, team.isProtectedNomenclaturalTitleCache());
435
            team.setNomenclaturalTitleCache(nomTitle, team.isProtectedNomenclaturalTitleCache());
436 436
            String collectorCache = author.getCollectorTitleCache();
437 437
            if (! team.isProtectedCollectorTitleCache()){
438 438
                team.setCollectorTitleCache(collectorCache, false);

Also available in: Unified diff