KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mckoi > database > jdbc > QueryResponse


1 /**
2  * com.mckoi.database.jdbc.QueryResponse 16 Aug 2000
3  *
4  * Mckoi SQL Database ( http://www.mckoi.com/database )
5  * Copyright (C) 2000, 2001, 2002 Diehl and Associates, Inc.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * Version 2 as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License Version 2 for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * Version 2 along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  *
20  * Change Log:
21  *
22  *
23  */

24
25 package com.mckoi.database.jdbc;
26
27 import com.mckoi.database.global.ColumnDescription;
28
29 /**
30  * The response to a query executed via the 'execQuery' method in the
31  * DatabaseInterface interface. This contains general information about the
32  * result of the query.
33  *
34  * @author Tobias Downer
35  */

36
37 public interface QueryResponse {
38
39   /**
40    * Returns a number that identifies this query within the set of queries
41    * executed on the connection. This is used for identifying this query
42    * in subsequent operations.
43    */

44   int getResultID();
45
46   /**
47    * The time, in milliseconds, that the query took to execute.
48    */

49   int getQueryTimeMillis();
50
51   /**
52    * The total number of rows in the query result. This is known ahead of
53    * time, even if no data in the query has been accessed.
54    */

55   int getRowCount();
56
57   /**
58    * The number of columns in the query result.
59    */

60   int getColumnCount();
61
62   /**
63    * The ColumnDescription object that describes column 'n' in the result. 0
64    * is the first column, 1 is the second column, etc.
65    */

66   ColumnDescription getColumnDescription(int column);
67
68   /**
69    * Returns any warnings about the query. If there were no warnings then
70    * this can return 'null'.
71    */

72   String JavaDoc getWarnings();
73
74 }
75
Popular Tags