1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_sdbc_XRow_idl__
28 #define __com_sun_star_sdbc_XRow_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_util_Date_idl__
35 #include
<com
/sun
/star
/util
/Date.idl
>
38 #ifndef __com_sun_star_util_DateTime_idl__
39 #include
<com
/sun
/star
/util
/DateTime.idl
>
42 #ifndef __com_sun_star_util_Time_idl__
43 #include
<com
/sun
/star
/util
/Time.idl
>
46 module com
{ module sun
{ module star
{ module io
{
47 published
interface XInputStream
;
50 module com
{ module sun
{ module star
{ module container
{
51 published
interface XNameAccess
;
54 #ifndef __com_sun_star_sdbc_SQLException_idl__
55 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
58 module com
{ module sun
{ module star
{ module sdbc
{
60 published
interface XRef
;
61 published
interface XArray
;
62 published
interface XBlob
;
63 published
interface XClob
;
66 /** is used to access data which is collected in a row.
68 <type scope="com::sun::star::sdbc">SQLException</type>
69 if a database access error occurs.
71 published
interface XRow
: com
::sun
::star
::uno
::XInterface
73 //-------------------------------------------------------------------------
75 /** reports whether the last column read had a value of SQL NULL.
76 Note that you must first call getXXX on a column to try to read
77 its value and then call wasNull() to see if the value read was
81 <TRUE/> if last column read was SQL NULL and <FALSE/> otherwise
83 if a database access error occurs.
85 boolean wasNull
() raises
(SQLException
);
86 //-------------------------------------------------------------------------
88 /** gets the value of a column in the current row as a string.
90 the first column is 1, the second is 2,
92 the column value; if the value is SQL NULL, the result is null
94 if a database access error occurs.
96 string getString
([in]long columnIndex
) raises
(SQLException
);
97 //-------------------------------------------------------------------------
99 /** gets the value of a column in the current row as boolean.
101 the first column is 1, the second is 2,
103 the column value; if the value is SQL NULL, the result is null
105 if a database access error occurs.
107 boolean getBoolean
([in]long columnIndex
) raises
(SQLException
);
108 //-------------------------------------------------------------------------
110 /** get the value of a column in the current row as a byte.
112 the first column is 1, the second is 2,
114 the column value; if the value is SQL NULL, the result is null
116 if a database access error occurs.
118 byte getByte
([in]long columnIndex
) raises
(SQLException
);
119 //-------------------------------------------------------------------------
121 /** gets the value of a column in the current row as a short.
123 the first column is 1, the second is 2,
125 the column value; if the value is SQL NULL, the result is null
127 if a database access error occurs.
129 short getShort
([in]long columnIndex
) raises
(SQLException
);
130 //-------------------------------------------------------------------------
132 /** get the value of a column in the current row as an integer.
134 the first column is 1, the second is 2,
136 the column value; if the value is SQL NULL, the result is null
138 if a database access error occurs.
140 long getInt
([in]long columnIndex
) raises
(SQLException
);
141 //-------------------------------------------------------------------------
143 /** get the value of a column in the current row as a long.
145 the first column is 1, the second is 2,
147 the column value; if the value is SQL NULL, the result is null
149 if a database access error occurs.
151 hyper getLong
([in]long columnIndex
) raises
(SQLException
);
152 //-------------------------------------------------------------------------
154 /** gets the value of a column in the current row as a float.
156 the first column is 1, the second is 2,
158 the column value; if the value is SQL NULL, the result is null
160 if a database access error occurs.
162 float getFloat
([in]long columnIndex
) raises
(SQLException
);
163 //-------------------------------------------------------------------------
165 /** gets the value of a column in the current row as a double.
167 the first column is 1, the second is 2,
169 the column value; if the value is SQL NULL, the result is null
171 if a database access error occurs.
173 double getDouble
([in]long columnIndex
) raises
(SQLException
);
174 //-------------------------------------------------------------------------
176 /** gets the value of a column in the current row as a byte array.
177 The bytes represent the raw values returned by the driver.
179 the first column is 1, the second is 2, ...
181 the column value; if the value is SQL NULL, the result is empty.
183 if a database access error occurs.
185 sequence
<byte> getBytes
([in]long columnIndex
) raises
(SQLException
);
186 //-------------------------------------------------------------------------
188 /** gets the value of a column in the current row as a date object.
190 the first column is 1, the second is 2,
192 the column value; if the value is SQL NULL, the result is null
194 if a database access error occurs.
196 com
::sun
::star
::util
::Date getDate
([in]long columnIndex
)
197 raises
(SQLException
);
198 //-------------------------------------------------------------------------
200 /** gets the value of a column in the current row as a time object.
202 the first column is 1, the second is 2,
204 the column value; if the value is SQL NULL, the result is null
206 if a database access error occurs.
208 com
::sun
::star
::util
::Time getTime
([in]long columnIndex
)
209 raises
(SQLException
);
210 //-------------------------------------------------------------------------
212 /** gets the value of a column in the current row as a datetime object.
214 the first column is 1, the second is 2,
216 the column value; if the value is SQL NULL, the result is null
218 if a database access error occurs.
220 com
::sun
::star
::util
::DateTime getTimestamp
([in]long columnIndex
)
221 raises
(SQLException
);
222 //-------------------------------------------------------------------------
224 /** gets the value of a column in the current row as a stream of
225 uninterpreted bytes. The value can then be read in chunks from the
226 stream. This method is particularly suitable for retrieving large
227 LONGVARBINARY values.
231 <b>Note:</b> All the data in the returned stream must be
232 read prior to getting the value of any other column. The next
233 call to a get method implicitly closes the stream. Also, a
234 stream may return 0 when the method
235 <member scope="com::sun::star::io">XInputStream::available()</member>
236 is called whether there is data
240 the first column is 1, the second is 2,
242 the column value; if the value is SQL NULL, the result is null
244 if a database access error occurs.
246 com
::sun
::star
::io
::XInputStream getBinaryStream
([in]long columnIndex
)
247 raises
(SQLException
);
248 //-------------------------------------------------------------------------
250 /** gets the value of a column in the current row as a stream of
251 uninterpreted bytes. The value can then be read in chunks from the
252 stream. This method is particularly suitable for retrieving large
253 LONGVARBINARY or LONGVARCHAR values.
257 <b>Note:</b> All the data in the returned stream must be
258 read prior to getting the value of any other column. The next
259 call to a get method implicitly closes the stream. Also, a
260 stream may return 0 when the method
261 <member scope="com::sun::star::io">XInputStream::available()</member>
262 is called whether there is data
266 the first column is 1, the second is 2,
268 the column value; if the value is SQL NULL, the result is null
270 if a database access error occurs.
272 com
::sun
::star
::io
::XInputStream getCharacterStream
([in]long columnIndex
)
273 raises
(SQLException
);
274 //-------------------------------------------------------------------------
276 /** returns the value of a column in the current row as an object.
277 This method uses the given
279 object for the custom mapping of the SQL structure or distinct type
280 that is being retrieved.
282 the first column is 1, the second is 2,
284 the map of types which should be used to get the column value
286 the column value; if the value is SQL NULL, the result is null
288 if a database access error occurs.
290 any getObject
([in]long columnIndex
,
291 [in]com
::sun
::star
::container
::XNameAccess typeMap
)
292 raises
(SQLException
);
293 //-------------------------------------------------------------------------
295 /** gets a REF(&lt;structured-type&gt;) column value from the current row.
297 the first column is 1, the second is 2,
299 the column value; if the value is SQL NULL, the result is null
301 if a database access error occurs.
303 XRef getRef
([in]long columnIndex
) raises
(SQLException
);
304 //-------------------------------------------------------------------------
306 /** gets a BLOB value in the current row.
308 the first column is 1, the second is 2,
310 the column value; if the value is SQL NULL, the result is null
312 if a database access error occurs.
314 XBlob getBlob
([in]long columnIndex
) raises
(SQLException
);
315 //-------------------------------------------------------------------------
317 /** gets a CLOB value in the current row of this
318 <code>ResultSet</code>
321 the first column is 1, the second is 2,
323 the column value; if the value is SQL NULL, the result is null
325 if a database access error occurs.
327 XClob getClob
([in]long columnIndex
) raises
(SQLException
);
328 //-------------------------------------------------------------------------
330 /** gets a SQL ARRAY value from the current row of this
331 <code>ResultSet</code>
334 the first column is 1, the second is 2,
336 the column value; if the value is SQL NULL, the result is null
338 if a database access error occurs.
340 XArray getArray
([in]long columnIndex
) raises
(SQLException
);
343 //=============================================================================
347 /*===========================================================================
348 ===========================================================================*/