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
;
43 module com
{ module sun
{ module star
{ module container
{
44 published
interface XNameAccess
;
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.
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
72 <TRUE/> if last column read was SQL NULL and <FALSE/> otherwise
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.
81 the first column is 1, the second is 2,
83 the column value; if the value is SQL NULL, the result is null
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.
92 the first column is 1, the second is 2,
94 the column value; if the value is SQL NULL, the result is null
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.
103 the first column is 1, the second is 2,
105 the column value; if the value is SQL NULL, the result is null
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.
114 the first column is 1, the second is 2,
116 the column value; if the value is SQL NULL, the result is null
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.
125 the first column is 1, the second is 2,
127 the column value; if the value is SQL NULL, the result is null
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.
136 the first column is 1, the second is 2,
138 the column value; if the value is SQL NULL, the result is null
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.
147 the first column is 1, the second is 2,
149 the column value; if the value is SQL NULL, the result is null
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.
158 the first column is 1, the second is 2,
160 the column value; if the value is SQL NULL, the result is null
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.
170 the first column is 1, the second is 2, ...
172 the column value; if the value is SQL NULL, the result is empty.
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.
181 the first column is 1, the second is 2,
183 the column value; if the value is SQL NULL, the result is null
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.
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
::Time getTime
([in]long columnIndex
)
200 raises
(SQLException
);
201 //-------------------------------------------------------------------------
203 /** gets the value of a column in the current row as a datetime 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
::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
231 the first column is 1, the second is 2,
233 the column value; if the value is SQL NULL, the result is null
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
257 the first column is 1, the second is 2,
259 the column value; if the value is SQL NULL, the result is null
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
270 object for the custom mapping of the SQL structure or distinct type
271 that is being retrieved.
273 the first column is 1, the second is 2,
275 the map of types which should be used to get the column value
277 the column value; if the value is SQL NULL, the result is null
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(&lt;structured-type&gt;) column value from the current row.
288 the first column is 1, the second is 2,
290 the column value; if the value is SQL NULL, the result is null
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.
299 the first column is 1, the second is 2,
301 the column value; if the value is SQL NULL, the result is null
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>
312 the first column is 1, the second is 2,
314 the column value; if the value is SQL NULL, the result is null
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>
325 the first column is 1, the second is 2,
327 the column value; if the value is SQL NULL, the result is null
329 if a database access error occurs.
331 XArray getArray
([in]long columnIndex
) raises
(SQLException
);
334 //=============================================================================
338 /*===========================================================================
339 ===========================================================================*/
342 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */