svn-gvsig-desktop / 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 / EditingManager.java @ 45696
History | View | Annotate | Download (2.43 KB)
1 | 43840 | jjdelcerro | |
---|---|---|---|
2 | package org.gvsig.fmap.dal.feature.impl; |
||
3 | |||
4 | import java.util.Iterator; |
||
5 | 43967 | jjdelcerro | import java.util.List; |
6 | 43840 | jjdelcerro | import org.gvsig.fmap.dal.exception.DataException; |
7 | import org.gvsig.fmap.dal.feature.Feature; |
||
8 | import org.gvsig.fmap.dal.feature.FeatureReference; |
||
9 | import org.gvsig.fmap.dal.feature.FeatureStore; |
||
10 | import org.gvsig.fmap.dal.feature.FeatureType; |
||
11 | 44871 | jjdelcerro | import org.gvsig.fmap.dal.feature.FeatureType.FeatureTypeChanged; |
12 | 43840 | jjdelcerro | import org.gvsig.fmap.dal.feature.spi.FeatureProvider; |
13 | |||
14 | |||
15 | public interface EditingManager { |
||
16 | 43841 | jjdelcerro | /*
|
17 | Este interface, con el tiempo deberia ir al SPI.
|
||
18 | |||
19 | Tendria que sustituir a:
|
||
20 | - FeatureManager
|
||
21 | - FeatureTypeManager
|
||
22 | - SpatialManager
|
||
23 | como mecanismos para guardar los datos mientras se esta en edicion.
|
||
24 | |||
25 | Habria que eliminar estos managers del DefaultFeatureStore y sustituirlos
|
||
26 | por este.
|
||
27 | |||
28 | En una primera implementacion, se mantendrian estos managers como parte interna
|
||
29 | de la implementacion del MemoryEditingManager.
|
||
30 | |||
31 | */
|
||
32 | 43840 | jjdelcerro | |
33 | public void dispose(); |
||
34 | |||
35 | public void delete(Feature feature); |
||
36 | |||
37 | 45521 | fdiaz | // public void delete(FeatureReference featureReference);
|
38 | 43840 | jjdelcerro | |
39 | public void add(Feature newFeature); |
||
40 | |||
41 | public int update(Feature newFeature, Feature oldFeature); |
||
42 | |||
43 | public int update(FeatureType type, FeatureType oldType); |
||
44 | |||
45 | public void restore(FeatureReference featureReference); |
||
46 | |||
47 | public void restore(FeatureReference featureReference, int code); |
||
48 | |||
49 | public void restore(String featureTypeId); |
||
50 | |||
51 | public void restore(String featureTypeId, int code); |
||
52 | |||
53 | public boolean isDeleted(Feature feature); |
||
54 | |||
55 | public boolean isDeleted(FeatureReference featureReference); |
||
56 | |||
57 | public boolean isDeleted(FeatureType type); |
||
58 | |||
59 | public boolean isDeleted(String featureTypeId); |
||
60 | |||
61 | public boolean isSelectionCompromised(); |
||
62 | |||
63 | 44871 | jjdelcerro | public Iterator<FeatureReference> getDeletedFeatures(); |
64 | 43840 | jjdelcerro | public Iterator<FeatureProvider> getInsertedFeatures(); |
65 | public Iterator<FeatureProvider> getUpdatedFeatures(); |
||
66 | |||
67 | 43967 | jjdelcerro | public List<FeatureTypeChanged> getFeatureTypesChanged() throws DataException; |
68 | 43840 | jjdelcerro | |
69 | public FeatureType getFeatureType(String id) throws DataException ; |
||
70 | |||
71 | public Feature getFeature(FeatureReference reference, FeatureStore store, FeatureType type) throws DataException; |
||
72 | |||
73 | |||
74 | /*
|
||
75 | it = featureTypeManager.newsIterator();
|
||
76 | |||
77 | position = expansionManager.update(type, oldType);
|
||
78 | |||
79 | expansionManager.restore(oldType.getId(),position);
|
||
80 | |||
81 | spatialManager.cancelModifies();
|
||
82 | */
|
||
83 | } |