Revision 45403
branches/org.gvsig.desktop-cvsgis1/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 | ||
---|---|---|
40 | 40 |
import org.gvsig.tools.resourcesstorage.ResourcesStorage; |
41 | 41 |
import org.gvsig.tools.resourcesstorage.EmptyResourcesStorage; |
42 | 42 |
import org.gvsig.tools.util.GetItemWithSizeAndIterator64; |
43 |
import org.gvsig.tools.util.GetItemWithSizeIsEmptyAndIterator64; |
|
43 | 44 |
import org.gvsig.tools.util.UnmodifiableBasicMap; |
44 | 45 |
import org.gvsig.tools.visitor.Visitor; |
45 | 46 |
|
... | ... | |
859 | 860 |
} |
860 | 861 |
|
861 | 862 |
@Override |
862 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64() { |
|
863 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64() {
|
|
863 | 864 |
return this.getFeatures64(null, -1); |
864 | 865 |
} |
865 | 866 |
|
866 | 867 |
@Override |
867 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64(String filter) { |
|
868 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(String filter) {
|
|
868 | 869 |
return this.getFeatures64(filter, null, true); |
869 | 870 |
} |
870 | 871 |
|
871 | 872 |
@Override |
872 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64(String filter, String sortBy, boolean asc) { |
|
873 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(String filter, String sortBy, boolean asc) {
|
|
873 | 874 |
FeatureQuery query = this.createFeatureQuery(filter, sortBy, asc); |
874 | 875 |
return this.getFeatures64(query, -1); |
875 | 876 |
} |
876 | 877 |
|
877 | 878 |
@Override |
878 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64(FeatureQuery query, int pageSize) { |
|
879 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(FeatureQuery query, int pageSize) {
|
|
879 | 880 |
return null; |
880 | 881 |
} |
881 | 882 |
|
branches/org.gvsig.desktop-cvsgis1/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/paging/FeaturePagingHelper.java | ||
---|---|---|
39 | 39 |
import org.gvsig.tools.dispose.Disposable; |
40 | 40 |
import org.gvsig.tools.dynobject.DynObjectPagingHelper; |
41 | 41 |
import org.gvsig.tools.exception.BaseException; |
42 |
import org.gvsig.tools.util.GetItemWithSizeAndIterator64; |
|
42 |
import org.gvsig.tools.util.GetItemWithSizeIsEmptyAndIterator64;
|
|
43 | 43 |
|
44 | 44 |
/** |
45 | 45 |
* Helper interface to access the values of a FeatureCollection by position. |
46 | 46 |
* |
47 | 47 |
* @author gvSIG team |
48 | 48 |
*/ |
49 |
public interface FeaturePagingHelper extends DynObjectPagingHelper, Disposable, GetItemWithSizeAndIterator64<Feature> { |
|
49 |
public interface FeaturePagingHelper extends DynObjectPagingHelper, Disposable, GetItemWithSizeIsEmptyAndIterator64<Feature> {
|
|
50 | 50 |
|
51 | 51 |
/** |
52 | 52 |
* Returns the Feature located at the index position. |
... | ... | |
129 | 129 |
|
130 | 130 |
/** |
131 | 131 |
* Sets that the selected Features get returned first. |
132 |
* @param selectionUp |
|
132 | 133 |
*/ |
133 | 134 |
void setSelectionUp(boolean selectionUp); |
134 | 135 |
|
... | ... | |
152 | 153 |
|
153 | 154 |
public void setSelection(FeatureSelection selection); |
154 | 155 |
|
156 |
@Override |
|
155 | 157 |
public boolean isEmpty(); |
156 | 158 |
|
157 | 159 |
public FeatureSet getFeatureSet(); |
branches/org.gvsig.desktop-cvsgis1/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 | ||
---|---|---|
47 | 47 |
import org.gvsig.tools.observer.Observer; |
48 | 48 |
import org.gvsig.tools.undo.UndoRedoStack; |
49 | 49 |
import org.gvsig.tools.util.GetItemWithSizeAndIterator64; |
50 |
import org.gvsig.tools.util.GetItemWithSizeIsEmptyAndIterator64; |
|
50 | 51 |
import org.gvsig.tools.util.PropertiesSupport; |
51 | 52 |
import org.gvsig.tools.util.Size64; |
52 | 53 |
import org.gvsig.tools.util.UnmodifiableBasicList64; |
... | ... | |
506 | 507 |
*/ |
507 | 508 |
public List<Feature> getFeatures(Expression filter, String sortBy, boolean asc); |
508 | 509 |
|
509 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64(); |
|
510 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64();
|
|
510 | 511 |
|
511 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64(String filter); |
|
512 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(String filter);
|
|
512 | 513 |
|
513 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64(String filter, String sortBy, boolean asc); |
|
514 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(String filter, String sortBy, boolean asc);
|
|
514 | 515 |
|
515 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64(FeatureQuery query, int pageSize); |
|
516 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(FeatureQuery query, int pageSize);
|
|
516 | 517 |
|
517 | 518 |
/** |
518 | 519 |
* Return the first {@link Feature} of the store. |
branches/org.gvsig.desktop-cvsgis1/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 | ||
---|---|---|
175 | 175 |
import org.gvsig.tools.resourcesstorage.ResourcesStorage; |
176 | 176 |
import org.gvsig.tools.util.GetItemWithSize64; |
177 | 177 |
import org.gvsig.tools.util.GetItemWithSizeAndIterator64; |
178 |
import org.gvsig.tools.util.GetItemWithSizeIsEmptyAndIterator64; |
|
178 | 179 |
import org.gvsig.tools.util.PropertiesSupportHelper; |
179 | 180 |
import org.gvsig.tools.util.UnmodifiableBasicMap; |
180 | 181 |
import org.gvsig.tools.visitor.VisitCanceledException; |
... | ... | |
2180 | 2181 |
} |
2181 | 2182 |
|
2182 | 2183 |
@Override |
2183 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64() { |
|
2184 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64() {
|
|
2184 | 2185 |
return this.getFeatures64(null, 0); |
2185 | 2186 |
} |
2186 | 2187 |
|
2187 | 2188 |
@Override |
2188 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64(String filter) { |
|
2189 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(String filter) {
|
|
2189 | 2190 |
return this.getFeatures64(filter, null, true); |
2190 | 2191 |
} |
2191 | 2192 |
|
2192 | 2193 |
@Override |
2193 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64(String filter, String sortBy, boolean asc) { |
|
2194 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(String filter, String sortBy, boolean asc) {
|
|
2194 | 2195 |
FeatureQuery query = this.createFeatureQuery(filter, sortBy, asc); |
2195 | 2196 |
return this.getFeatures64(query, 0); |
2196 | 2197 |
} |
2197 | 2198 |
|
2198 | 2199 |
@Override |
2199 |
public GetItemWithSizeAndIterator64<Feature> getFeatures64(FeatureQuery query, int pageSize) { |
|
2200 |
public GetItemWithSizeIsEmptyAndIterator64<Feature> getFeatures64(FeatureQuery query, int pageSize) {
|
|
2200 | 2201 |
try { |
2201 | 2202 |
if( pageSize<=0 ) { |
2202 | 2203 |
pageSize = 100; |
Also available in: Unified diff