xref: /aoo42x/main/offapi/com/sun/star/sdbc/XRow.idl (revision d1766043)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_sdbc_XRow_idl__
24#define __com_sun_star_sdbc_XRow_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_util_Date_idl__
31#include <com/sun/star/util/Date.idl>
32#endif
33
34#ifndef __com_sun_star_util_DateTime_idl__
35#include <com/sun/star/util/DateTime.idl>
36#endif
37
38#ifndef __com_sun_star_util_Time_idl__
39#include <com/sun/star/util/Time.idl>
40#endif
41
42 module com {  module sun {  module star {  module io {
43 published interface XInputStream;
44};};};};
45
46 module com {  module sun {  module star {  module container {
47 published interface XNameAccess;
48};};};};
49
50#ifndef __com_sun_star_sdbc_SQLException_idl__
51#include <com/sun/star/sdbc/SQLException.idl>
52#endif
53
54 module com {  module sun {  module star {  module sdbc {
55
56 published interface XRef;
57 published interface XArray;
58 published interface XBlob;
59 published interface XClob;
60
61
62/** is used to access data which is collected in a row.
63	All methods raise a
64	<type scope="com::sun::star::sdbc">SQLException</type>
65	if a database access error occurs.
66 */
67published interface XRow: com::sun::star::uno::XInterface
68{
69	//-------------------------------------------------------------------------
70
71	/** reports whether the last column read had a value of SQL NULL.
72		Note that you must first call getXXX on a column to try to read
73		its value and then call wasNull() to see if the value read was
74		SQL NULL.
75
76		@returns
77			<TRUE/> if last column read was SQL NULL and <FALSE/> otherwise
78		@throws SQLException
79				if a database access error occurs.
80	 */
81	boolean wasNull() raises (SQLException);
82	//-------------------------------------------------------------------------
83
84	/** gets the value of a column in the current row as a string.
85		@param columnIndex
86			the first column is 1, the second is 2,
87		@returns
88			the column value; if the value is SQL NULL, the result is null
89		@throws SQLException
90				if a database access error occurs.
91	 */
92	string getString([in]long columnIndex) raises (SQLException);
93	//-------------------------------------------------------------------------
94
95	/** gets the value of a column in the current row as boolean.
96		@param columnIndex
97			the first column is 1, the second is 2,
98		@returns
99			the column value; if the value is SQL NULL, the result is null
100		@throws SQLException
101				if a database access error occurs.
102	 */
103	boolean getBoolean([in]long columnIndex) raises (SQLException);
104	//-------------------------------------------------------------------------
105
106	/** get the value of a column in the current row as a byte.
107		@param columnIndex
108			the first column is 1, the second is 2,
109		@returns
110			the column value; if the value is SQL NULL, the result is null
111		@throws SQLException
112				if a database access error occurs.
113	 */
114	byte getByte([in]long columnIndex) raises (SQLException);
115	//-------------------------------------------------------------------------
116
117	/** gets the value of a column in the current row as a short.
118		@param columnIndex
119			the first column is 1, the second is 2,
120		@returns
121			the column value; if the value is SQL NULL, the result is null
122		@throws SQLException
123				if a database access error occurs.
124	 */
125	short getShort([in]long columnIndex) raises (SQLException);
126	//-------------------------------------------------------------------------
127
128	/** get the value of a column in the current row as an integer.
129		@param columnIndex
130			the first column is 1, the second is 2,
131		@returns
132			the column value; if the value is SQL NULL, the result is null
133		@throws SQLException
134				if a database access error occurs.
135	 */
136	long getInt([in]long columnIndex) raises (SQLException);
137	//-------------------------------------------------------------------------
138
139	/** get the value of a column in the current row as a long.
140		@param columnIndex
141			the first column is 1, the second is 2,
142		@returns
143			the column value; if the value is SQL NULL, the result is null
144		@throws SQLException
145				if a database access error occurs.
146	 */
147	hyper getLong([in]long columnIndex) raises (SQLException);
148	//-------------------------------------------------------------------------
149
150	/** gets the value of a column in the current row as a float.
151		@param columnIndex
152			the first column is 1, the second is 2,
153		@returns
154			the column value; if the value is SQL NULL, the result is null
155		@throws SQLException
156				if a database access error occurs.
157	 */
158	float getFloat([in]long columnIndex) raises (SQLException);
159	//-------------------------------------------------------------------------
160
161	/** gets the value of a column in the current row as a double.
162		@param columnIndex
163			the first column is 1, the second is 2,
164		@returns
165			the column value; if the value is SQL NULL, the result is null
166		@throws SQLException
167				if a database access error occurs.
168	 */
169	double getDouble([in]long columnIndex) raises (SQLException);
170	//-------------------------------------------------------------------------
171
172	/** gets the value of a column in the current row as a byte array.
173		     The bytes represent the raw values returned by the driver.
174			 @param columnIndex
175				the first column is 1, the second is 2, ...
176		     @returns
177				the column value; if the value is SQL NULL, the result is empty.
178		     @throws SQLException
179				if a database access error occurs.
180	 */
181	sequence<byte> getBytes([in]long columnIndex) raises (SQLException);
182	//-------------------------------------------------------------------------
183
184	/** gets the value of a column in the current row as a date object.
185		@param columnIndex
186			the first column is 1, the second is 2,
187		@returns
188			the column value; if the value is SQL NULL, the result is null
189		@throws SQLException
190				if a database access error occurs.
191	 */
192	com::sun::star::util::Date getDate([in]long columnIndex)
193		raises (SQLException);
194	//-------------------------------------------------------------------------
195
196	/** gets the value of a column in the current row as a time object.
197		@param columnIndex
198			the first column is 1, the second is 2,
199		@returns
200			the column value; if the value is SQL NULL, the result is null
201		@throws SQLException
202				if a database access error occurs.
203	 */
204	com::sun::star::util::Time getTime([in]long columnIndex)
205		raises (SQLException);
206	//-------------------------------------------------------------------------
207
208	/** gets the value of a column in the current row as a datetime object.
209		@param columnIndex
210			the first column is 1, the second is 2,
211		@returns
212			the column value; if the value is SQL NULL, the result is null
213		@throws SQLException
214				if a database access error occurs.
215	 */
216	com::sun::star::util::DateTime getTimestamp([in]long columnIndex)
217		raises (SQLException);
218	//-------------------------------------------------------------------------
219
220	/** gets the value of a column in the current row as a stream of
221		uninterpreted bytes. The value can then be read in chunks from the
222		stream. This method is particularly suitable for retrieving large
223		LONGVARBINARY values.
224
225
226		<p>
227		<b>Note:</b> All the data in the returned stream must be
228		read prior to getting the value of any other column. The next
229		call to a get method implicitly closes the stream. Also, a
230		stream may return 0 when the method
231		<member scope="com::sun::star::io">XInputStream::available()</member>
232		is called whether there is data
233		available or not.
234		</p>
235		@param columnIndex
236			the first column is 1, the second is 2,
237		@returns
238			the column value; if the value is SQL NULL, the result is null
239		@throws SQLException
240				if a database access error occurs.
241	 */
242	com::sun::star::io::XInputStream getBinaryStream([in]long columnIndex)
243        raises (SQLException);
244	//-------------------------------------------------------------------------
245
246	/** gets the value of a column in the current row as a stream of
247		uninterpreted bytes. The value can then be read in chunks from the
248		stream. This method is particularly suitable for retrieving large
249		LONGVARBINARY or LONGVARCHAR values.
250
251
252		<p>
253		<b>Note:</b> All the data in the returned stream must be
254		read prior to getting the value of any other column. The next
255		call to a get method implicitly closes the stream. Also, a
256		stream may return 0 when the method
257		<member scope="com::sun::star::io">XInputStream::available()</member>
258		is called whether there is data
259		available or not.
260		</p>
261		@param columnIndex
262			the first column is 1, the second is 2,
263		@returns
264			the column value; if the value is SQL NULL, the result is null
265		@throws SQLException
266				if a database access error occurs.
267	 */
268	com::sun::star::io::XInputStream getCharacterStream([in]long columnIndex)
269        raises (SQLException);
270	//-------------------------------------------------------------------------
271
272	/** returns the value of a column in the current row as an object.
273		This method uses the given
274		<code>Map</code>
275		object for the custom mapping of the SQL structure or distinct type
276		that is being retrieved.
277		@param columnIndex
278			the first column is 1, the second is 2,
279		@param typeMap
280			the map of types which should be used to get the column value
281		@returns
282			the column value; if the value is SQL NULL, the result is null
283		@throws SQLException
284				if a database access error occurs.
285	 */
286	any getObject([in]long columnIndex,
287			      [in]com::sun::star::container::XNameAccess typeMap)
288		raises (SQLException);
289    //-------------------------------------------------------------------------
290
291	/** gets a REF(&amp;lt;structured-type&amp;gt;) column value from the current row.
292		@param columnIndex
293			the first column is 1, the second is 2,
294		@returns
295			the column value; if the value is SQL NULL, the result is null
296		@throws SQLException
297				if a database access error occurs.
298	 */
299	XRef getRef([in]long columnIndex) raises (SQLException);
300	//-------------------------------------------------------------------------
301
302	/** gets a BLOB value in the current row.
303		@param columnIndex
304			the first column is 1, the second is 2,
305		@returns
306			the column value; if the value is SQL NULL, the result is null
307		@throws SQLException
308				if a database access error occurs.
309	 */
310	XBlob getBlob([in]long columnIndex) raises (SQLException);
311	//-------------------------------------------------------------------------
312
313	/** gets a CLOB value in the current row of this
314		<code>ResultSet</code>
315		object.
316		@param columnIndex
317			the first column is 1, the second is 2,
318		@returns
319			the column value; if the value is SQL NULL, the result is null
320		@throws SQLException
321			if a database access error occurs.
322	 */
323	XClob getClob([in]long columnIndex) raises (SQLException);
324	//-------------------------------------------------------------------------
325
326	/** gets a SQL ARRAY value from the current row of this
327		<code>ResultSet</code>
328		object.
329		@param columnIndex
330			the first column is 1, the second is 2,
331		@returns
332			the column value; if the value is SQL NULL, the result is null
333		@throws SQLException
334				if a database access error occurs.
335	 */
336	XArray getArray([in]long columnIndex) raises (SQLException);
337};
338
339//=============================================================================
340
341}; }; }; };
342
343/*===========================================================================
344===========================================================================*/
345#endif
346