1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XRow.idl,v $
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
>
37 #ifndef __com_sun_star_util_Date_idl__
38 #include
<com
/sun
/star
/util
/Date.idl
>
41 #ifndef __com_sun_star_util_DateTime_idl__
42 #include
<com
/sun
/star
/util
/DateTime.idl
>
45 #ifndef __com_sun_star_util_Time_idl__
46 #include
<com
/sun
/star
/util
/Time.idl
>
49 module com
{ module sun
{ module star
{ module io
{
50 published
interface XInputStream
;
53 module com
{ module sun
{ module star
{ module container
{
54 published
interface XNameAccess
;
57 #ifndef __com_sun_star_sdbc_SQLException_idl__
58 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
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.
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
84 <TRUE/> if last column read was SQL NULL and <FALSE/> otherwise
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.
93 the first column is 1, the second is 2,
95 the column value; if the value is SQL NULL, the result is null
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.
104 the first column is 1, the second is 2,
106 the column value; if the value is SQL NULL, the result is null
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.
115 the first column is 1, the second is 2,
117 the column value; if the value is SQL NULL, the result is null
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.
126 the first column is 1, the second is 2,
128 the column value; if the value is SQL NULL, the result is null
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.
137 the first column is 1, the second is 2,
139 the column value; if the value is SQL NULL, the result is null
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.
148 the first column is 1, the second is 2,
150 the column value; if the value is SQL NULL, the result is null
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.
159 the first column is 1, the second is 2,
161 the column value; if the value is SQL NULL, the result is null
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.
170 the first column is 1, the second is 2,
172 the column value; if the value is SQL NULL, the result is null
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.
182 the first column is 1, the second is 2, ...
184 the column value; if the value is SQL NULL, the result is empty.
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.
193 the first column is 1, the second is 2,
195 the column value; if the value is SQL NULL, the result is null
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.
205 the first column is 1, the second is 2,
207 the column value; if the value is SQL NULL, the result is null
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.
217 the first column is 1, the second is 2,
219 the column value; if the value is SQL NULL, the result is null
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
243 the first column is 1, the second is 2,
245 the column value; if the value is SQL NULL, the result is null
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
269 the first column is 1, the second is 2,
271 the column value; if the value is SQL NULL, the result is null
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
282 object for the custom mapping of the SQL structure or distinct type
283 that is being retrieved.
285 the first column is 1, the second is 2,
287 the map of types which should be used to get the column value
289 the column value; if the value is SQL NULL, the result is null
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(&lt;structured-type&gt;) column value from the current row.
300 the first column is 1, the second is 2,
302 the column value; if the value is SQL NULL, the result is null
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.
311 the first column is 1, the second is 2,
313 the column value; if the value is SQL NULL, the result is null
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>
324 the first column is 1, the second is 2,
326 the column value; if the value is SQL NULL, the result is null
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>
337 the first column is 1, the second is 2,
339 the column value; if the value is SQL NULL, the result is null
341 if a database access error occurs.
343 XArray getArray
([in]long columnIndex
) raises
(SQLException
);
346 //=============================================================================
350 /*===========================================================================
351 ===========================================================================*/