Revision 23680 branches/v2_0_0_prep/libraries/libFMap_dataDB/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2FeatureCollectionEditing.java

View differences:

H2FeatureCollectionEditing.java
6 6
import java.util.ConcurrentModificationException;
7 7
import java.util.Iterator;
8 8

  
9
import org.gvsig.tools.exception.BaseException;
10 9
import org.gvsig.fmap.data.DataStore;
11 10
import org.gvsig.fmap.data.ReadException;
12 11
import org.gvsig.fmap.data.feature.Feature;
......
15 14
import org.gvsig.fmap.data.feature.db.DBDataFeatureCollection;
16 15
import org.gvsig.fmap.data.feature.db.DBFeatureType;
17 16
import org.gvsig.fmap.data.feature.db.jdbc.SQLException;
17
import org.gvsig.tools.exception.BaseException;
18 18

  
19 19
public class H2FeatureCollectionEditing extends DBDataFeatureCollection {
20 20
	protected DBFeatureType featureType;
......
94 94
	}
95 95

  
96 96

  
97
	public Iterator iterator() {
98
		checkModified();
99
		try{
100
			H2Iterator dbfIter = new H2Iterator(this.store, this.featureType,
101
					this.sql, this.fetchSize, this.featureManager);
102
			return dbfIter;
103
		} catch (BaseException e){
104
			throw new RuntimeException(e);
105
		}
97
	protected Iterator internalIterator(int index) {
98
        checkModified();
99
        try {
100
            H2Iterator dbfIter = new H2Iterator(this.store, this.featureType,
101
                    this.sql, this.fetchSize, this.featureManager, index + 1);
102
            return dbfIter;
103
        } catch (BaseException e) {
104
            throw new RuntimeException(e);
105
        }
106 106
	}
107
	
108
	protected class H2Iterator extends AbstractH2DBIterator {
107 109

  
108
	protected class H2Iterator extends AbstractH2DBIterator {
109 110
		public H2Iterator(H2Store store, DBFeatureType featureType, String sql,
110
				int fetchSize, FeatureManager featureManager)
111
				throws ReadException {
112
			super(store, featureType, sql, fetchSize, featureManager, null);
113
		}
111
                int fetchSize, FeatureManager featureManager,
112
                int initialPosition) throws ReadException {
113
            super(store, featureType, sql, fetchSize, featureManager, null,
114
                    initialPosition);
115
        }
114 116

  
115 117
		protected Feature createFeatureFromTheResulset() throws ReadException {
116 118
			return ((H2Store) this.store).createFeatureFromResulset(this.rs,

Also available in: Unified diff