Revision 23772 branches/v2_0_0_prep/libraries/libFMap_data/src/org/gvsig/fmap/data/feature/paging/FeaturePagingHelper.java

View differences:

FeaturePagingHelper.java
2 2
 *
3 3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4 4
 * of the Valencian Gobernment (CIT)
5
 * 
5
 *
6 6
 * This program is free software; you can redistribute it and/or
7 7
 * modify it under the terms of the GNU General Public License
8 8
 * as published by the Free Software Foundation; either version 2
9 9
 * of the License, or (at your option) any later version.
10
 * 
10
 *
11 11
 * This program is distributed in the hope that it will be useful,
12 12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 14
 * GNU General Public License for more details.
15
 * 
15
 *
16 16
 * You should have received a copy of the GNU General Public License
17 17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 19
 * MA  02110-1301, USA.
20
 * 
20
 *
21 21
 */
22 22

  
23 23
/*
......
31 31

  
32 32
/**
33 33
 * Helper interface to access the values of a FeatureCollection by position.
34
 * 
34
 *
35 35
 * @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
36 36
 */
37 37
public interface FeaturePagingHelper {
......
40 40

  
41 41
    /**
42 42
     * Returns the current maximum number of Features per page.
43
     * 
43
     *
44 44
     * @return the current maximum page size
45 45
     */
46 46
    int getMaxPageSize();
......
48 48
    /**
49 49
     * Sets the current maximum number of Features per page. As the page size
50 50
     * changes, the current page of data is reloaded.
51
     * 
51
     *
52 52
     * @param pageSize
53 53
     *            the maximum number of Feature per page
54 54
     */
......
57 57
    /**
58 58
     * Returns the number of pages available in the collection, calculated with
59 59
     * the total number of elements and the maximum number of elements per page.
60
     * 
60
     *
61 61
     * @return the number of pages available
62 62
     */
63 63
    int getNumPages();
64
    
64

  
65 65
    /**
66 66
     * Returns the number of the currently loaded page of Features (zero based).
67
     * 
67
     *
68 68
     * @return the current page number
69 69
     */
70 70
    int getCurrentPage();
71 71

  
72 72
    /**
73 73
     * Sets the current page number, and loads the Features for that page.
74
     * 
74
     *
75 75
     * @param page
76 76
     *            the page to load
77 77
     */
78 78
    void setCurrentPage(int page);
79
    
79

  
80 80
    /**
81 81
     * Returns the number of elements of the entire Collection.
82
     * 
82
     *
83 83
     * @return the number of elements
84 84
     */
85 85
    int getTotalSize();
86 86

  
87 87
    /**
88 88
     * Returns the Feature located at the index position.
89
     * 
89
     *
90 90
     * @param index
91 91
     *            to locate the Feature in the Collection
92 92
     * @return the Feature located at the index position
93 93
     */
94 94
    Feature getFeatureAt(int index);
95
    
95

  
96 96
    /**
97 97
     * Returns all the values of the current loaded page.
98
     * 
98
     *
99 99
     * @return all the values of the current loaded page
100 100
     */
101 101
    Feature[] getCurrentPageFeatures();
102 102

  
103 103
    /**
104 104
     * Returns the FeatureCollection used to fetch the data.
105
     * 
105
     *
106 106
     * @return the FeatureCollection
107 107
     */
108 108
    FeatureCollection getFeatureCollection();
109 109

  
110 110
    /**
111 111
     * Returns the FeatureStore used to fetch the data.
112
     * 
112
     *
113 113
     * @return the FeatureStore
114 114
     */
115 115
    FeatureStore getFeatureStore();
116 116

  
117 117
    /**
118 118
     * Returns the query used to load the Features.
119
     * 
119
     *
120 120
     * @return the query used to load the Features
121 121
     */
122 122
    FeatureQuery getFeatureQuery();
......
128 128

  
129 129
    /**
130 130
     * Reloads everything, using the current query.
131
     * 
131
     *
132 132
     * @throws ReadException
133 133
     */
134 134
    void reload() throws ReadException;

Also available in: Unified diff