From: <jma...@sv...> - 2005-04-27 20:54:30
|
Author: jmacgill Date: 2005-04-27 13:59:42 -0700 (Wed, 27 Apr 2005) New Revision: 13302 Modified: geotools/trunk/gt/module/main/src/org/geotools/data/AbstractFeatureSou= rce.java Log: also should now work if an added feature is modified Modified: geotools/trunk/gt/module/main/src/org/geotools/data/AbstractFea= tureSource.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- geotools/trunk/gt/module/main/src/org/geotools/data/AbstractFeatureSo= urce.java 2005-04-27 20:33:41 UTC (rev 13301) +++ geotools/trunk/gt/module/main/src/org/geotools/data/AbstractFeatureSo= urce.java 2005-04-27 20:59:42 UTC (rev 13302) @@ -17,8 +17,10 @@ package org.geotools.data; =20 import java.io.IOException; +import java.util.HashSet; import java.util.Iterator; import java.util.Map; +import java.util.Set; import java.util.logging.Logger; =20 import org.geotools.filter.Filter; @@ -227,11 +229,14 @@ if(t !=3D Transaction.AUTO_COMMIT){ Map diff =3D ((AbstractDataStore)dataStore).state(t).dif= f(namedQuery(query).getTypeName()); Iterator it =3D diff.keySet().iterator(); - =20 + Set newFIDs =3D new HashSet(); while(it.hasNext()){ Object fid =3D it.next(); + =20 if(fid.toString().startsWith("new")){ - delta++; + if(newFIDs.add(fid)){ + delta++; + } } else{ if(diff.get(fid)=3D=3Dnull){ delta--; |