Revision 45276
branches/org.gvsig.desktop-cvsgis1/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 | ||
---|---|---|
1486 | 1486 |
@Override |
1487 | 1487 |
public void update(EditableFeature feature) |
1488 | 1488 |
throws DataException { |
1489 |
if ((feature).getSource() == null) {
|
|
1490 |
insert(feature);
|
|
1489 |
if (feature.isUpdatable()) {
|
|
1490 |
commands.update(feature, feature.getSource());
|
|
1491 | 1491 |
return; |
1492 | 1492 |
} |
1493 |
commands.update(feature, feature.getSource()); |
|
1493 |
// FIXME: Deberiamos lanzar aqui un error en lugar de hacer el insert. |
|
1494 |
// ?O lanzar un mensaje al log? |
|
1495 |
insert(feature); |
|
1494 | 1496 |
} |
1495 | 1497 |
|
1496 | 1498 |
synchronized public void doUpdate(EditableFeature feature, Feature oldFeature) |
branches/org.gvsig.desktop-cvsgis1/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/EditableFeature.java | ||
---|---|---|
39 | 39 |
* to the original Feature. This is the only way to edit a Feature. |
40 | 40 |
*/ |
41 | 41 |
public interface EditableFeature extends Feature { |
42 |
public boolean isUpdatable(); |
|
42 | 43 |
|
44 |
public void setUpdatable(boolean updatable); |
|
45 |
|
|
43 | 46 |
/** |
44 | 47 |
* Sets the value of an attribute given its name |
45 | 48 |
* @param name |
Also available in: Unified diff