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_ucb_ContentResultSet_idl__
28 #define __com_sun_star_ucb_ContentResultSet_idl__
30 #ifndef __com_sun_star_lang_XComponent_idl__
31 #include
<com
/sun
/star
/lang
/XComponent.idl
>
34 #ifndef __com_sun_star_beans_XPropertySet_idl__
35 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
38 #ifndef __com_sun_star_sdbc_XResultSet_idl__
39 #include
<com
/sun
/star
/sdbc
/XResultSet.idl
>
42 #ifndef __com_sun_star_sdbc_XResultSetMetaDataSupplier_idl__
43 #include
<com
/sun
/star
/sdbc
/XResultSetMetaDataSupplier.idl
>
46 #ifndef __com_sun_star_sdbc_XRow_idl__
47 #include
<com
/sun
/star
/sdbc
/XRow.idl
>
50 #ifndef __com_sun_star_sdbc_XCloseable_idl__
51 #include
<com
/sun
/star
/sdbc
/XCloseable.idl
>
54 #ifndef __com_sun_star_ucb_XContentAccess_idl__
55 #include
<com
/sun
/star
/ucb
/XContentAccess.idl
>
58 #ifndef __com_sun_star_sdbc_ResultSet_idl__
59 #include
<com
/sun
/star
/sdbc
/ResultSet.idl
>
62 //=============================================================================
64 module com
{ module sun
{ module star
{ module ucb
{
66 //=============================================================================
67 /** provides access to the children of a folder content.
69 <p>It can be understand as a table containing a row for each child. The
70 table columns may contain values of properties of the children.
72 published service ContentResultSet
74 //-------------------------------------------------------------------------
75 /** must be implemented to make it possible to resolve cyclic object
76 references ( i.e. between an implementation of
77 <type scope="com::sun::star::beans">XPropertySet</type>
78 - which may hold property change listeners - and
79 <type scope="com::sun::star::beans">XPropertyChangeListener</type>
80 - which may hold the property set ).
82 <p>This interface is required.
84 interface com
::sun
::star
::lang
::XComponent
;
86 /** provides access to the result set meta data. Meta data are for
87 example the number of columns of the result set, information
88 on the data types of columns, column names, and more.
90 <p>This interface is required.
92 interface com
::sun
::star
::sdbc
::XResultSetMetaDataSupplier
;
94 //-------------------------------------------------------------------------
95 /** enables travelling through the result set members ( the contents ).
96 This interface mainly provides a cursor for the result set.
98 <p>Note that every method of this interface implementation additionally
99 may throw a <type>ResultSetException</type> ( which is derived from
100 <type scope="com::sun::star::sdbc">SQLException</type> to be compatible
101 to that interface ). The new exception transports another exception,
102 which indicates the reason for the failure of the method call.
104 <p>This interface is required.
106 interface com
::sun
::star
::sdbc
::XResultSet
;
108 //-------------------------------------------------------------------------
109 /** provides access to data of the content the cursor is pointing to.
111 <p>Note that every method of this interface implementation additionally
112 may throw a <type>ResultSetException</type> ( which is derived from
113 <type scope="com::sun::star::sdbc">SQLException</type> to be compatible
114 to that interface ). The new exception transports another exception,
115 which indicates the reason for the failure of the method call.
117 <p>This interface is required.
119 interface com
::sun
::star
::sdbc
::XRow
;
121 //-------------------------------------------------------------------------
122 /** makes it possible to abort running activities ( i.e. to cancel
123 retrieving data from a server ).
125 <p>Note that every method of this interface implementation additionally
126 may throw a <type>ResultSetException</type> ( which is derived from
127 <type scope="com::sun::star::sdbc">SQLException</type> to be compatible
128 to that interface ). The new exception transports another exception,
129 which indicates the reason for the failure of the method call.
131 <p>This interface is required.
133 interface com
::sun
::star
::sdbc
::XCloseable
;
135 //-------------------------------------------------------------------------
136 /** holds properties of the resultset.
138 <p>This interface is required.
140 interface com
::sun
::star
::beans
::XPropertySet
;
142 //-------------------------------------------------------------------------
143 /** controls the travel mode of the resultset cursor.
145 <p>There are two possible travel modes:
148 <tr><td><member>CursorTravelMode::BLOCKING</member></td>
149 <td>Each travel method of the resultset will not return until the
150 data for the new position were retrieved.</td></tr>
151 <tr><td><member>CursorTravelMode::NONBLOCKING</member></td>
152 <td>The implementation will throw a
153 <code>CursorWouldBlockException</code>, if the data for the new
154 position are not retrieved yet.</td></tr>
157 <p>The following pseudo-code illustrates the usage of a non-blocking
161 bProcessedAllRows = false
162 while ( !bProcessedAllRows )
164 cursor.setPropertyValue( "CursorTravelMode", BLOCKING )
166 cursor.travelSomeWhere()
169 cursor.setPropertyValue( "CursorTravelMode", NONBLOCKING )
176 cursor.travelSomeWhere()
179 catch ( CursorWouldBlockException )
181 // No more data at the moment.
186 doSomethingWithCollectedRowData()
188 bProcessedAllRows = ...
193 If this property is not supported, the implementation needs to provide
198 The implementation initially needs to set the value of this property
199 to <member>CursorTravelMode::BLOCKING</member>.
202 @see CursorTravelMode
204 [optional, property
] long CursorTravelMode
;
206 /** contains the number of rows obtained (so far) from the data source. */
207 [readonly, property
] long RowCount
;
209 /** indicates that all rows of te resultset have been obtained. */
210 [readonly, property
] boolean IsRowCountFinal
;
212 //-------------------------------------------------------------------------
213 /** provides access to the content identifier and the content object
216 <p>This interface is required.
218 interface XContentAccess
;
220 //-------------------------------------------------------------------------
221 /** can be implemented to provide a complete JDBC conform result set
222 interface for the implementation of this service.
224 <p>The implememtation of this service is optional.
226 service com
::sun
::star
::sdbc
::ResultSet
;
229 //=============================================================================