1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_sdbc_XResultSetMetaData_idl__
28#define __com_sun_star_sdbc_XResultSetMetaData_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_sdbc_SQLException_idl__
35#include <com/sun/star/sdbc/SQLException.idl>
36#endif
37
38 module com {  module sun {  module star {  module sdbc {
39
40
41/** can be used to find out about the types and properties
42	of the columns in a ResultSet.
43 */
44published interface XResultSetMetaData: com::sun::star::uno::XInterface
45{
46
47	/** returns the number of columns in this ResultSet.
48		@returns
49			the column count
50		@throws SQLException
51			if a database access error occurs.
52	 */
53	long getColumnCount() raises (SQLException);
54    //-------------------------------------------------------------------------
55
56	/** indicates whether the column is automatically numbered, thus read-only.
57		@param column
58			the first column is 1, the second is 2,
59		@returns
60			<TRUE/> if so
61		@throws SQLException
62			if a database access error occurs.
63	 */
64	boolean isAutoIncrement([in]long column) raises (SQLException);
65	//-------------------------------------------------------------------------
66
67	/** indicates whether a column's case matters.
68		@param column
69			the first column is 1, the second is 2,
70		@returns
71			<TRUE/> if so
72		@throws SQLException
73			if a database access error occurs.
74	 */
75	boolean isCaseSensitive([in]long column) raises (SQLException);
76	//-------------------------------------------------------------------------
77
78	/** indicates whether the column can be used in a where clause.
79		@param column
80			the first column is 1, the second is 2,
81		@returns
82			<TRUE/> if so
83		@throws SQLException
84			if a database access error occurs.
85	 */
86	boolean isSearchable([in]long column) raises (SQLException);
87	//-------------------------------------------------------------------------
88
89	/** indicates whether the column is a cash value.
90		@param column
91			the first column is 1, the second is 2,
92		@returns
93			<TRUE/> if so
94		@throws SQLException
95			if a database access error occurs.
96	 */
97	boolean isCurrency([in]long column) raises (SQLException);
98	//-------------------------------------------------------------------------
99
100	/** indicates the nullability of values in the designated column.@see com::sun::star::sdbc::ColumnValue
101		@param column
102			the first column is 1, the second is 2,
103		@returns
104			<TRUE/> if so
105		@throws SQLException
106			if a database access error occurs.
107	 */
108	long isNullable([in]long column) raises (SQLException);
109	//-------------------------------------------------------------------------
110
111	/** indicates whether values in the column are signed numbers.
112		@param column
113			the first column is 1, the second is 2,
114		@returns
115			<TRUE/> if so
116		@throws SQLException
117			if a database access error occurs.
118	 */
119	boolean isSigned([in]long column) raises (SQLException);
120	//-------------------------------------------------------------------------
121
122	/** indicates the column's normal max width in chars.
123		@param column
124			the first column is 1, the second is 2,
125		@returns
126			the normal maximum number of characters allowed as the width of the designated column
127		@throws SQLException
128			if a database access error occurs.
129	 */
130	long getColumnDisplaySize([in]long column) raises (SQLException);
131	//-------------------------------------------------------------------------
132
133	/** gets the suggested column title for use in printouts and
134		displays.
135		@param column
136			the first column is 1, the second is 2,
137		@returns
138			the suggested column title
139		@throws SQLException
140			if a database access error occurs.
141	 */
142	string getColumnLabel([in]long column) raises (SQLException);
143	//-------------------------------------------------------------------------
144
145	/** gets a column's name.
146		@param column
147			the first column is 1, the second is 2,
148		@returns
149			the column name
150		@throws SQLException
151			if a database access error occurs.
152	 */
153	string getColumnName([in]long column) raises (SQLException);
154	//-------------------------------------------------------------------------
155
156	/** gets a column's table's schema.
157		@param column
158			the first column is 1, the second is 2,
159		@returns
160			the schema name
161		@throws SQLException
162			if a database access error occurs.
163	 */
164	string getSchemaName([in]long column) raises (SQLException);
165	//-------------------------------------------------------------------------
166
167	/** gets a column's number of decimal digits.
168		@param column
169			the first column is 1, the second is 2,
170		@returns
171			precision
172		@throws SQLException
173			if a database access error occurs.
174	 */
175	long getPrecision([in]long column) raises (SQLException);
176	//-------------------------------------------------------------------------
177
178	/** gets a column's number of digits to right of the decimal point.
179		@param column
180			the first column is 1, the second is 2,
181		@returns
182			scale
183		@throws SQLException
184			if a database access error occurs.
185	 */
186	long getScale([in]long column) raises (SQLException);
187	//-------------------------------------------------------------------------
188
189	/** gets a column's table name.
190		@param column
191			the first column is 1, the second is 2,
192		@returns
193			the table name
194		@throws SQLException
195			if a database access error occurs.
196	 */
197	string getTableName([in]long column) raises (SQLException);
198	//-------------------------------------------------------------------------
199
200	/** gets a column's table's catalog name.
201		@param column
202			the first column is 1, the second is 2,
203		@returns
204			the catalog name
205		@throws SQLException
206			if a database access error occurs.
207	 */
208	string getCatalogName([in]long column) raises (SQLException);
209	//-------------------------------------------------------------------------
210
211	/** retrieves a column's SQL type.
212		@param column
213			the first column is 1, the second is 2,
214		@returns
215			the column type
216		@throws SQLException
217			if a database access error occurs.
218	 */
219	long getColumnType([in]long column) raises (SQLException);
220	//-------------------------------------------------------------------------
221
222	/** retrieves a column's database-specific type name.
223		@param column
224			the first column is 1, the second is 2,
225		@returns
226			the type name
227		@throws SQLException
228			if a database access error occurs.
229	 */
230	string getColumnTypeName([in]long column) raises (SQLException);
231	//-------------------------------------------------------------------------
232
233	/** indicates whether a column is definitely not writable.
234		@param column
235			the first column is 1, the second is 2,
236		@returns
237			<TRUE/> if so
238		@throws SQLException
239			if a database access error occurs.
240	 */
241	boolean isReadOnly([in]long column) raises (SQLException);
242	//-------------------------------------------------------------------------
243
244	/** indicates whether it is possible for a write on the column to succeed.
245		@param column
246			the first column is 1, the second is 2,
247		@returns
248			<TRUE/> if so
249		@throws SQLException
250			if a database access error occurs.
251	 */
252	boolean isWritable([in]long column) raises (SQLException);
253	//-------------------------------------------------------------------------
254
255	/** indicates whether a write on the column will definitely succeed.
256		@param column
257			the first column is 1, the second is 2,
258		@returns
259			<TRUE/> if so
260		@throws SQLException
261			if a database access error occurs.
262	 */
263	boolean isDefinitelyWritable([in]long column) raises (SQLException);
264	//-------------------------------------------------------------------------
265
266	/** returns the fully-qualified name of the service whose instances
267		are manufactured if the method
268		<member scope="com::sun::star::sdbc">XResultSet::.getObject()</member>
269		is called to retrieve a value from the column.
270		@param column
271			the first column is 1, the second is 2,
272		@returns
273			the service name
274		@throws SQLException
275			if a database access error occurs.
276	 */
277	string getColumnServiceName([in]long column) raises (SQLException);
278};
279
280//=============================================================================
281
282}; }; }; };
283
284/*===========================================================================
285===========================================================================*/
286#endif
287