01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
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,
31: Serializable {
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: }
|