Revision 43966 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/DefaultEditableFeatureType.java

View differences:

DefaultEditableFeatureType.java
230 230
    public EditableFeatureAttributeDescriptor add(String name, String type, int size) {
231 231
        return this.add(name,ToolsLocator.getDataTypesManager().getType(type), size);
232 232
    }
233

  
234
    public Object removeAttributeDescriptor(String name) {
235
//    Hemos metido los metodos removeAttributeDescriptor ya que existe
236
//    un problema desde python al llamar a los metodos remove. En lugar de llamar
237
//    a estos metodos remove, llama a los de la superclase ArrayList.
238
        return this.remove(name);
239
    }
233 240
    
241
    public boolean removeAttributeDescriptor(EditableFeatureAttributeDescriptor attribute) {
242
        return this.remove(attribute);
243
    }
244
    
245
    @Override
234 246
    public Object remove(String name) {
235 247
        DefaultFeatureAttributeDescriptor attr = (DefaultFeatureAttributeDescriptor) this
236 248
                .get(name);
......
247 259
    }
248 260

  
249 261
    @Override
262
    public boolean remove(EditableFeatureAttributeDescriptor attribute) {
263
        if (attribute.getEvaluator() != null) {
264
            hasStrongChanges = true;
265
        }
266
        if (!super.remove(attribute)) {
267
            return false;
268
        }
269
        this.pk = null;
270
        this.fixAll();
271
        return true;
272
    }
273

  
274
    @Override
250 275
    protected void fixAll() {
251 276
        super.fixAll();
252 277
    }
......
272 297
        }
273 298
    }
274 299

  
275
    public boolean remove(EditableFeatureAttributeDescriptor attribute) {
276
        if (attribute.getEvaluator() != null) {
277
            hasStrongChanges = true;
278
        }
279
        if (!super.remove(attribute)) {
280
            return false;
281
        }
282
        this.fixAll();
283
        return true;
284
    }
285

  
286 300
    @Override
287 301
    public void setDefaultGeometryType(int type, int subType) {
288 302
        DefaultEditableFeatureType descr = (DefaultEditableFeatureType)this.getDefaultGeometryAttribute();

Also available in: Unified diff