Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / sdbc / XRow.idl
blobf6ade653439bf323bb8f1587db59c10cbcbda226
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_sdbc_XRow_idl__
29 #define __com_sun_star_sdbc_XRow_idl__
31 #include <com/sun/star/uno/XInterface.idl>
33 #include <com/sun/star/util/Date.idl>
35 #include <com/sun/star/util/DateTime.idl>
37 #include <com/sun/star/util/Time.idl>
39 module com { module sun { module star { module io {
40 published interface XInputStream;
41 };};};};
43 module com { module sun { module star { module container {
44 published interface XNameAccess;
45 };};};};
47 #include <com/sun/star/sdbc/SQLException.idl>
49 module com { module sun { module star { module sdbc {
51 published interface XRef;
52 published interface XArray;
53 published interface XBlob;
54 published interface XClob;
57 /** is used to access data which is collected in a row.
58 All methods raise a
59 <type scope="com::sun::star::sdbc">SQLException</type>
60 if a database access error occurs.
62 published interface XRow: com::sun::star::uno::XInterface
64 //-------------------------------------------------------------------------
66 /** reports whether the last column read had a value of SQL NULL.
67 Note that you must first call getXXX on a column to try to read
68 its value and then call wasNull() to see if the value read was
69 SQL NULL.
71 @returns
72 <TRUE/> if last column read was SQL NULL and <FALSE/> otherwise
73 @throws SQLException
74 if a database access error occurs.
76 boolean wasNull() raises (SQLException);
77 //-------------------------------------------------------------------------
79 /** gets the value of a column in the current row as a string.
80 @param columnIndex
81 the first column is 1, the second is 2,
82 @returns
83 the column value; if the value is SQL NULL, the result is null
84 @throws SQLException
85 if a database access error occurs.
87 string getString([in]long columnIndex) raises (SQLException);
88 //-------------------------------------------------------------------------
90 /** gets the value of a column in the current row as boolean.
91 @param columnIndex
92 the first column is 1, the second is 2,
93 @returns
94 the column value; if the value is SQL NULL, the result is null
95 @throws SQLException
96 if a database access error occurs.
98 boolean getBoolean([in]long columnIndex) raises (SQLException);
99 //-------------------------------------------------------------------------
101 /** get the value of a column in the current row as a byte.
102 @param columnIndex
103 the first column is 1, the second is 2,
104 @returns
105 the column value; if the value is SQL NULL, the result is null
106 @throws SQLException
107 if a database access error occurs.
109 byte getByte([in]long columnIndex) raises (SQLException);
110 //-------------------------------------------------------------------------
112 /** gets the value of a column in the current row as a short.
113 @param columnIndex
114 the first column is 1, the second is 2,
115 @returns
116 the column value; if the value is SQL NULL, the result is null
117 @throws SQLException
118 if a database access error occurs.
120 short getShort([in]long columnIndex) raises (SQLException);
121 //-------------------------------------------------------------------------
123 /** get the value of a column in the current row as an integer.
124 @param columnIndex
125 the first column is 1, the second is 2,
126 @returns
127 the column value; if the value is SQL NULL, the result is null
128 @throws SQLException
129 if a database access error occurs.
131 long getInt([in]long columnIndex) raises (SQLException);
132 //-------------------------------------------------------------------------
134 /** get the value of a column in the current row as a long.
135 @param columnIndex
136 the first column is 1, the second is 2,
137 @returns
138 the column value; if the value is SQL NULL, the result is null
139 @throws SQLException
140 if a database access error occurs.
142 hyper getLong([in]long columnIndex) raises (SQLException);
143 //-------------------------------------------------------------------------
145 /** gets the value of a column in the current row as a float.
146 @param columnIndex
147 the first column is 1, the second is 2,
148 @returns
149 the column value; if the value is SQL NULL, the result is null
150 @throws SQLException
151 if a database access error occurs.
153 float getFloat([in]long columnIndex) raises (SQLException);
154 //-------------------------------------------------------------------------
156 /** gets the value of a column in the current row as a double.
157 @param columnIndex
158 the first column is 1, the second is 2,
159 @returns
160 the column value; if the value is SQL NULL, the result is null
161 @throws SQLException
162 if a database access error occurs.
164 double getDouble([in]long columnIndex) raises (SQLException);
165 //-------------------------------------------------------------------------
167 /** gets the value of a column in the current row as a byte array.
168 The bytes represent the raw values returned by the driver.
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 empty.
173 @throws SQLException
174 if a database access error occurs.
176 sequence<byte> getBytes([in]long columnIndex) raises (SQLException);
177 //-------------------------------------------------------------------------
179 /** gets the value of a column in the current row as a date object.
180 @param columnIndex
181 the first column is 1, the second is 2,
182 @returns
183 the column value; if the value is SQL NULL, the result is null
184 @throws SQLException
185 if a database access error occurs.
187 com::sun::star::util::Date getDate([in]long columnIndex)
188 raises (SQLException);
189 //-------------------------------------------------------------------------
191 /** gets the value of a column in the current row as a time 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::Time getTime([in]long columnIndex)
200 raises (SQLException);
201 //-------------------------------------------------------------------------
203 /** gets the value of a column in the current row as a datetime 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::DateTime getTimestamp([in]long columnIndex)
212 raises (SQLException);
213 //-------------------------------------------------------------------------
215 /** gets the value of a column in the current row as a stream of
216 uninterpreted bytes. The value can then be read in chunks from the
217 stream. This method is particularly suitable for retrieving large
218 LONGVARBINARY values.
222 <b>Note:</b> All the data in the returned stream must be
223 read prior to getting the value of any other column. The next
224 call to a get method implicitly closes the stream. Also, a
225 stream may return 0 when the method
226 <member scope="com::sun::star::io">XInputStream::available()</member>
227 is called whether there is data
228 available or not.
229 </p>
230 @param columnIndex
231 the first column is 1, the second is 2,
232 @returns
233 the column value; if the value is SQL NULL, the result is null
234 @throws SQLException
235 if a database access error occurs.
237 com::sun::star::io::XInputStream getBinaryStream([in]long columnIndex)
238 raises (SQLException);
239 //-------------------------------------------------------------------------
241 /** gets the value of a column in the current row as a stream of
242 uninterpreted bytes. The value can then be read in chunks from the
243 stream. This method is particularly suitable for retrieving large
244 LONGVARBINARY or LONGVARCHAR values.
248 <b>Note:</b> All the data in the returned stream must be
249 read prior to getting the value of any other column. The next
250 call to a get method implicitly closes the stream. Also, a
251 stream may return 0 when the method
252 <member scope="com::sun::star::io">XInputStream::available()</member>
253 is called whether there is data
254 available or not.
255 </p>
256 @param columnIndex
257 the first column is 1, the second is 2,
258 @returns
259 the column value; if the value is SQL NULL, the result is null
260 @throws SQLException
261 if a database access error occurs.
263 com::sun::star::io::XInputStream getCharacterStream([in]long columnIndex)
264 raises (SQLException);
265 //-------------------------------------------------------------------------
267 /** returns the value of a column in the current row as an object.
268 This method uses the given
269 <code>Map</code>
270 object for the custom mapping of the SQL structure or distinct type
271 that is being retrieved.
272 @param columnIndex
273 the first column is 1, the second is 2,
274 @param typeMap
275 the map of types which should be used to get the column value
276 @returns
277 the column value; if the value is SQL NULL, the result is null
278 @throws SQLException
279 if a database access error occurs.
281 any getObject([in]long columnIndex,
282 [in]com::sun::star::container::XNameAccess typeMap)
283 raises (SQLException);
284 //-------------------------------------------------------------------------
286 /** gets a REF(&amp;lt;structured-type&amp;gt;) column value from the current row.
287 @param columnIndex
288 the first column is 1, the second is 2,
289 @returns
290 the column value; if the value is SQL NULL, the result is null
291 @throws SQLException
292 if a database access error occurs.
294 XRef getRef([in]long columnIndex) raises (SQLException);
295 //-------------------------------------------------------------------------
297 /** gets a BLOB value in the current row.
298 @param columnIndex
299 the first column is 1, the second is 2,
300 @returns
301 the column value; if the value is SQL NULL, the result is null
302 @throws SQLException
303 if a database access error occurs.
305 XBlob getBlob([in]long columnIndex) raises (SQLException);
306 //-------------------------------------------------------------------------
308 /** gets a CLOB value in the current row of this
309 <code>ResultSet</code>
310 object.
311 @param columnIndex
312 the first column is 1, the second is 2,
313 @returns
314 the column value; if the value is SQL NULL, the result is null
315 @throws SQLException
316 if a database access error occurs.
318 XClob getClob([in]long columnIndex) raises (SQLException);
319 //-------------------------------------------------------------------------
321 /** gets a SQL ARRAY value from the current row of this
322 <code>ResultSet</code>
323 object.
324 @param columnIndex
325 the first column is 1, the second is 2,
326 @returns
327 the column value; if the value is SQL NULL, the result is null
328 @throws SQLException
329 if a database access error occurs.
331 XArray getArray([in]long columnIndex) raises (SQLException);
334 //=============================================================================
336 }; }; }; };
338 /*===========================================================================
339 ===========================================================================*/
340 #endif
342 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */