Revision 43358 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/IndexFeatureSet.java
IndexFeatureSet.java | ||
---|---|---|
30 | 30 |
import java.util.Iterator; |
31 | 31 |
import java.util.List; |
32 | 32 |
|
33 |
import org.gvsig.fmap.dal.DataStore; |
|
34 | 33 |
import org.gvsig.fmap.dal.exception.DataException; |
35 | 34 |
import org.gvsig.fmap.dal.exception.ReadRuntimeException; |
36 | 35 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
... | ... | |
39 | 38 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
40 | 39 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
41 | 40 |
import org.gvsig.fmap.dal.feature.FeatureType; |
42 |
import org.gvsig.fmap.dal.feature.impl.dynobjectutils.DynObjectSetFeatureSetFacade; |
|
43 | 41 |
import org.gvsig.fmap.dal.feature.impl.featureset.AbstractFeatureSet; |
44 | 42 |
import org.gvsig.fmap.dal.feature.spi.FeatureProvider; |
45 | 43 |
import org.gvsig.fmap.dal.feature.spi.FeatureReferenceProviderServices; |
... | ... | |
49 | 47 |
import org.gvsig.fmap.dal.feature.spi.LongList; |
50 | 48 |
import org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProviderServices; |
51 | 49 |
import org.gvsig.tools.dispose.DisposableIterator; |
52 |
import org.gvsig.tools.dynobject.DynObjectSet; |
|
53 |
import org.gvsig.tools.exception.BaseException; |
|
54 |
import org.gvsig.tools.visitor.Visitor; |
|
55 | 50 |
|
56 | 51 |
public class IndexFeatureSet |
57 | 52 |
extends AbstractFeatureSet |
... | ... | |
155 | 150 |
return false; |
156 | 151 |
} |
157 | 152 |
|
158 |
public DisposableIterator fastIterator(long index) throws DataException { |
|
159 |
if (store.getFeatureStore().isEditing()) { |
|
160 |
return this.iterator(index); |
|
161 |
} |
|
162 |
return new FastIndexIterator(this.featureReferences.iterator(index)); |
|
163 |
} |
|
153 |
public DisposableIterator fastIterator(long index) throws DataException { |
|
154 |
return fastIterator(index, 0); |
|
155 |
} |
|
164 | 156 |
|
157 |
public DisposableIterator fastIterator(long index, long elements) throws DataException { |
|
158 |
if (store.getFeatureStore().isEditing()) { |
|
159 |
return this.iterator(index, elements); |
|
160 |
} |
|
161 |
return new FastIndexIterator(this.featureReferences.iterator(index)); |
|
162 |
} |
|
163 |
|
|
164 |
|
|
165 | 165 |
public long getSize() throws DataException { |
166 | 166 |
return featureReferences.getSize(); |
167 | 167 |
} |
... | ... | |
174 | 174 |
return new IndexIterator(this.featureReferences.iterator(index)); |
175 | 175 |
} |
176 | 176 |
|
177 |
public DisposableIterator iterator(long index, long elements) throws DataException { |
|
178 |
return new IndexIterator(this.featureReferences.iterator(index)); |
|
179 |
} |
|
180 |
|
|
177 | 181 |
public void delete(Feature feature) throws DataException { |
178 | 182 |
index.delete(feature); |
179 | 183 |
store.getFeatureStore().delete(feature); |
Also available in: Unified diff