Revision 44111
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFetureStore.java | ||
---|---|---|
738 | 738 |
return null; |
739 | 739 |
} |
740 | 740 |
|
741 |
@Override |
|
742 |
public long getPendingChangesCount() { |
|
743 |
return 0; |
|
744 |
} |
|
745 |
|
|
741 | 746 |
} |
trunk/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/FeatureStore.java | ||
---|---|---|
914 | 914 |
* @param index |
915 | 915 |
* @return |
916 | 916 |
*/ |
917 |
SpatialIndex wrapSpatialIndex(SpatialIndex index); |
|
917 |
public SpatialIndex wrapSpatialIndex(SpatialIndex index);
|
|
918 | 918 |
|
919 | 919 |
public FeatureReference getFeatureReference(String code); |
920 |
|
|
921 |
/** |
|
922 |
* Devuelbe el numero de operaciones pendientes de guardar en una sesion |
|
923 |
* de edicion. Es un valor orientativo. |
|
924 |
* Las operaciones pendientes son la suma de operaciones de borrado, insercion |
|
925 |
* o modificacion de las features en una sesion de edicion. |
|
926 |
* |
|
927 |
* Retorna 0 si no esta en edicion. |
|
928 |
* |
|
929 |
* @return numero de operaciones pendientes. |
|
930 |
*/ |
|
931 |
public long getPendingChangesCount(); |
|
920 | 932 |
} |
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 | ||
---|---|---|
2924 | 2924 |
FeatureReference featureReference = new DefaultFeatureReference(this, code); |
2925 | 2925 |
return featureReference; |
2926 | 2926 |
} |
2927 |
|
|
2928 |
@Override |
|
2929 |
public long getPendingChangesCount() { |
|
2930 |
if( this.featureManager==null ) { |
|
2931 |
return 0; |
|
2932 |
} |
|
2933 |
return this.featureManager.getPendingChangesCount(); |
|
2934 |
} |
|
2935 |
|
|
2936 |
|
|
2927 | 2937 |
} |
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/editing/memory/FeatureManager.java | ||
---|---|---|
206 | 206 |
|
207 | 207 |
} |
208 | 208 |
|
209 |
public long getPendingChangesCount() { |
|
210 |
long count = 0; |
|
211 |
if( this.added!=null ) { |
|
212 |
count += this.added.size(); |
|
213 |
} |
|
214 |
if( this.deleted!=null ) { |
|
215 |
count += this.deleted.size(); |
|
216 |
} |
|
217 |
if( this.modifiedFromOriginal!=null ) { |
|
218 |
count += this.modifiedFromOriginal.size(); |
|
219 |
} |
|
220 |
return count; |
|
221 |
} |
|
222 |
|
|
209 | 223 |
private class DeletedIterator implements Iterator { |
210 | 224 |
|
211 | 225 |
private Boolean hasnext = null; |
Also available in: Unified diff