KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > pentaho > core > connection > IPentahoResultSet


1 /*
2  * Copyright 2006 Pentaho Corporation. All rights reserved.
3  * This software was developed by Pentaho Corporation and is provided under the terms
4  * of the Mozilla Public License, Version 1.1, or any later version. You may not use
5  * this file except in compliance with the license. If you need a copy of the license,
6  * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
7  * BI Platform. The Initial Developer is Pentaho Corporation.
8  *
9  * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11  * the license for the specific language governing your rights and limitations.
12  *
13  * Created Aug 29, 2005
14  * @author wseyler
15  */

16
17 package org.pentaho.core.connection;
18
19 import org.pentaho.core.runtime.IDisposable;
20
21 /**
22  * Defines a set of result data, typically with definable rows and
23  * columns. Supports multi-dimensional data sets.
24  *
25  * @author wseyler
26  * @see IDisposable
27  *
28  */

29 public interface IPentahoResultSet extends IDisposable {
30     /**
31      * @return the Metadata object that resulted from the most recent query.
32      */

33     IPentahoMetaData getMetaData();
34
35     /**
36      * @return an object array that represents the data in each column of the
37      * next row.
38      */

39     Object JavaDoc[] next();
40
41     /**
42      * Moves the cursor to before the first row
43      *
44      */

45     void beforeFirst();
46
47     /**
48      * Close the query
49      */

50     void close();
51
52     /**
53      * Close the connection used by this result set
54      *
55      */

56     void closeConnection();
57
58     /**
59      * Indicates whether the result set is scrollable
60      *
61      * @return true if the resultset can be scrolled through.
62      */

63     public boolean isScrollable();
64
65     /**
66      * Returns the value of the specified row and the specified column from
67      * within the resultset.
68      *
69      * @param row
70      * the row index.
71      * @param column
72      * the column index.
73      * @return the value.
74      */

75     public Object JavaDoc getValueAt(int row, int column);
76
77     /**
78      * Get a rowCount from the resultset.
79      *
80      * @return the row count.
81      */

82     public int getRowCount();
83
84     /**
85      * Returns the rowCount from the result set.
86      *
87      * @return
88      */

89     public int getColumnCount();
90
91     /**
92      * Returns a memory copy of the results
93      *
94      * @return memory copy of the results
95      */

96     public IPentahoResultSet memoryCopy();
97
98     /**
99      * Get a column of data.
100      *
101      * @param column
102      * the zero based column number
103      * @return array represeting a column of data. 0th element is the first
104      * column
105      */

106     public Object JavaDoc[] getDataColumn(int column);
107
108     /**
109      * Get a specified row of data
110      *
111      * @param row
112      * the zero base row number
113      * @return array representing a row of data. 0th element is the top row
114      */

115     public Object JavaDoc[] getDataRow(int row);
116 }
117
Popular Tags