1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10*d1766043SAndrew Rist * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*d1766043SAndrew Rist * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19*d1766043SAndrew Rist * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_sdbc_ResultSet_idl__ 24cdf0e10cSrcweir#define __com_sun_star_sdbc_ResultSet_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_lang_XComponent_idl__ 27cdf0e10cSrcweir#include <com/sun/star/lang/XComponent.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__ 31cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir#ifndef __com_sun_star_util_XCancellable_idl__ 35cdf0e10cSrcweir#include <com/sun/star/util/XCancellable.idl> 36cdf0e10cSrcweir#endif 37cdf0e10cSrcweir 38cdf0e10cSrcweir module com { module sun { module star { module sdbc { 39cdf0e10cSrcweir 40cdf0e10cSrcweir published interface XStatement; 41cdf0e10cSrcweir published interface XRow; 42cdf0e10cSrcweir published interface XRowUpdate; 43cdf0e10cSrcweir published interface XResultSet; 44cdf0e10cSrcweir published interface XResultSetUpdate; 45cdf0e10cSrcweir published interface XResultSetMetaDataSupplier; 46cdf0e10cSrcweir published interface XWarningsSupplier; 47cdf0e10cSrcweir published interface XColumnLocate; 48cdf0e10cSrcweir published interface XCloseable; 49cdf0e10cSrcweir 50cdf0e10cSrcweir 51cdf0e10cSrcweir/** provides access to a table of data. A ResultSet 52cdf0e10cSrcweir object is usually generated by executing a Statement. 53cdf0e10cSrcweir 54cdf0e10cSrcweir 55cdf0e10cSrcweir 56cdf0e10cSrcweir <p> 57cdf0e10cSrcweir A ResultSet maintains a cursor pointing to its current row of 58cdf0e10cSrcweir data. Initially the cursor is positioned before the first row. 59cdf0e10cSrcweir The 'next' method moves the cursor to the next row. 60cdf0e10cSrcweir </p> 61cdf0e10cSrcweir <p> 62cdf0e10cSrcweir The getXXX methods retrieve column values for the current 63cdf0e10cSrcweir row. You can retrieve values using either the index number of the 64cdf0e10cSrcweir column. Columns are numbered from 1. 65cdf0e10cSrcweir </p> 66cdf0e10cSrcweir <p> 67cdf0e10cSrcweir For maximum portability, ResultSet columns within each row should be 68cdf0e10cSrcweir read in left-to-right order and each column should be read only once. 69cdf0e10cSrcweir </p> 70cdf0e10cSrcweir <p> 71cdf0e10cSrcweir For the getXXX methods, the SDBC driver attempts to convert the 72cdf0e10cSrcweir underlying data to the specified type and returns a suitable 73cdf0e10cSrcweir value. 74cdf0e10cSrcweir </p> 75cdf0e10cSrcweir <p> 76cdf0e10cSrcweir Column names used as input to the findColumn method are case 77cdf0e10cSrcweir insensitive. When several columns have the same name, then the value 78cdf0e10cSrcweir of the first matching column will be returned. The column name option is 79cdf0e10cSrcweir designed to be used when column names are used in the SQL 80cdf0e10cSrcweir query. For columns that are NOT explicitly named in the query, it 81cdf0e10cSrcweir is best to use column numbers. If column names are used, there is 82cdf0e10cSrcweir no way for the programmer to guarantee that they actually refer to 83cdf0e10cSrcweir the intended columns. 84cdf0e10cSrcweir </p> 85cdf0e10cSrcweir <p> 86cdf0e10cSrcweir A ResultSet is automatically closed (disposed) by the Statement that 87cdf0e10cSrcweir generated it when that Statement is closed, re-executed, or used 88cdf0e10cSrcweir to retrieve the next result from a sequence of multiple results. 89cdf0e10cSrcweir </p> 90cdf0e10cSrcweir <p> 91cdf0e10cSrcweir The number, types, and properties of a ResultSet's columns are 92cdf0e10cSrcweir provided by the ResultSetMetaData object returned by the getMetaData 93cdf0e10cSrcweir method. 94cdf0e10cSrcweir </p> 95cdf0e10cSrcweir */ 96cdf0e10cSrcweirpublished service ResultSet 97cdf0e10cSrcweir{ 98cdf0e10cSrcweir 99cdf0e10cSrcweir /** optional for implementation; controls the releasing of resources 100cdf0e10cSrcweir and the notification of registered listeners. 101cdf0e10cSrcweir */ 102cdf0e10cSrcweir [optional] interface com::sun::star::lang::XComponent; 103cdf0e10cSrcweir 104cdf0e10cSrcweir 105cdf0e10cSrcweir /** freeing all resources of a result set. 106cdf0e10cSrcweir 107cdf0e10cSrcweir <p> 108cdf0e10cSrcweir The creating statement will still be open after disposing. 109cdf0e10cSrcweir </p> 110cdf0e10cSrcweir 111cdf0e10cSrcweir <p> 112cdf0e10cSrcweir This interface is mandatory only for JDBC conformance, 113cdf0e10cSrcweir otherwise it is optional. 114cdf0e10cSrcweir </p> 115cdf0e10cSrcweir */ 116cdf0e10cSrcweir [optional] interface XCloseable; 117cdf0e10cSrcweir 118cdf0e10cSrcweir // gives access to the properties. 119cdf0e10cSrcweir interface com::sun::star::beans::XPropertySet; 120cdf0e10cSrcweir 121cdf0e10cSrcweir 122cdf0e10cSrcweir /** controls the chaining of warnings, which may occur on every call 123cdf0e10cSrcweir to the connected database. 124cdf0e10cSrcweir 125cdf0e10cSrcweir <p> 126cdf0e10cSrcweir Chained warnings from previous calls will be cleared before processing a new call. 127cdf0e10cSrcweir </p> 128cdf0e10cSrcweir 129cdf0e10cSrcweir <p> 130cdf0e10cSrcweir This interface is mandatory only for JDBC conformance, otherwise it is optional. 131cdf0e10cSrcweir </p> 132cdf0e10cSrcweir */ 133cdf0e10cSrcweir [optional] interface XWarningsSupplier; 134cdf0e10cSrcweir 135cdf0e10cSrcweir 136cdf0e10cSrcweir /** provides the access to the result set description. 137cdf0e10cSrcweir */ 138cdf0e10cSrcweir interface XResultSetMetaDataSupplier; 139cdf0e10cSrcweir 140cdf0e10cSrcweir 141cdf0e10cSrcweir /** is the interface for navigating on the rows on a result set. 142cdf0e10cSrcweir */ 143cdf0e10cSrcweir interface XResultSet; 144cdf0e10cSrcweir 145cdf0e10cSrcweir 146cdf0e10cSrcweir /** is the interface for updating row data to the database. 147cdf0e10cSrcweir 148cdf0e10cSrcweir <p> 149cdf0e10cSrcweir The implementation is optional. 150cdf0e10cSrcweir </p> 151cdf0e10cSrcweir */ 152cdf0e10cSrcweir [optional] interface XResultSetUpdate; 153cdf0e10cSrcweir 154cdf0e10cSrcweir 155cdf0e10cSrcweir /** is the interface for accessing the data of the current row. 156cdf0e10cSrcweir */ 157cdf0e10cSrcweir interface XRow; 158cdf0e10cSrcweir 159cdf0e10cSrcweir 160cdf0e10cSrcweir /** is used for locating a column by it's name. 161cdf0e10cSrcweir */ 162cdf0e10cSrcweir interface XColumnLocate; 163cdf0e10cSrcweir 164cdf0e10cSrcweir 165cdf0e10cSrcweir /** is the interface for updating the data of the current row. 166cdf0e10cSrcweir 167cdf0e10cSrcweir <p> 168cdf0e10cSrcweir The implementation is optional. 169cdf0e10cSrcweir </p> 170cdf0e10cSrcweir */ 171cdf0e10cSrcweir [optional] interface XRowUpdate; 172cdf0e10cSrcweir 173cdf0e10cSrcweir 174cdf0e10cSrcweir /** defines the SQL cursor name that will be used by subsequent Statement 175cdf0e10cSrcweir <code>execute</code> 176cdf0e10cSrcweir methods. 177cdf0e10cSrcweir 178cdf0e10cSrcweir 179cdf0e10cSrcweir <p> 180cdf0e10cSrcweir This name can then be used in SQL positioned update/delete statements to 181cdf0e10cSrcweir identify the current row in the ResultSet generated by this statement. If 182cdf0e10cSrcweir the database doesn't support positioned update/delete, this property is 183cdf0e10cSrcweir a noop. To insure that a cursor has the proper isolation level to support 184cdf0e10cSrcweir updates, the cursor's SELECT statement should be of the form 185cdf0e10cSrcweir 'select for update ...'. If the 'for update' phrase is omitted, 186cdf0e10cSrcweir positioned updates may fail. 187cdf0e10cSrcweir </p> 188cdf0e10cSrcweir <p> 189cdf0e10cSrcweir <b> 190cdf0e10cSrcweir Note: 191cdf0e10cSrcweir </b> 192cdf0e10cSrcweir By definition, positioned update/delete 193cdf0e10cSrcweir execution must be done by a different Statement than the one 194cdf0e10cSrcweir which generated the ResultSet being used for positioning. Also, 195cdf0e10cSrcweir cursor names must be unique within a connection. 196cdf0e10cSrcweir </p> 197cdf0e10cSrcweir */ 198cdf0e10cSrcweir [optional, readonly, property] string CursorName; 199cdf0e10cSrcweir 200cdf0e10cSrcweir 201cdf0e10cSrcweir /** retrieves the result set concurrency. 202cdf0e10cSrcweir 203cdf0e10cSrcweir @see com::sun::star::sdbc::ResultSetConcurrency 204cdf0e10cSrcweir */ 205cdf0e10cSrcweir [readonly, property] long ResultSetConcurrency; 206cdf0e10cSrcweir 207cdf0e10cSrcweir 208cdf0e10cSrcweir /** determines the result set type. 209cdf0e10cSrcweir 210cdf0e10cSrcweir @see com::sun::star::sdbc::ResultSetType 211cdf0e10cSrcweir */ 212cdf0e10cSrcweir [readonly, property] long ResultSetType; 213cdf0e10cSrcweir 214cdf0e10cSrcweir 215cdf0e10cSrcweir /** retrieves the direction for fetching rows from database tables 216cdf0e10cSrcweir that is the default for result sets generated from this 217cdf0e10cSrcweir <type scope="com::sun::star::sdbcx">Statement</type> 218cdf0e10cSrcweir object. 219cdf0e10cSrcweir <br/> 220cdf0e10cSrcweir If this <code>Statement</code> object has not set a fetch direction, 221cdf0e10cSrcweir the return value is implementation-specific. 222cdf0e10cSrcweir */ 223cdf0e10cSrcweir [property] long FetchDirection; 224cdf0e10cSrcweir 225cdf0e10cSrcweir 226cdf0e10cSrcweir /** retrieves the number of result set rows that is the default fetch size 227cdf0e10cSrcweir for result sets generated from this 228cdf0e10cSrcweir <type scope="com::sun::star::sdbcx">Statement</type> 229cdf0e10cSrcweir object. 230cdf0e10cSrcweir <br/> 231cdf0e10cSrcweir If this 232cdf0e10cSrcweir <type scope="com::sun::star::sdbcx">Statement</type> 233cdf0e10cSrcweir object has not set a fetch size, 234cdf0e10cSrcweir the return value is implementation-specific. 235cdf0e10cSrcweir */ 236cdf0e10cSrcweir [property] long FetchSize; 237cdf0e10cSrcweir}; 238cdf0e10cSrcweir 239cdf0e10cSrcweir//============================================================================= 240cdf0e10cSrcweir 241cdf0e10cSrcweir}; }; }; }; 242cdf0e10cSrcweir 243cdf0e10cSrcweir/*=========================================================================== 244cdf0e10cSrcweir===========================================================================*/ 245cdf0e10cSrcweir#endif 246