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/DefaultEditableFeatureAttributeDescriptor.java

View differences:

DefaultEditableFeatureAttributeDescriptor.java
121 121
    public EditableFeatureAttributeDescriptor setAllowNull(boolean allowNull) {
122 122
        updateStrongChanges(this.allowNull, allowNull);
123 123
        this.allowNull = allowNull;
124
        this.setFixed(false);
124 125
        return this;
125 126
    }
126 127

  
......
136 137
    public EditableFeatureAttributeDescriptor setDataType(DataType dataType) {
137 138
        updateStrongChanges(this.dataType, dataType);
138 139
        this.dataType = dataType;
140
        this.setFixed(false);
139 141
        return this;
140 142
    }
141 143

  
142 144
    public EditableFeatureAttributeDescriptor setDataType(int type) {
143 145
        updateStrongChanges(this.dataType, type);
144 146
        this.dataType = ToolsLocator.getDataTypesManager().get(type);
147
        this.setFixed(false);
145 148
        return this;
146 149
    }
147 150

  
......
149 152
            Object defaultValue) {
150 153
        updateStrongChanges(this.defaultValue, defaultValue);
151 154
        this.defaultValue = defaultValue;
155
        this.setFixed(false);
152 156
        return this;
153 157
    }
154 158

  
......
160 164

  
161 165
    public EditableFeatureAttributeDescriptor setAvoidCachingAvailableValues(boolean avoidCachingAvailableValues) {
162 166
        this.avoidCachingAvailableValues = avoidCachingAvailableValues;
167
        this.setFixed(false);
163 168
        return this;
164 169
    }
165 170

  
166 171
    public EditableFeatureAttributeDescriptor setEvaluator(Evaluator evaluator) {
167 172
        updateStrongChanges(this.evaluator, evaluator);
168 173
        this.evaluator = evaluator;
174
        this.setFixed(false);
169 175
        return this;
170 176
    }
171 177

  
172 178
    @Override
173 179
    public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(FeatureAttributeEmulator featureAttributeEmulator) {
174 180
        this.featureAttributeEmulator = featureAttributeEmulator;
181
        this.setFixed(false);
175 182
        return this;
176 183
    }
177 184

  
......
204 211
            this.geometrySubType = Geometry.SUBTYPES.GEOM2D;
205 212
        }
206 213
        this.geomType = null;
214
        this.setFixed(false);
207 215
        return this;
208 216
    }
209 217

  
210 218
    public EditableFeatureAttributeDescriptor setGeometrySubType(int subType) {
211 219
        this.geometrySubType = subType;
212 220
        this.geomType = null;
221
        this.setFixed(false);
213 222
        return this;
214 223
    }
215 224

  
......
219 228
        this.geomType = geometryType;
220 229
        this.geometryType = this.geomType.getType();
221 230
        this.geometrySubType = this.geomType.getSubType();
231
        this.setFixed(false);
222 232
        return this;
223 233
    }
224 234

  
......
242 252
        int theGeomType = GeometryUtils.getGeometryType(xx[0]);
243 253
        int theGeomSubtype = GeometryUtils.getGeometrySubtype(xx[1]);
244 254
        this.setGeometryType(theGeomType, theGeomSubtype);
255
        this.setFixed(false);
245 256
        return this;
246 257
    }
247 258

  
......
250 261
        this.geometryType = type;
251 262
        this.geometrySubType = subType;
252 263
        this.geomType = null;
264
        this.setFixed(false);
253 265
        return this;
254 266
    }
255 267

  
......
258 270
            boolean isPrimaryKey) {
259 271
        updateStrongChanges(this.primaryKey, isPrimaryKey);
260 272
        this.primaryKey = isPrimaryKey;
273
        this.setFixed(false);
261 274
        return this;
262 275
    }
263 276

  
......
265 278
    public EditableFeatureAttributeDescriptor setIsReadOnly(boolean isReadOnly) {
266 279
        updateStrongChanges(this.readOnly, isReadOnly);
267 280
        this.readOnly = isReadOnly;
281
        this.setFixed(false);
268 282
        return this;
269 283
    }
270 284

  
......
272 286
            int maximumOccurrences) {
273 287
        updateStrongChanges(this.maximumOccurrences, maximumOccurrences);
274 288
        this.maximumOccurrences = maximumOccurrences;
289
        this.setFixed(false);
275 290
        return this;
276 291
    }
277 292

  
......
279 294
            int minimumOccurrences) {
280 295
        updateStrongChanges(this.minimumOccurrences, minimumOccurrences);
281 296
        this.minimumOccurrences = minimumOccurrences;
297
        this.setFixed(false);
282 298
        return this;
283 299
    }
284 300

  
......
297 313
        if (!isComputed()) {
298 314
            hasStrongChanges = true;
299 315
        }
316
        this.setFixed(false);
300 317
        return this;
301 318
    }
302 319

  
......
307 324
    public EditableFeatureAttributeDescriptor setObjectClass(Class theClass) {
308 325
        updateStrongChanges(this.objectClass, theClass);
309 326
        this.objectClass = theClass;
327
        this.setFixed(false);
310 328
        return this;
311 329
    }
312 330

  
......
314 332
    public EditableFeatureAttributeDescriptor setPrecision(int precision) {
315 333
        updateStrongChanges(this.precision, precision);
316 334
        this.precision = precision;
335
        this.setFixed(false);
317 336
        return this;
318 337
    }
319 338

  
......
323 342
        this.scale = scale;
324 343
        this.coerceContext = null;
325 344
        this.mathContext = null;
345
        this.setFixed(false);
326 346
        return this;
327 347
    }
328 348

  
......
330 350
    public EditableFeatureAttributeDescriptor setSRS(IProjection SRS) {
331 351
        updateStrongChanges(this.SRS, SRS);
332 352
        this.SRS = SRS;
353
        this.setFixed(false);
333 354
        return this;
334 355
    }
335 356

  
......
342 363
        SRS = SRS.replace('@', ':');
343 364
        IProjection proj = CRSFactory.getCRS(SRS);
344 365
        this.setSRS(proj);
366
        this.setFixed(false);
345 367
        return this;
346 368
    }
347 369

  
348 370
    public EditableFeatureAttributeDescriptor setInterval(Interval interval) {
349 371
        updateStrongChanges(this.getInterval(), interval);
350 372
        super.setInterval(interval);
373
        this.setFixed(false);
351 374
        return this;
352 375
    }
353 376

  
354 377
    public EditableFeatureAttributeDescriptor setSize(int size) {
355 378
        updateStrongChanges(this.size, size);
356 379
        this.size = size;
380
        this.setFixed(false);
357 381
        return this;
358 382
    }
359 383

  
......
373 397
            this.additionalInfo = new HashMap();
374 398
        }
375 399
        this.additionalInfo.put(infoName, value);
400
        this.setFixed(false);
376 401
        return this;
377 402
    }
378 403

  
......
381 406
//        if (isAutomatic) {
382 407
//            this.setReadOnly(true);
383 408
//        }
409
        this.setFixed(false);
384 410
        return this;
385 411
    }
386 412

  
387 413
    public EditableFeatureAttributeDescriptor setIsTime(boolean isTime) {
388 414
        updateStrongChanges(this.isTime, isTime);
389 415
        this.isTime = isTime;
416
        this.setFixed(false);
390 417
        return this;
391 418
    }
392 419

  
393 420
    public EditableFeatureAttributeDescriptor setDateFormat(DateFormat dateFormat) {
394 421
        this.dateFormat = dateFormat;
422
        this.setFixed(false);
395 423
        return this;
396 424
    }
397 425

  
398 426
    public EditableFeatureAttributeDescriptor setIsIndexed(boolean isIndexed) {
399 427
        updateStrongChanges(this.indexed, isIndexed);
400 428
        this.indexed = isIndexed;
429
        this.setFixed(false);
401 430
        return this;
402 431
    }
403 432

  
404 433
    public EditableFeatureAttributeDescriptor setAllowIndexDuplicateds(boolean allowDuplicateds) {
405 434
        updateStrongChanges(this.allowIndexDuplicateds, allowDuplicateds);
406 435
        this.allowIndexDuplicateds = allowDuplicateds;
436
        this.setFixed(false);
407 437
        return this;
408 438
    }
409 439

  
410 440
    public EditableFeatureAttributeDescriptor setIsIndexAscending(boolean ascending) {
411 441
        updateStrongChanges(this.isIndexAscending, ascending);
412 442
        this.isIndexAscending = ascending;
443
        this.setFixed(false);
413 444
        return this;
414 445
    }
415 446

  
416 447
    @Override
417 448
    public EditableFeatureAttributeDescriptor setDataProfileName(String dataProfile) {
418 449
        super.setDataProfileName(dataProfile);
450
        this.setFixed(false);
419 451
        return this;
420 452
    }
421 453

  
......
470 502
        }
471 503
        this.coerceContext = null;
472 504
        this.mathContext = null;
505
        this.setFixed(false);
473 506
        return this;
474 507
    }
475 508

  
......
484 517
            return this.setLocale(l);
485 518
        } catch (Exception ex) {
486 519
            return this.setLocale((Locale) null);
520
        } finally {
521
            this.setFixed(false);
487 522
        }
488 523
    }
489 524

  
......
505 540
            default:
506 541
                throw new IllegalArgumentException("round mode '" + roundMode + "' not valid.");
507 542
        }
543
        this.setFixed(false);
508 544
        return this;
509 545
    }
510 546

  
......
659 695
            default:
660 696
                throw new IllegalArgumentException("Name attribute '" + name + "' not valid.");
661 697
        }
698
        this.setFixed(false);
662 699
        return this;
663 700
    }
664 701

  
......
693 730
    @Override
694 731
    public EditableFeatureAttributeDescriptor setDisplaySize(int size) {
695 732
        this.displaySize = size;
733
        this.setFixed(false);
696 734
        return this;
697 735
    }
698 736

  
......
750 788
        } else {
751 789
            this.foreingKey = null;
752 790
        }
791
        this.setFixed(false);
753 792
        return this;
754 793
    }
755 794

  
756 795
    @Override
757 796
    public EditableFeatureAttributeDescriptor setTag(String name, Object value) {
758 797
        this.getTags().set(name, value);
798
        this.setFixed(false);
759 799
        return this;
760 800
    }
761 801

  
......
766 806
    @Override
767 807
    public EditableFeatureAttributeDescriptor setDefaultFormat(String format) {
768 808
        this.defaultFormat = format;
809
        this.setFixed(false);
769 810
        return this;
770 811
    }
771 812

  

Also available in: Unified diff