Project

General

Profile

Revision 03762d0f

ID03762d0f4ed6c2d738928b1a93c6477e3ec1fbd5
Parent 581deb02
Child 130bdaf8

Added by Patrick Plitzner over 1 year ago

ref #8242 Pass list of States to row wrapper

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/RowWrapperDTO.java
10 10
package eu.etaxonomy.cdm.api.service.dto;
11 11

  
12 12
import java.io.Serializable;
13
import java.util.ArrayList;
14
import java.util.Collection;
15 13
import java.util.HashMap;
14
import java.util.List;
16 15
import java.util.Map;
17 16
import java.util.Set;
18 17

  
......
77 76
        return descriptionElementBase;
78 77
    }
79 78

  
80
    public void setDataValueForFeature(Feature feature, Object newValue){
79
    public void setDataValueForFeature(Feature feature, List<State> states){
81 80
        /* Only CategoricalData is handled here because for QuantitativeData the value
82 81
         * is set in the ModifyListener of the swt.Text in the CellEditor
83 82
         * for each StatisticalMeasure. So no need to set it again here.
84 83
         */
85 84
        DescriptionElementBase descriptionElementBase = featureToElementMap.get(feature);
86
        if(descriptionElementBase!=null && descriptionElementBase.isInstanceOf(CategoricalData.class) && newValue instanceof Collection){
85
        if(descriptionElementBase!=null && descriptionElementBase.isInstanceOf(CategoricalData.class)){
87 86
            CategoricalData categoricalData = HibernateProxyHelper.deproxy(descriptionElementBase, CategoricalData.class);
88
            categoricalData.setStateDataOnly(new ArrayList<>((Collection<State>) newValue));
87
            categoricalData.setStateDataOnly(states);
89 88
        }
90 89
    }
91 90

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)