Revision 44801 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureExtraColumn.java

View differences:

DefaultFeatureExtraColumn.java
10 10
import org.apache.commons.lang3.StringUtils;
11 11
import org.gvsig.fmap.dal.DALLocator;
12 12
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor;
13
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
14 13
import org.gvsig.fmap.dal.feature.FeatureExtraColumn;
15 14

  
16 15
/**
......
19 18
 */
20 19
public class DefaultFeatureExtraColumn implements FeatureExtraColumn {
21 20

  
22
    private final List<EditableFeatureAttributeDescriptor> extraColumns;
21
    private List<EditableFeatureAttributeDescriptor> extraColumns;
23 22
    
24 23
    public DefaultFeatureExtraColumn() {
25 24
        this.extraColumns = new ArrayList();
......
93 92
    public void clear() {
94 93
        this.extraColumns.clear();
95 94
    }
95
    
96
    public FeatureExtraColumn getDeepCopy() {
97
        DefaultFeatureExtraColumn other = new DefaultFeatureExtraColumn();
98
        ArrayList otherCols = new ArrayList();
99
        for (EditableFeatureAttributeDescriptor extraColumn : this.extraColumns) {
100
            EditableFeatureAttributeDescriptor newAttr = DALLocator.getDataManager().createFeatureAttributeDescriptor();
101
            newAttr.copyFrom(extraColumn);
102
            otherCols.add(newAttr);
103
        }
104
        other.extraColumns = otherCols;
105
        return other;
106
    }
96 107

  
108
    @Override
109
    public FeatureExtraColumn getCopy() {
110
        DefaultFeatureExtraColumn other = new DefaultFeatureExtraColumn();
111
        ArrayList otherCols = new ArrayList();
112
        otherCols.addAll(extraColumns);
113
        other.extraColumns = otherCols;
114
        return other;
115
    }
116

  
97 117
}

Also available in: Unified diff