Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / sdbc / XRow.idl
blob48079f73e6db84edc03bff509e655e5ec61ef02c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XRow.idl,v $
10 * $Revision: 1.12 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_sdbc_XRow_idl__
31 #define __com_sun_star_sdbc_XRow_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_util_Date_idl__
38 #include <com/sun/star/util/Date.idl>
39 #endif
41 #ifndef __com_sun_star_util_DateTime_idl__
42 #include <com/sun/star/util/DateTime.idl>
43 #endif
45 #ifndef __com_sun_star_util_Time_idl__
46 #include <com/sun/star/util/Time.idl>
47 #endif
49 module com { module sun { module star { module io {
50 published interface XInputStream;
51 };};};};
53 module com { module sun { module star { module container {
54 published interface XNameAccess;
55 };};};};
57 #ifndef __com_sun_star_sdbc_SQLException_idl__
58 #include <com/sun/star/sdbc/SQLException.idl>
59 #endif
61 module com { module sun { module star { module sdbc {
63 published interface XRef;
64 published interface XArray;
65 published interface XBlob;
66 published interface XClob;
69 /** is used to access data which is collected in a row.
70 All methods raise a
71 <type scope="com::sun::star::sdbc">SQLException</type>
72 if a database access error occurs.
74 published interface XRow: com::sun::star::uno::XInterface
76 //-------------------------------------------------------------------------
78 /** reports whether the last column read had a value of SQL NULL.
79 Note that you must first call getXXX on a column to try to read
80 its value and then call wasNull() to see if the value read was
81 SQL NULL.
83 @returns
84 <TRUE/> if last column read was SQL NULL and <FALSE/> otherwise
85 @throws SQLException
86 if a database access error occurs.
88 boolean wasNull() raises (SQLException);
89 //-------------------------------------------------------------------------
91 /** gets the value of a column in the current row as a string.
92 @param columnIndex
93 the first column is 1, the second is 2,
94 @returns
95 the column value; if the value is SQL NULL, the result is null
96 @throws SQLException
97 if a database access error occurs.
99 string getString([in]long columnIndex) raises (SQLException);
100 //-------------------------------------------------------------------------
102 /** gets the value of a column in the current row as boolean.
103 @param columnIndex
104 the first column is 1, the second is 2,
105 @returns
106 the column value; if the value is SQL NULL, the result is null
107 @throws SQLException
108 if a database access error occurs.
110 boolean getBoolean([in]long columnIndex) raises (SQLException);
111 //-------------------------------------------------------------------------
113 /** get the value of a column in the current row as a byte.
114 @param columnIndex
115 the first column is 1, the second is 2,
116 @returns
117 the column value; if the value is SQL NULL, the result is null
118 @throws SQLException
119 if a database access error occurs.
121 byte getByte([in]long columnIndex) raises (SQLException);
122 //-------------------------------------------------------------------------
124 /** gets the value of a column in the current row as a short.
125 @param columnIndex
126 the first column is 1, the second is 2,
127 @returns
128 the column value; if the value is SQL NULL, the result is null
129 @throws SQLException
130 if a database access error occurs.
132 short getShort([in]long columnIndex) raises (SQLException);
133 //-------------------------------------------------------------------------
135 /** get the value of a column in the current row as an integer.
136 @param columnIndex
137 the first column is 1, the second is 2,
138 @returns
139 the column value; if the value is SQL NULL, the result is null
140 @throws SQLException
141 if a database access error occurs.
143 long getInt([in]long columnIndex) raises (SQLException);
144 //-------------------------------------------------------------------------
146 /** get the value of a column in the current row as a long.
147 @param columnIndex
148 the first column is 1, the second is 2,
149 @returns
150 the column value; if the value is SQL NULL, the result is null
151 @throws SQLException
152 if a database access error occurs.
154 hyper getLong([in]long columnIndex) raises (SQLException);
155 //-------------------------------------------------------------------------
157 /** gets the value of a column in the current row as a float.
158 @param columnIndex
159 the first column is 1, the second is 2,
160 @returns
161 the column value; if the value is SQL NULL, the result is null
162 @throws SQLException
163 if a database access error occurs.
165 float getFloat([in]long columnIndex) raises (SQLException);
166 //-------------------------------------------------------------------------
168 /** gets the value of a column in the current row as a double.
169 @param columnIndex
170 the first column is 1, the second is 2,
171 @returns
172 the column value; if the value is SQL NULL, the result is null
173 @throws SQLException
174 if a database access error occurs.
176 double getDouble([in]long columnIndex) raises (SQLException);
177 //-------------------------------------------------------------------------
179 /** gets the value of a column in the current row as a byte array.
180 The bytes represent the raw values returned by the driver.
181 @param columnIndex
182 the first column is 1, the second is 2, ...
183 @returns
184 the column value; if the value is SQL NULL, the result is empty.
185 @throws SQLException
186 if a database access error occurs.
188 sequence<byte> getBytes([in]long columnIndex) raises (SQLException);
189 //-------------------------------------------------------------------------
191 /** gets the value of a column in the current row as a date object.
192 @param columnIndex
193 the first column is 1, the second is 2,
194 @returns
195 the column value; if the value is SQL NULL, the result is null
196 @throws SQLException
197 if a database access error occurs.
199 com::sun::star::util::Date getDate([in]long columnIndex)
200 raises (SQLException);
201 //-------------------------------------------------------------------------
203 /** gets the value of a column in the current row as a time object.
204 @param columnIndex
205 the first column is 1, the second is 2,
206 @returns
207 the column value; if the value is SQL NULL, the result is null
208 @throws SQLException
209 if a database access error occurs.
211 com::sun::star::util::Time getTime([in]long columnIndex)
212 raises (SQLException);
213 //-------------------------------------------------------------------------
215 /** gets the value of a column in the current row as a datetime object.
216 @param columnIndex
217 the first column is 1, the second is 2,
218 @returns
219 the column value; if the value is SQL NULL, the result is null
220 @throws SQLException
221 if a database access error occurs.
223 com::sun::star::util::DateTime getTimestamp([in]long columnIndex)
224 raises (SQLException);
225 //-------------------------------------------------------------------------
227 /** gets the value of a column in the current row as a stream of
228 uninterpreted bytes. The value can then be read in chunks from the
229 stream. This method is particularly suitable for retrieving large
230 LONGVARBINARY values.
234 <b>Note:</b> All the data in the returned stream must be
235 read prior to getting the value of any other column. The next
236 call to a get method implicitly closes the stream. Also, a
237 stream may return 0 when the method
238 <member scope="com::sun::star::io">XInputStream::available()</member>
239 is called whether there is data
240 available or not.
241 </p>
242 @param columnIndex
243 the first column is 1, the second is 2,
244 @returns
245 the column value; if the value is SQL NULL, the result is null
246 @throws SQLException
247 if a database access error occurs.
249 com::sun::star::io::XInputStream getBinaryStream([in]long columnIndex)
250 raises (SQLException);
251 //-------------------------------------------------------------------------
253 /** gets the value of a column in the current row as a stream of
254 uninterpreted bytes. The value can then be read in chunks from the
255 stream. This method is particularly suitable for retrieving large
256 LONGVARBINARY or LONGVARCHAR values.
260 <b>Note:</b> All the data in the returned stream must be
261 read prior to getting the value of any other column. The next
262 call to a get method implicitly closes the stream. Also, a
263 stream may return 0 when the method
264 <member scope="com::sun::star::io">XInputStream::available()</member>
265 is called whether there is data
266 available or not.
267 </p>
268 @param columnIndex
269 the first column is 1, the second is 2,
270 @returns
271 the column value; if the value is SQL NULL, the result is null
272 @throws SQLException
273 if a database access error occurs.
275 com::sun::star::io::XInputStream getCharacterStream([in]long columnIndex)
276 raises (SQLException);
277 //-------------------------------------------------------------------------
279 /** returns the value of a column in the current row as an object.
280 This method uses the given
281 <code>Map</code>
282 object for the custom mapping of the SQL structure or distinct type
283 that is being retrieved.
284 @param columnIndex
285 the first column is 1, the second is 2,
286 @param typeMap
287 the map of types which should be used to get the column value
288 @returns
289 the column value; if the value is SQL NULL, the result is null
290 @throws SQLException
291 if a database access error occurs.
293 any getObject([in]long columnIndex,
294 [in]com::sun::star::container::XNameAccess typeMap)
295 raises (SQLException);
296 //-------------------------------------------------------------------------
298 /** gets a REF(&amp;lt;structured-type&amp;gt;) column value from the current row.
299 @param columnIndex
300 the first column is 1, the second is 2,
301 @returns
302 the column value; if the value is SQL NULL, the result is null
303 @throws SQLException
304 if a database access error occurs.
306 XRef getRef([in]long columnIndex) raises (SQLException);
307 //-------------------------------------------------------------------------
309 /** gets a BLOB value in the current row.
310 @param columnIndex
311 the first column is 1, the second is 2,
312 @returns
313 the column value; if the value is SQL NULL, the result is null
314 @throws SQLException
315 if a database access error occurs.
317 XBlob getBlob([in]long columnIndex) raises (SQLException);
318 //-------------------------------------------------------------------------
320 /** gets a CLOB value in the current row of this
321 <code>ResultSet</code>
322 object.
323 @param columnIndex
324 the first column is 1, the second is 2,
325 @returns
326 the column value; if the value is SQL NULL, the result is null
327 @throws SQLException
328 if a database access error occurs.
330 XClob getClob([in]long columnIndex) raises (SQLException);
331 //-------------------------------------------------------------------------
333 /** gets a SQL ARRAY value from the current row of this
334 <code>ResultSet</code>
335 object.
336 @param columnIndex
337 the first column is 1, the second is 2,
338 @returns
339 the column value; if the value is SQL NULL, the result is null
340 @throws SQLException
341 if a database access error occurs.
343 XArray getArray([in]long columnIndex) raises (SQLException);
346 //=============================================================================
348 }; }; }; };
350 /*===========================================================================
351 ===========================================================================*/
352 #endif