View Javadoc

1   /*
2    * Copyright 2000-2001,2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.apache.jetspeed.portal.portlets.browser;
18  
19  import java.util.Iterator;
20  import java.util.List;
21  import java.util.Comparator;
22  import java.io.Serializable;
23  /***
24   * Browser Iterator Interface
25   *
26   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
27   * @version $Id: BrowserIterator.java,v 1.7 2004/02/23 03:26:43 jford Exp $
28   *
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 at.
35       *
36       */
37      public int getTop();
38      /***
39       * This method returns the window size.
40       *
41       */
42      public int getWindowSize();
43      /***
44       * This method returns the last index of the row in the window displayed.
45       *
46       */
47      public int getBottom();
48  
49      /***
50       * This method points the cursor to the index provided.
51       *
52       * @param start Index to which cursor should point to
53       */
54      public void setTop(int start);
55  
56      /***
57       * This method returns the result set vector.
58       *
59       */
60      public List getResultSet();
61  
62      /***
63       * This method returns the number of rows in the result set.
64       *
65       */
66      public int getResultSetSize();
67  
68      /***
69       * This method returns the List containg the column labels of the result set.
70       *
71       */
72      public List getResultSetTitleList();
73  
74      /***
75       * This method returns the List containg the Types of the columns the result set.
76       *
77       *@see java.sql.Types
78       */
79      public List getResultSetTypesList();
80  
81      /***
82       * This method sorts the result set according to the value of the column as
83       * specified by the parameter column name.
84       * Changes the order of the result set vector. If it is called on the same
85       * columnName more than once it toggles the ordering ie first it will be
86       * ascending, then it will be descending, then ascending and so on.
87       *
88       *@param String sortColumnName
89       */
90      public void sort(String sortColumnName);
91  
92  }