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: XColumn.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_sdb_XColumn_idl__
31 #define __com_sun_star_sdb_XColumn_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_sdbc_SQLException_idl__
38 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
41 #ifndef __com_sun_star_util_Date_idl__
42 #include
<com
/sun
/star
/util
/Date.idl
>
45 #ifndef __com_sun_star_util_DateTime_idl__
46 #include
<com
/sun
/star
/util
/DateTime.idl
>
49 #ifndef __com_sun_star_util_Time_idl__
50 #include
<com
/sun
/star
/util
/Time.idl
>
53 module com
{ module sun
{ module star
{ module io
{
54 published
interface XInputStream
;
57 module com
{ module sun
{ module star
{ module container
{
58 published
interface XNameAccess
;
61 module com
{ module sun
{ module star
{ module sdbc
{
62 published
interface XRef
;
63 published
interface XArray
;
64 published
interface XBlob
;
65 published
interface XClob
;
68 module com
{ module sun
{ module star
{ module sdb
{
71 /** is used to access data which is collected in a row.
73 published
interface XColumn
: com
::sun
::star
::uno
::XInterface
75 //-------------------------------------------------------------------------
77 /** reports whether the last column read had a value of SQL NULL.
78 Note that you must first call getXXX on a column to try to read
79 its value and then call
80 <code>wasNull()</code>
81 to see if the value read was SQL NULL.
84 @throws com::sun::star::sdbc::SQLException
85 if a database access error occurs.
87 boolean wasNull
() raises
(com
::sun
::star
::sdbc
::SQLException
);
88 //-------------------------------------------------------------------------
90 /** gets the value of a column in the current row as a String.
93 @throws com::sun::star::sdbc::SQLException
94 if a database access error occurs.
96 string getString
() raises
(com
::sun
::star
::sdbc
::SQLException
);
97 //-------------------------------------------------------------------------
99 /** gets the value of a column in the current row as boolean.
102 @throws com::sun::star::sdbc::SQLException
103 if a database access error occurs.
105 boolean getBoolean
() raises
(com
::sun
::star
::sdbc
::SQLException
);
106 //-------------------------------------------------------------------------
108 /** gets the value of a column in the current row as a byte.
111 @throws com::sun::star::sdbc::SQLException
112 if a database access error occurs.
114 byte getByte
() raises
(com
::sun
::star
::sdbc
::SQLException
);
115 //-------------------------------------------------------------------------
117 /** gets the value of a column in the current row as a short.
120 @throws com::sun::star::sdbc::SQLException
121 if a database access error occurs.
123 short getShort
() raises
(com
::sun
::star
::sdbc
::SQLException
);
124 //-------------------------------------------------------------------------
126 /** gets the value of a column in the current row as a long.
129 @throws com::sun::star::sdbc::SQLException
130 if a database access error occurs.
132 long getInt
() raises
(com
::sun
::star
::sdbc
::SQLException
);
133 //-------------------------------------------------------------------------
135 /** gets the value of a column in the current row as a hyper.
138 @throws com::sun::star::sdbc::SQLException
139 if a database access error occurs.
141 hyper getLong
() raises
(com
::sun
::star
::sdbc
::SQLException
);
142 //-------------------------------------------------------------------------
144 /** gets the value of a column in the current row as a float.
147 @throws com::sun::star::sdbc::SQLException
148 if a database access error occurs.
150 float getFloat
() raises
(com
::sun
::star
::sdbc
::SQLException
);
151 //-------------------------------------------------------------------------
153 /** gets the value of a column in the current row as a double.
156 @throws com::sun::star::sdbc::SQLException
157 if a database access error occurs.
159 double getDouble
() raises
(com
::sun
::star
::sdbc
::SQLException
);
160 //-------------------------------------------------------------------------
162 /** gets the value of a column in the current row as a byte array.
163 The bytes represent the raw values returned by the driver.
164 @returns the column value;
165 if the value is SQL NULL, the result is empty.
166 @throws com::sun::star::sdbc::SQLException
167 if a database access error occurs.
169 sequence
<byte> getBytes
() raises
(com
::sun
::star
::sdbc
::SQLException
);
170 //-------------------------------------------------------------------------
172 /** gets the value of a column in the current row as a date object.
175 @throws com::sun::star::sdbc::SQLException
176 if a database access error occurs.
178 com
::sun
::star
::util
::Date getDate
()
179 raises
(com
::sun
::star
::sdbc
::SQLException
);
180 //-------------------------------------------------------------------------
182 /** gets the value of a column in the current row as a time object.
185 @throws com::sun::star::sdbc::SQLException
186 if a database access error occurs.
188 com
::sun
::star
::util
::Time getTime
()
189 raises
(com
::sun
::star
::sdbc
::SQLException
);
190 //-------------------------------------------------------------------------
192 /** gets the value of a column in the current row as a datetime object.
195 @throws com::sun::star::sdbc::SQLException
196 if a database access error occurs.
198 com
::sun
::star
::util
::DateTime getTimestamp
()
199 raises
(com
::sun
::star
::sdbc
::SQLException
);
200 //-------------------------------------------------------------------------
202 /** gets the value of a column in the current row as a stream of
203 uninterpreted bytes. The value can then be read in chunks from the
204 stream. This method is particularly suitable for retrieving large
205 LONGVARBINARY or LONGVARCHAR values.
209 <b>Note:</b> All the data in the returned stream must be
210 read prior to getting the value of any other column. The next
211 call to a get method implicitly closes the stream. Also, a
212 stream may return 0 when the method
213 <member scope="com::sun::star::io">XInputStream::available()</member>
214 is called whether there is data available or not.
218 @throws com::sun::star::sdbc::SQLException
219 if a database access error occurs.
221 com
::sun
::star
::io
::XInputStream getBinaryStream
()
222 raises
(com
::sun
::star
::sdbc
::SQLException
);
223 //-------------------------------------------------------------------------
225 /** gets the value of a column in the current row as a stream of
226 uninterpreted bytes. The value can then be read in chunks from the
227 stream. This method is particularly suitable for retrieving large
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 available or not.
240 @throws com::sun::star::sdbc::SQLException
241 if a database access error occurs.
243 com
::sun
::star
::io
::XInputStream getCharacterStream
()
244 raises
(com
::sun
::star
::sdbc
::SQLException
);
245 //-------------------------------------------------------------------------
247 /** @returns the value of a column in the current row as an object.
248 This method uses the given
251 for the custom mapping of the SQL structure or distinct type
252 that is being retrieved.
254 the type map is used to fetch the correct type
257 @throws com::sun::star::sdbc::SQLException
258 if a database access error occurs.
260 any getObject
([in]com
::sun
::star
::container
::XNameAccess typeMap
)
261 raises
(com
::sun
::star
::sdbc
::SQLException
);
262 //-------------------------------------------------------------------------
264 /** gets a REF(<structured-type>) column value from the current row.
268 @throws com::sun::star::sdbc::SQLException
269 if a database access error occurs.
271 com
::sun
::star
::sdbc
::XRef getRef
() raises
(com
::sun
::star
::sdbc
::SQLException
);
272 //-------------------------------------------------------------------------
274 /** gets a BLOB (Binary Large OBject) value in the current row.
277 @throws com::sun::star::sdbc::SQLException
278 if a database access error occurs.
280 com
::sun
::star
::sdbc
::XBlob getBlob
() raises
(com
::sun
::star
::sdbc
::SQLException
);
281 //-------------------------------------------------------------------------
283 /** gets a CLOB value in the current row of this <code>ResultSet</code> object.
286 @throws com::sun::star::sdbc::SQLException
287 if a database access error occurs.
289 com
::sun
::star
::sdbc
::XClob getClob
() raises
(com
::sun
::star
::sdbc
::SQLException
);
290 //-------------------------------------------------------------------------
292 /** gets a SQL ARRAY value from the current row.
295 @throws com::sun::star::sdbc::SQLException
296 if a database access error occurs.
298 com
::sun
::star
::sdbc
::XArray getArray
() raises
(com
::sun
::star
::sdbc
::SQLException
);
301 //=============================================================================
305 /*===========================================================================
306 ===========================================================================*/