Revision 47436 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/DefaultFeatureType.java

View differences:

DefaultFeatureType.java
116 116
    private FeatureExtraColumns extraColumns;
117 117
    protected boolean checkFeaturesAtFinishEditing;
118 118
    protected boolean checkFeaturesAtInsert;
119
    protected boolean fixed;
119 120

  
120 121
    public DefaultFeatureType() {
121 122
        // Usado en la persistencia.
......
133 134
        this.extraColumns = new DefaultFeatureExtraColumns();
134 135
        this.checkFeaturesAtFinishEditing = false;
135 136
        this.checkFeaturesAtInsert = true;
137
        this.fixed = false;
136 138
    }
137 139

  
138 140
    protected DefaultFeatureType(FeatureStore store, String id) {
......
190 192
        this.defaultTimeAttributeName = ft.defaultTimeAttributeName;
191 193
        this.defaultGeometryAttributeIndex = ft.defaultGeometryAttributeIndex;
192 194
        this.defaultTimeAttributeIndex = ft.defaultTimeAttributeIndex;
195
        this.fixed = false;
193 196
    }
194 197
    
195 198
    protected void copyFrom(DefaultFeatureType other, boolean copyAttributes) {
......
218 221
        }
219 222
        this.checkFeaturesAtFinishEditing = other.checkFeaturesAtFinishEditing;
220 223
        this.checkFeaturesAtInsert = other.checkFeaturesAtInsert;
224
        this.fixed = false;
221 225
    }
222 226
    
223 227
    protected DefaultFeatureAttributeDescriptor getCopyAttributeDescriptor(DefaultFeatureAttributeDescriptor src) {
......
438 442
    @Override
439 443
    public void setLabel(String label) {
440 444
        this.label = label;
445
        this.fixed = false;
441 446
    }
442 447

  
443 448
    @Override
......
452 457
    
453 458
    public void setExtraColumn(FeatureExtraColumns extraColumn) { //List<FeatureAttributeDescriptor> descriptors) {
454 459
          this.extraColumns = extraColumn;
460
        this.fixed = false;
455 461
    }
456 462

  
457 463
    @Override
......
988 994
    @Override
989 995
    public void setDescription(String description) {
990 996
        this.description = description;
997
        this.fixed = false;
991 998
    }
992 999

  
993 1000
    @Override
......
1058 1065
            fixAll();
1059 1066
        }
1060 1067
        this.defaultTimeAttributeIndex = attr.getIndex();
1068
        this.fixed = false;
1061 1069
    }
1062 1070

  
1063 1071
    protected void fixAll() {
1072
        if(this.fixed){
1073
            return; 
1074
       }
1064 1075
        int i = 0;
1065 1076
        Iterator iter = super.iterator();
1066 1077
        DefaultFeatureAttributeDescriptor attr;
......
1105 1116
            this.defaultTimeAttributeIndex = this.getIndex(this.defaultTimeAttributeName);
1106 1117
        }
1107 1118
        this.internalID = Long.toHexString(this.getCRC());
1119
        this.fixed = true;
1108 1120

  
1109 1121
    }
1110 1122

  
......
1136 1148
        } else {
1137 1149
            this.storeRef = new WeakReference(store);
1138 1150
        }
1151
        this.fixed = false;
1139 1152
    }
1140 1153

  
1141 1154
    @Override
......
1392 1405
                this.add(attr);
1393 1406
            }
1394 1407
        }
1408
        this.fixed = false;
1395 1409
    }
1396 1410
    
1397 1411
    private static class TheJsonSerializer implements JsonManager.JsonSerializer {

Also available in: Unified diff