Project

General

Profile

Revision 6a65a580

ID6a65a580cad6083475490a6e14b525cfd297673e
Parent 84046c2e
Child eefe8728

Added by Patrick Plitzner over 2 years ago

ref #7095 Fix convenience method for CategoricalData

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/CategoricalData.java
224 224
     * All existing state data are removed.
225 225
     * @return
226 226
     */
227
    @Transient
228 227
    public List<StateData> setStateDataOnly(List<State> states){
229
        this.stateData.clear();
230
        for (State state : states){
231
            StateData stateDate = StateData.NewInstance(state);
232
            this.stateData.add(stateDate);
228
        List<StateData> stateDataList = new ArrayList<>(getStateData());
229
        for (StateData stateData : stateDataList) {
230
            removeStateData(stateData);
231
        }
232
        for (State state : states) {
233
            addStateData(state);
233 234
        }
234 235
        return this.stateData;
235 236
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)