Revision 23680 branches/v2_0_0_prep/libraries/libFMap_dataDB/src/org/gvsig/fmap/data/feature/db/jdbc/postgresqlbin/PostgresqlBinFeatureCollection.java
PostgresqlBinFeatureCollection.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.DBFeatureType; |
16 | 15 |
import org.gvsig.fmap.data.feature.db.jdbc.AbstractJDBCIterator; |
17 | 16 |
import org.gvsig.fmap.data.feature.db.jdbc.SQLException; |
17 |
import org.gvsig.tools.exception.BaseException; |
|
18 | 18 |
|
19 | 19 |
public class PostgresqlBinFeatureCollection extends DBDataFeatureCollection { |
20 | 20 |
protected DBFeatureType featureType; |
... | ... | |
121 | 121 |
|
122 | 122 |
} |
123 | 123 |
|
124 |
public Iterator iterator() { |
|
124 |
protected Iterator internalIterator(int index) { |
|
125 |
PostgresqlIterator dbfIter; |
|
126 |
try { |
|
127 |
dbfIter = new PostgresqlIterator(this.store, this.featureType, |
|
128 |
this.sql, this.fetchSize, index + 1); |
|
129 |
} catch (ReadException e) { |
|
130 |
throw new RuntimeException(e); |
|
131 |
} |
|
125 | 132 |
|
126 |
PostgresqlIterator dbfIter; |
|
127 |
try { |
|
128 |
dbfIter = new PostgresqlIterator(this.store, this.featureType, |
|
129 |
this.sql, this.fetchSize); |
|
130 |
} catch (ReadException e) { |
|
131 |
throw new RuntimeException(e); |
|
132 |
} |
|
133 |
return dbfIter; |
|
134 |
} |
|
133 | 135 |
|
134 |
return dbfIter; |
|
135 |
} |
|
136 |
|
|
137 | 136 |
protected class PostgresqlIterator extends AbstractJDBCIterator { |
138 | 137 |
private String cursorName = null; |
139 | 138 |
public PostgresqlIterator(PostgresqlBinStore store, |
140 |
DBFeatureType featureType, String sql, int fetchSize) |
|
139 |
DBFeatureType featureType, String sql, int fetchSize, |
|
140 |
int initialPosition) |
|
141 | 141 |
throws ReadException { |
142 |
super(store, featureType, sql, fetchSize, null, null); |
|
142 |
super(store, featureType, sql, fetchSize, null, null, |
|
143 |
initialPosition); |
|
143 | 144 |
|
144 | 145 |
} |
145 | 146 |
protected void createResulset() throws ReadException { |
Also available in: Unified diff