Revision 46714 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/DefaultFeatureStore.java

View differences:

DefaultFeatureStore.java
1343 1343
    synchronized public void edit(int mode) throws DataException {
1344 1344
        LOGGER.debug("Starting editing in mode: {}", mode);
1345 1345
        FeatureType ftype = this.getDefaultFeatureType();
1346
        if(!ftype.supportReferences()){
1347
            throw new UnsupportedOperationException("Can't edit store without references support.");
1348
        }
1349 1346
        String newSessionCode = this.createUniqueID();
1350 1347
        try {
1351 1348
            if (this.mode != MODE_QUERY) {
......
1359 1356
                    throw new IllegalStateException(this.getName());
1360 1357

  
1361 1358
                case MODE_FULLEDIT:
1362
                    if (!this.transforms.isEmpty()) {
1359
                   if (!this.transforms.isEmpty()) {
1363 1360
                        throw new IllegalStateException(this.getName());
1364 1361
                    }
1365 1362
                    if (notifyChange(FeatureStoreNotification.BEFORE_STARTEDITING,
......
1768 1765
                notifyChange(FeatureStoreNotification.AFTER_UPDATE, feature);
1769 1766
                break;
1770 1767
            case MODE_FULLEDIT:
1768
                if(!feature.getType().supportReferences()){
1769
                    throw new UnsupportedOperationException("Can't update store in full edit mode without references support.");
1770
                }
1771 1771
                if (feature.isUpdatable()) {
1772 1772
                    commands.update(feature, feature.getSource());
1773 1773
                    return;

Also available in: Unified diff