1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.portals.gems.browser;
18
19 import java.io.Serializable;
20 import java.util.Comparator;
21 import java.util.Iterator;
22 import java.util.List;
23
24 /***
25 * DatabaseBrowserPortlet
26 *
27 * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
28 * @version $Id: BrowserIterator.java 516448 2007-03-09 16:25:47Z ate $
29 */
30 public interface BrowserIterator extends Iterator, Comparator, Serializable
31 {
32
33 /***
34 * This method returns the index of the row to which the cursor is pointing
35 * at.
36 *
37 */
38 public int getTop();
39
40 /***
41 * This method returns the window size.
42 *
43 */
44 public int getWindowSize();
45
46 /***
47 * This method returns the last index of the row in the window displayed.
48 *
49 */
50 public int getBottom();
51
52 /***
53 * This method points the cursor to the index provided.
54 *
55 * @param start
56 * Index to which cursor should point to
57 */
58 public void setTop(int start);
59
60 /***
61 * This method returns the result set vector.
62 *
63 */
64 public List getResultSet();
65
66 /***
67 * This method returns the number of rows in the result set.
68 *
69 */
70 public int getResultSetSize();
71
72 /***
73 * This method returns the List containg the column labels of the result
74 * set.
75 *
76 */
77 public List getResultSetTitleList();
78
79 /***
80 * This method returns the List containg the Types of the columns the result
81 * set.
82 *
83 * @see java.sql.Types
84 */
85 public List getResultSetTypesList();
86
87 /***
88 * This method sorts the result set according to the value of the column as
89 * specified by the parameter column name. Changes the order of the result
90 * set vector. If it is called on the same columnName more than once it
91 * toggles the ordering ie first it will be ascending, then it will be
92 * descending, then ascending and so on.
93 *
94 * @param String
95 * sortColumnName
96 */
97 public void sort(String sortColumnName);
98
99 }