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_sdb_XColumn_idl__
28 #define __com_sun_star_sdb_XColumn_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_sdbc_SQLException_idl__
35 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
38 #ifndef __com_sun_star_util_Date_idl__
39 #include
<com
/sun
/star
/util
/Date.idl
>
42 #ifndef __com_sun_star_util_DateTime_idl__
43 #include
<com
/sun
/star
/util
/DateTime.idl
>
46 #ifndef __com_sun_star_util_Time_idl__
47 #include
<com
/sun
/star
/util
/Time.idl
>
50 module com
{ module sun
{ module star
{ module io
{
51 published
interface XInputStream
;
54 module com
{ module sun
{ module star
{ module container
{
55 published
interface XNameAccess
;
58 module com
{ module sun
{ module star
{ module sdbc
{
59 published
interface XRef
;
60 published
interface XArray
;
61 published
interface XBlob
;
62 published
interface XClob
;
65 module com
{ module sun
{ module star
{ module sdb
{
68 /** is used to access data which is collected in a row.
70 published
interface XColumn
: com
::sun
::star
::uno
::XInterface
72 //-------------------------------------------------------------------------
74 /** reports whether the last column read had a value of SQL NULL.
75 Note that you must first call getXXX on a column to try to read
76 its value and then call
77 <code>wasNull()</code>
78 to see if the value read was SQL NULL.
81 @throws com::sun::star::sdbc::SQLException
82 if a database access error occurs.
84 boolean wasNull
() raises
(com
::sun
::star
::sdbc
::SQLException
);
85 //-------------------------------------------------------------------------
87 /** gets the value of a column in the current row as a String.
90 @throws com::sun::star::sdbc::SQLException
91 if a database access error occurs.
93 string getString
() raises
(com
::sun
::star
::sdbc
::SQLException
);
94 //-------------------------------------------------------------------------
96 /** gets the value of a column in the current row as boolean.
99 @throws com::sun::star::sdbc::SQLException
100 if a database access error occurs.
102 boolean getBoolean
() raises
(com
::sun
::star
::sdbc
::SQLException
);
103 //-------------------------------------------------------------------------
105 /** gets the value of a column in the current row as a byte.
108 @throws com::sun::star::sdbc::SQLException
109 if a database access error occurs.
111 byte getByte
() raises
(com
::sun
::star
::sdbc
::SQLException
);
112 //-------------------------------------------------------------------------
114 /** gets the value of a column in the current row as a short.
117 @throws com::sun::star::sdbc::SQLException
118 if a database access error occurs.
120 short getShort
() raises
(com
::sun
::star
::sdbc
::SQLException
);
121 //-------------------------------------------------------------------------
123 /** gets the value of a column in the current row as a long.
126 @throws com::sun::star::sdbc::SQLException
127 if a database access error occurs.
129 long getInt
() raises
(com
::sun
::star
::sdbc
::SQLException
);
130 //-------------------------------------------------------------------------
132 /** gets the value of a column in the current row as a hyper.
135 @throws com::sun::star::sdbc::SQLException
136 if a database access error occurs.
138 hyper getLong
() raises
(com
::sun
::star
::sdbc
::SQLException
);
139 //-------------------------------------------------------------------------
141 /** gets the value of a column in the current row as a float.
144 @throws com::sun::star::sdbc::SQLException
145 if a database access error occurs.
147 float getFloat
() raises
(com
::sun
::star
::sdbc
::SQLException
);
148 //-------------------------------------------------------------------------
150 /** gets the value of a column in the current row as a double.
153 @throws com::sun::star::sdbc::SQLException
154 if a database access error occurs.
156 double getDouble
() raises
(com
::sun
::star
::sdbc
::SQLException
);
157 //-------------------------------------------------------------------------
159 /** gets the value of a column in the current row as a byte array.
160 The bytes represent the raw values returned by the driver.
161 @returns the column value;
162 if the value is SQL NULL, the result is empty.
163 @throws com::sun::star::sdbc::SQLException
164 if a database access error occurs.
166 sequence
<byte> getBytes
() raises
(com
::sun
::star
::sdbc
::SQLException
);
167 //-------------------------------------------------------------------------
169 /** gets the value of a column in the current row as a date object.
172 @throws com::sun::star::sdbc::SQLException
173 if a database access error occurs.
175 com
::sun
::star
::util
::Date getDate
()
176 raises
(com
::sun
::star
::sdbc
::SQLException
);
177 //-------------------------------------------------------------------------
179 /** gets the value of a column in the current row as a time object.
182 @throws com::sun::star::sdbc::SQLException
183 if a database access error occurs.
185 com
::sun
::star
::util
::Time getTime
()
186 raises
(com
::sun
::star
::sdbc
::SQLException
);
187 //-------------------------------------------------------------------------
189 /** gets the value of a column in the current row as a datetime object.
192 @throws com::sun::star::sdbc::SQLException
193 if a database access error occurs.
195 com
::sun
::star
::util
::DateTime getTimestamp
()
196 raises
(com
::sun
::star
::sdbc
::SQLException
);
197 //-------------------------------------------------------------------------
199 /** gets the value of a column in the current row as a stream of
200 uninterpreted bytes. The value can then be read in chunks from the
201 stream. This method is particularly suitable for retrieving large
202 LONGVARBINARY or LONGVARCHAR values.
206 <b>Note:</b> All the data in the returned stream must be
207 read prior to getting the value of any other column. The next
208 call to a get method implicitly closes the stream. Also, a
209 stream may return 0 when the method
210 <member scope="com::sun::star::io">XInputStream::available()</member>
211 is called whether there is data available or not.
215 @throws com::sun::star::sdbc::SQLException
216 if a database access error occurs.
218 com
::sun
::star
::io
::XInputStream getBinaryStream
()
219 raises
(com
::sun
::star
::sdbc
::SQLException
);
220 //-------------------------------------------------------------------------
222 /** gets the value of a column in the current row as a stream of
223 uninterpreted bytes. The value can then be read in chunks from the
224 stream. This method is particularly suitable for retrieving large
228 <b>Note:</b> All the data in the returned stream must be
229 read prior to getting the value of any other column. The next
230 call to a get method implicitly closes the stream. Also, a
231 stream may return 0 when the method
232 <member scope="com::sun::star::io">XInputStream::available()</member>
233 is called whether there is data available or not.
237 @throws com::sun::star::sdbc::SQLException
238 if a database access error occurs.
240 com
::sun
::star
::io
::XInputStream getCharacterStream
()
241 raises
(com
::sun
::star
::sdbc
::SQLException
);
242 //-------------------------------------------------------------------------
244 /** @returns the value of a column in the current row as an object.
245 This method uses the given
248 for the custom mapping of the SQL structure or distinct type
249 that is being retrieved.
251 the type map is used to fetch the correct type
254 @throws com::sun::star::sdbc::SQLException
255 if a database access error occurs.
257 any getObject
([in]com
::sun
::star
::container
::XNameAccess typeMap
)
258 raises
(com
::sun
::star
::sdbc
::SQLException
);
259 //-------------------------------------------------------------------------
261 /** gets a REF(<structured-type>) column value from the current row.
265 @throws com::sun::star::sdbc::SQLException
266 if a database access error occurs.
268 com
::sun
::star
::sdbc
::XRef getRef
() raises
(com
::sun
::star
::sdbc
::SQLException
);
269 //-------------------------------------------------------------------------
271 /** gets a BLOB (Binary Large OBject) value in the current row.
274 @throws com::sun::star::sdbc::SQLException
275 if a database access error occurs.
277 com
::sun
::star
::sdbc
::XBlob getBlob
() raises
(com
::sun
::star
::sdbc
::SQLException
);
278 //-------------------------------------------------------------------------
280 /** gets a CLOB value in the current row of this <code>ResultSet</code> object.
283 @throws com::sun::star::sdbc::SQLException
284 if a database access error occurs.
286 com
::sun
::star
::sdbc
::XClob getClob
() raises
(com
::sun
::star
::sdbc
::SQLException
);
287 //-------------------------------------------------------------------------
289 /** gets a SQL ARRAY value from the current row.
292 @throws com::sun::star::sdbc::SQLException
293 if a database access error occurs.
295 com
::sun
::star
::sdbc
::XArray getArray
() raises
(com
::sun
::star
::sdbc
::SQLException
);
298 //=============================================================================
302 /*===========================================================================
303 ===========================================================================*/