Project

General

Profile

« Previous | Next » 

Revision 2368acec

Added by Andreas Müller almost 3 years ago

ref #9619 add conceptId, conceptDefinitions, conceptStatus, taxonTypes and currentConceptPeriod to Taxon

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/AvailableForTermBase.java
89 89
        }
90 90
    }
91 91

  
92
    /**
93
     * EnumSets being part of the model should be immutable to make hibernate know if they have been changed.
94
     * Therefore any change to the enum set should result in a new enum set.
95
     */
96
    protected EnumSet<CdmClass> newEnumSet(@NotNull EnumSet<CdmClass> enumSet, CdmClass additionalClass, CdmClass classToRemove) {
97
        EnumSet<CdmClass> result = EnumSet.copyOf(enumSet);
98
        if (additionalClass != null){
99
            result.add(additionalClass);
100
        }
101
        if (classToRemove != null){
102
            result.remove(classToRemove);
103
        }
104
        return result;
105
    }
106 92

  
107 93
}

Also available in: Unified diff