Revision 27234 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/paging/FeaturePagingHelper.java
FeaturePagingHelper.java | ||
---|---|---|
26 | 26 |
*/ |
27 | 27 |
package org.gvsig.fmap.dal.feature.paging; |
28 | 28 |
|
29 |
import java.util.Iterator; |
|
30 |
|
|
29 | 31 |
import org.gvsig.fmap.dal.exception.DataException; |
30 |
import org.gvsig.fmap.dal.feature.*; |
|
32 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
|
33 |
import org.gvsig.fmap.dal.feature.Feature; |
|
34 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
|
35 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
36 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
37 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
31 | 38 |
|
32 | 39 |
/** |
33 | 40 |
* Helper interface to access the values of a FeatureCollection by position. |
... | ... | |
48 | 55 |
/** |
49 | 56 |
* Sets the current maximum number of Features per page. As the page size |
50 | 57 |
* changes, the current page of data is reloaded. |
51 |
*
|
|
58 |
* |
|
52 | 59 |
* @param pageSize |
53 | 60 |
* the maximum number of Feature per page |
54 | 61 |
* @throws DataException |
... | ... | |
73 | 80 |
|
74 | 81 |
/** |
75 | 82 |
* Sets the current page number, and loads the Features for that page. |
76 |
*
|
|
83 |
* |
|
77 | 84 |
* @param page |
78 | 85 |
* the page to load |
79 | 86 |
* @throws DataException |
... | ... | |
83 | 90 |
|
84 | 91 |
/** |
85 | 92 |
* Returns the number of elements of the entire Collection. |
86 |
*
|
|
93 |
* |
|
87 | 94 |
* @return the number of elements |
88 | 95 |
* @throws DataException |
89 | 96 |
* if there is an error getting the total number of Features |
... | ... | |
92 | 99 |
|
93 | 100 |
/** |
94 | 101 |
* Returns the Feature located at the index position. |
95 |
*
|
|
102 |
* |
|
96 | 103 |
* @param index |
97 | 104 |
* to locate the Feature in the Collection |
98 | 105 |
* @return the Feature located at the index position |
... | ... | |
110 | 117 |
|
111 | 118 |
/** |
112 | 119 |
* Returns the FeatureSet used to fetch the data. |
113 |
*
|
|
120 |
* |
|
114 | 121 |
* @return the FeatureSet |
115 | 122 |
*/ |
116 | 123 |
FeatureSet getFeatureSet(); |
... | ... | |
124 | 131 |
|
125 | 132 |
/** |
126 | 133 |
* Returns the query used to load the Features. |
127 |
*
|
|
134 |
* |
|
128 | 135 |
* @return the query used to load the Features |
129 | 136 |
*/ |
130 | 137 |
FeatureQuery getFeatureQuery(); |
131 | 138 |
|
132 |
/** |
|
133 |
* Reloads the current page of data from the collection. |
|
134 |
* |
|
135 |
* @throws DataException |
|
136 |
* if there is an error reloading the current page |
|
137 |
*/ |
|
139 |
/** |
|
140 |
* Returns the FeatureType used of the data. |
|
141 |
* |
|
142 |
* @return the FeatureType of the data |
|
143 |
*/ |
|
144 |
FeatureType getFeatureType(); |
|
145 |
|
|
146 |
/** |
|
147 |
* Reloads the current page of data from the collection. |
|
148 |
* |
|
149 |
* @throws DataException |
|
150 |
* if there is an error reloading the current page |
|
151 |
*/ |
|
138 | 152 |
void reloadCurrentPage() throws DataException; |
139 | 153 |
|
140 | 154 |
/** |
141 | 155 |
* Reloads everything, using the current query. |
142 |
*
|
|
156 |
* |
|
143 | 157 |
* @throws DataException |
144 | 158 |
*/ |
145 | 159 |
void reload() throws DataException; |
160 |
|
|
161 |
/** |
|
162 |
* Updates a {@link Feature} with the given {@link EditableFeature} in the |
|
163 |
* current {@link FeatureSet}. <br> |
|
164 |
* |
|
165 |
* @param feature |
|
166 |
* an instance of {@link EditableFeature} with which to update |
|
167 |
* the associated {@link Feature}. |
|
168 |
* |
|
169 |
* @throws DataException |
|
170 |
* |
|
171 |
* @see {@link FeatureSet#update(EditableFeature)} |
|
172 |
* {@link FeaturePagingHelper#getFeatureSet()} |
|
173 |
*/ |
|
174 |
public void update(EditableFeature feature) throws DataException; |
|
175 |
|
|
176 |
/** |
|
177 |
* Deletes a {@link Feature} from current {@link FeatureSet}.<br> |
|
178 |
* |
|
179 |
* @param feature |
|
180 |
* the {@link Feature} to delete. |
|
181 |
* |
|
182 |
* @throws DataException |
|
183 |
* |
|
184 |
* @see {@link FeatureSet#delete(Feature)} |
|
185 |
* {@link FeaturePagingHelper#getFeatureSet()} |
|
186 |
*/ |
|
187 |
public void delete(Feature feature) throws DataException; |
|
188 |
|
|
189 |
/** |
|
190 |
* Inserts a new feature in this {@link FeatureSet}. It needs to be an |
|
191 |
* instance of {@link EditableFeature} as it has not been stored yet.<br> |
|
192 |
* |
|
193 |
* Any {@link Iterator} from this store that was still in use can will not |
|
194 |
* reflect this change. |
|
195 |
* |
|
196 |
* @param feature |
|
197 |
* the {@link EditableFeature} to insert. |
|
198 |
* |
|
199 |
* @throws DataException |
|
200 |
* |
|
201 |
* @see {@link FeatureSet#insert(EditableFeature)} |
|
202 |
* {@link FeaturePagingHelper#getFeatureSet()} |
|
203 |
*/ |
|
204 |
public void insert(EditableFeature feature) throws DataException; |
|
205 |
|
|
206 |
|
|
146 | 207 |
} |
Also available in: Unified diff