Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / sdb / XColumn.idl
blobfe115bc33caba9807c8c4bf3ed5b75210433593a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XColumn.idl,v $
10 * $Revision: 1.11 $
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>
35 #endif
37 #ifndef __com_sun_star_sdbc_SQLException_idl__
38 #include <com/sun/star/sdbc/SQLException.idl>
39 #endif
41 #ifndef __com_sun_star_util_Date_idl__
42 #include <com/sun/star/util/Date.idl>
43 #endif
45 #ifndef __com_sun_star_util_DateTime_idl__
46 #include <com/sun/star/util/DateTime.idl>
47 #endif
49 #ifndef __com_sun_star_util_Time_idl__
50 #include <com/sun/star/util/Time.idl>
51 #endif
53 module com { module sun { module star { module io {
54 published interface XInputStream;
55 };};};};
57 module com { module sun { module star { module container {
58 published interface XNameAccess;
59 };};};};
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;
66 };};};};
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.
82 @returns
83 <TRUE/> if so
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.
91 @returns
92 the column value
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.
100 @returns
101 the column value
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.
109 @returns
110 the column value
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.
118 @returns
119 the column value
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.
127 @returns
128 the column value
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.
136 @returns
137 the column value
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.
145 @returns
146 the column value
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.
154 @returns
155 the column value
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.
173 @returns
174 the column value
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.
183 @returns
184 the column value
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.
193 @returns
194 the column value
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.
215 </p>
216 @returns
217 the column value
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
228 LONGVARCHAR 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 available or not.
237 </p>
238 @returns
239 the column value
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
249 <code>Map</code>
250 object
251 for the custom mapping of the SQL structure or distinct type
252 that is being retrieved.
253 @param typeMap
254 the type map is used to fetch the correct type
255 @returns
256 the column value
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(&lt;structured-type&gt) column value from the current row.
266 @returns
267 the column value
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.
275 @returns
276 the column value
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.
284 @returns
285 the column value
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.
293 @returns
294 the column value
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 //=============================================================================
303 }; }; }; };
305 /*===========================================================================
306 ===========================================================================*/
307 #endif