Revision 24526 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/impl/DefaultFeatureReferenceSelection.java

View differences:

DefaultFeatureReferenceSelection.java
138 138
        if (!reversed) {
139 139
            reverse();
140 140
        }
141
        selected.clear();
141
        clearFeatureReferences();
142 142
        if (getFeatureStore().isEditing()) {
143 143
            getCommands().endComplex();
144 144
        }
......
153 153
        if (reversed) {
154 154
            reverse();
155 155
        }
156
        selected.clear();
156
        clearFeatureReferences();
157 157
        if (getFeatureStore().isEditing()) {
158 158
            getCommands().endComplex();
159 159
        }
......
228 228
        }
229 229
    }
230 230

  
231
    /**
232
     * Returns the FeatureStore of the selected FeatureReferences.
233
     * 
234
     * @return the featureStore
235
     */
236
    protected DefaultFeatureStore getFeatureStore() {
237
        return featureStore;
238
    }
239

  
240 231
    public void loadState(PersistentState state) throws PersistenceException {
241 232
        state.set("reversed", reversed);
242 233
        state.set("totalSize", totalSize);
......
260 251
        return AbstractPersistenceManager.getState(this);
261 252
    }
262 253

  
263
    private long getFeatureStoreTotalSize() throws DataException {
264
        return getFeatureStore().getFeatureSet().getSize();
254
    /**
255
     * Removes all the stored FeatureRefence objects.
256
     */
257
    protected void clearFeatureReferences() {
258
        selected.clear();
265 259
    }
266 260

  
261
    /**
262
     * Returns the FeatureStore of the selected FeatureReferences.
263
     * 
264
     * @return the featureStore
265
     */
266
    protected DefaultFeatureStore getFeatureStore() {
267
        return featureStore;
268
    }
269

  
270
    /**
271
     * Returns if the selection is currently reversed.
272
     * 
273
     * @return if the selection is currently reversed
274
     */
275
    protected boolean isReversed() {
276
        return reversed;
277
    }
278

  
279
    /**
280
     * Returns the reference to the commands record.
281
     * 
282
     * @return the reference to the commands record
283
     */
267 284
    protected AbstractCommandsRecord getCommands() {
268 285
        try {
269 286
            return (AbstractCommandsRecord) getFeatureStore()
......
274 291
        }
275 292
    }
276 293

  
294
    private long getFeatureStoreTotalSize() throws DataException {
295
        return getFeatureStore().getFeatureSet().getSize();
296
    }
277 297
}

Also available in: Unified diff