1*7b6bd0c4SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*7b6bd0c4SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*7b6bd0c4SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*7b6bd0c4SAndrew Rist * distributed with this work for additional information 6*7b6bd0c4SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*7b6bd0c4SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*7b6bd0c4SAndrew Rist * "License"); you may not use this file except in compliance 9*7b6bd0c4SAndrew Rist * with the License. You may obtain a copy of the License at 10*7b6bd0c4SAndrew Rist * 11*7b6bd0c4SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*7b6bd0c4SAndrew Rist * 13*7b6bd0c4SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*7b6bd0c4SAndrew Rist * software distributed under the License is distributed on an 15*7b6bd0c4SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*7b6bd0c4SAndrew Rist * KIND, either express or implied. See the License for the 17*7b6bd0c4SAndrew Rist * specific language governing permissions and limitations 18*7b6bd0c4SAndrew Rist * under the License. 19*7b6bd0c4SAndrew Rist * 20*7b6bd0c4SAndrew Rist *************************************************************/ 21*7b6bd0c4SAndrew Rist 22*7b6bd0c4SAndrew Rist 23cdf0e10cSrcweir #ifndef _RESULTSETBASE_HXX 24cdf0e10cSrcweir #define _RESULTSETBASE_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #ifndef INCLUDED_STL_VECTOR 27cdf0e10cSrcweir #include <vector> 28cdf0e10cSrcweir #define INCLUDED_STL_VECTOR 29cdf0e10cSrcweir #endif 30cdf0e10cSrcweir #include <cppuhelper/weak.hxx> 31cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.hxx> 32cdf0e10cSrcweir #include <com/sun/star/lang/XComponent.hpp> 33cdf0e10cSrcweir #include <com/sun/star/ucb/XContentAccess.hpp> 34cdf0e10cSrcweir #include <com/sun/star/sdbc/XCloseable.hpp> 35cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 36cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSet.hpp> 37cdf0e10cSrcweir #include <com/sun/star/sdbc/XRow.hpp> 38cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp> 39cdf0e10cSrcweir #include <com/sun/star/ucb/NumberedSortingInfo.hpp> 40cdf0e10cSrcweir #include <com/sun/star/ucb/XContentProvider.hpp> 41cdf0e10cSrcweir #include <com/sun/star/ucb/XContentIdentifier.hpp> 42cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp> 43cdf0e10cSrcweir #include <com/sun/star/beans/Property.hpp> 44cdf0e10cSrcweir 45cdf0e10cSrcweir 46cdf0e10cSrcweir namespace chelp { 47cdf0e10cSrcweir 48cdf0e10cSrcweir class ResultSetBase 49cdf0e10cSrcweir : public cppu::OWeakObject, 50cdf0e10cSrcweir public com::sun::star::lang::XComponent, 51cdf0e10cSrcweir public com::sun::star::sdbc::XRow, 52cdf0e10cSrcweir public com::sun::star::sdbc::XResultSet, 53cdf0e10cSrcweir public com::sun::star::sdbc::XCloseable, 54cdf0e10cSrcweir public com::sun::star::sdbc::XResultSetMetaDataSupplier, 55cdf0e10cSrcweir public com::sun::star::beans::XPropertySet, 56cdf0e10cSrcweir public com::sun::star::ucb::XContentAccess 57cdf0e10cSrcweir { 58cdf0e10cSrcweir public: 59cdf0e10cSrcweir 60cdf0e10cSrcweir ResultSetBase( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF, 61cdf0e10cSrcweir const com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider >& xProvider, 62cdf0e10cSrcweir sal_Int32 nOpenMode, 63cdf0e10cSrcweir const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& seq, 64cdf0e10cSrcweir const com::sun::star::uno::Sequence< com::sun::star::ucb::NumberedSortingInfo >& seqSort ); 65cdf0e10cSrcweir 66cdf0e10cSrcweir virtual ~ResultSetBase(); 67cdf0e10cSrcweir 68cdf0e10cSrcweir // XInterface 69cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL 70cdf0e10cSrcweir queryInterface( 71cdf0e10cSrcweir const com::sun::star::uno::Type& aType ) 72cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException); 73cdf0e10cSrcweir 74cdf0e10cSrcweir virtual void SAL_CALL 75cdf0e10cSrcweir acquire( 76cdf0e10cSrcweir void ) 77cdf0e10cSrcweir throw(); 78cdf0e10cSrcweir 79cdf0e10cSrcweir virtual void SAL_CALL 80cdf0e10cSrcweir release( 81cdf0e10cSrcweir void ) 82cdf0e10cSrcweir throw(); 83cdf0e10cSrcweir 84cdf0e10cSrcweir // XComponent 85cdf0e10cSrcweir virtual void SAL_CALL 86cdf0e10cSrcweir dispose( 87cdf0e10cSrcweir void ) 88cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 89cdf0e10cSrcweir 90cdf0e10cSrcweir virtual void SAL_CALL 91cdf0e10cSrcweir addEventListener( 92cdf0e10cSrcweir const com::sun::star::uno::Reference< com::sun::star::lang::XEventListener >& xListener ) 93cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 94cdf0e10cSrcweir 95cdf0e10cSrcweir virtual void SAL_CALL 96cdf0e10cSrcweir removeEventListener( const com::sun::star::uno::Reference< com::sun::star::lang::XEventListener >& aListener ) 97cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 98cdf0e10cSrcweir 99cdf0e10cSrcweir 100cdf0e10cSrcweir // XRow 101cdf0e10cSrcweir virtual sal_Bool SAL_CALL wasNull(void)102cdf0e10cSrcweir wasNull( 103cdf0e10cSrcweir void ) 104cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 105cdf0e10cSrcweir com::sun::star::uno::RuntimeException ) 106cdf0e10cSrcweir { 107cdf0e10cSrcweir if( 0<= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 108cdf0e10cSrcweir m_nWasNull = m_aItems[m_nRow]->wasNull(); 109cdf0e10cSrcweir else 110cdf0e10cSrcweir m_nWasNull = true; 111cdf0e10cSrcweir return m_nWasNull; 112cdf0e10cSrcweir } 113cdf0e10cSrcweir 114cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getString(sal_Int32 columnIndex)115cdf0e10cSrcweir getString( 116cdf0e10cSrcweir sal_Int32 columnIndex ) 117cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 118cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 119cdf0e10cSrcweir { 120cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 121cdf0e10cSrcweir return m_aItems[m_nRow]->getString( columnIndex ); 122cdf0e10cSrcweir else 123cdf0e10cSrcweir return rtl::OUString(); 124cdf0e10cSrcweir } 125cdf0e10cSrcweir 126cdf0e10cSrcweir virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex)127cdf0e10cSrcweir getBoolean( 128cdf0e10cSrcweir sal_Int32 columnIndex ) 129cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 130cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 131cdf0e10cSrcweir { 132cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 133cdf0e10cSrcweir return m_aItems[m_nRow]->getBoolean( columnIndex ); 134cdf0e10cSrcweir else 135cdf0e10cSrcweir return false; 136cdf0e10cSrcweir } 137cdf0e10cSrcweir 138cdf0e10cSrcweir virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex)139cdf0e10cSrcweir getByte( 140cdf0e10cSrcweir sal_Int32 columnIndex ) 141cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 142cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 143cdf0e10cSrcweir { 144cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 145cdf0e10cSrcweir return m_aItems[m_nRow]->getByte( columnIndex ); 146cdf0e10cSrcweir else 147cdf0e10cSrcweir return sal_Int8( 0 ); 148cdf0e10cSrcweir } 149cdf0e10cSrcweir 150cdf0e10cSrcweir virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex)151cdf0e10cSrcweir getShort( 152cdf0e10cSrcweir sal_Int32 columnIndex ) 153cdf0e10cSrcweir throw( 154cdf0e10cSrcweir com::sun::star::sdbc::SQLException, 155cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 156cdf0e10cSrcweir { 157cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 158cdf0e10cSrcweir return m_aItems[m_nRow]->getShort( columnIndex ); 159cdf0e10cSrcweir else 160cdf0e10cSrcweir return sal_Int16( 0 ); 161cdf0e10cSrcweir } 162cdf0e10cSrcweir 163cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex)164cdf0e10cSrcweir getInt( 165cdf0e10cSrcweir sal_Int32 columnIndex ) 166cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 167cdf0e10cSrcweir com::sun::star::uno::RuntimeException ) 168cdf0e10cSrcweir { 169cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 170cdf0e10cSrcweir return m_aItems[m_nRow]->getInt( columnIndex ); 171cdf0e10cSrcweir else 172cdf0e10cSrcweir return sal_Int32( 0 ); 173cdf0e10cSrcweir } 174cdf0e10cSrcweir 175cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex)176cdf0e10cSrcweir getLong( 177cdf0e10cSrcweir sal_Int32 columnIndex ) 178cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 179cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 180cdf0e10cSrcweir { 181cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 182cdf0e10cSrcweir return m_aItems[m_nRow]->getLong( columnIndex ); 183cdf0e10cSrcweir else 184cdf0e10cSrcweir return sal_Int64( 0 ); 185cdf0e10cSrcweir } 186cdf0e10cSrcweir 187cdf0e10cSrcweir virtual float SAL_CALL getFloat(sal_Int32 columnIndex)188cdf0e10cSrcweir getFloat( 189cdf0e10cSrcweir sal_Int32 columnIndex ) 190cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 191cdf0e10cSrcweir com::sun::star::uno::RuntimeException ) 192cdf0e10cSrcweir { 193cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 194cdf0e10cSrcweir return m_aItems[m_nRow]->getFloat( columnIndex ); 195cdf0e10cSrcweir else 196cdf0e10cSrcweir return float( 0 ); 197cdf0e10cSrcweir } 198cdf0e10cSrcweir 199cdf0e10cSrcweir virtual double SAL_CALL getDouble(sal_Int32 columnIndex)200cdf0e10cSrcweir getDouble( 201cdf0e10cSrcweir sal_Int32 columnIndex ) 202cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 203cdf0e10cSrcweir com::sun::star::uno::RuntimeException ) 204cdf0e10cSrcweir { 205cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 206cdf0e10cSrcweir return m_aItems[m_nRow]->getDouble( columnIndex ); 207cdf0e10cSrcweir else 208cdf0e10cSrcweir return double( 0 ); 209cdf0e10cSrcweir } 210cdf0e10cSrcweir 211cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex)212cdf0e10cSrcweir getBytes( 213cdf0e10cSrcweir sal_Int32 columnIndex ) 214cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 215cdf0e10cSrcweir com::sun::star::uno::RuntimeException ) 216cdf0e10cSrcweir { 217cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 218cdf0e10cSrcweir return m_aItems[m_nRow]->getBytes( columnIndex ); 219cdf0e10cSrcweir else 220cdf0e10cSrcweir return com::sun::star::uno::Sequence< sal_Int8 >(); 221cdf0e10cSrcweir } 222cdf0e10cSrcweir 223cdf0e10cSrcweir virtual com::sun::star::util::Date SAL_CALL getDate(sal_Int32 columnIndex)224cdf0e10cSrcweir getDate( 225cdf0e10cSrcweir sal_Int32 columnIndex ) 226cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 227cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 228cdf0e10cSrcweir { 229cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 230cdf0e10cSrcweir return m_aItems[m_nRow]->getDate( columnIndex ); 231cdf0e10cSrcweir else 232cdf0e10cSrcweir return com::sun::star::util::Date(); 233cdf0e10cSrcweir } 234cdf0e10cSrcweir 235cdf0e10cSrcweir virtual com::sun::star::util::Time SAL_CALL getTime(sal_Int32 columnIndex)236cdf0e10cSrcweir getTime( 237cdf0e10cSrcweir sal_Int32 columnIndex ) 238cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 239cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 240cdf0e10cSrcweir { 241cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 242cdf0e10cSrcweir return m_aItems[m_nRow]->getTime( columnIndex ); 243cdf0e10cSrcweir else 244cdf0e10cSrcweir return com::sun::star::util::Time(); 245cdf0e10cSrcweir } 246cdf0e10cSrcweir 247cdf0e10cSrcweir virtual com::sun::star::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex)248cdf0e10cSrcweir getTimestamp( 249cdf0e10cSrcweir sal_Int32 columnIndex ) 250cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 251cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 252cdf0e10cSrcweir { 253cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 254cdf0e10cSrcweir return m_aItems[m_nRow]->getTimestamp( columnIndex ); 255cdf0e10cSrcweir else 256cdf0e10cSrcweir return com::sun::star::util::DateTime(); 257cdf0e10cSrcweir } 258cdf0e10cSrcweir 259cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex)260cdf0e10cSrcweir getBinaryStream( 261cdf0e10cSrcweir sal_Int32 columnIndex ) 262cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 263cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 264cdf0e10cSrcweir { 265cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 266cdf0e10cSrcweir return m_aItems[m_nRow]->getBinaryStream( columnIndex ); 267cdf0e10cSrcweir else 268cdf0e10cSrcweir return com::sun::star::uno::Reference< com::sun::star::io::XInputStream >(); 269cdf0e10cSrcweir } 270cdf0e10cSrcweir 271cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex)272cdf0e10cSrcweir getCharacterStream( 273cdf0e10cSrcweir sal_Int32 columnIndex ) 274cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 275cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 276cdf0e10cSrcweir { 277cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 278cdf0e10cSrcweir return m_aItems[m_nRow]->getCharacterStream( columnIndex ); 279cdf0e10cSrcweir else 280cdf0e10cSrcweir return com::sun::star::uno::Reference< com::sun::star::io::XInputStream >(); 281cdf0e10cSrcweir } 282cdf0e10cSrcweir 283cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL getObject(sal_Int32 columnIndex,const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> & typeMap)284cdf0e10cSrcweir getObject( 285cdf0e10cSrcweir sal_Int32 columnIndex, 286cdf0e10cSrcweir const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& typeMap ) 287cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 288cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 289cdf0e10cSrcweir { 290cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 291cdf0e10cSrcweir return m_aItems[m_nRow]->getObject( columnIndex,typeMap ); 292cdf0e10cSrcweir else 293cdf0e10cSrcweir return com::sun::star::uno::Any(); 294cdf0e10cSrcweir } 295cdf0e10cSrcweir 296cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex)297cdf0e10cSrcweir getRef( 298cdf0e10cSrcweir sal_Int32 columnIndex ) 299cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 300cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 301cdf0e10cSrcweir { 302cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 303cdf0e10cSrcweir return m_aItems[m_nRow]->getRef( columnIndex ); 304cdf0e10cSrcweir else 305cdf0e10cSrcweir return com::sun::star::uno::Reference< com::sun::star::sdbc::XRef >(); 306cdf0e10cSrcweir } 307cdf0e10cSrcweir 308cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex)309cdf0e10cSrcweir getBlob( 310cdf0e10cSrcweir sal_Int32 columnIndex ) 311cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 312cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 313cdf0e10cSrcweir { 314cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 315cdf0e10cSrcweir return m_aItems[m_nRow]->getBlob( columnIndex ); 316cdf0e10cSrcweir else 317cdf0e10cSrcweir return com::sun::star::uno::Reference< com::sun::star::sdbc::XBlob >(); 318cdf0e10cSrcweir } 319cdf0e10cSrcweir 320cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex)321cdf0e10cSrcweir getClob( 322cdf0e10cSrcweir sal_Int32 columnIndex ) 323cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 324cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 325cdf0e10cSrcweir { 326cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 327cdf0e10cSrcweir return m_aItems[m_nRow]->getClob( columnIndex ); 328cdf0e10cSrcweir else 329cdf0e10cSrcweir return com::sun::star::uno::Reference< com::sun::star::sdbc::XClob >(); 330cdf0e10cSrcweir } 331cdf0e10cSrcweir 332cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex)333cdf0e10cSrcweir getArray( 334cdf0e10cSrcweir sal_Int32 columnIndex ) 335cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 336cdf0e10cSrcweir com::sun::star::uno::RuntimeException) 337cdf0e10cSrcweir { 338cdf0e10cSrcweir if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() ) 339cdf0e10cSrcweir return m_aItems[m_nRow]->getArray( columnIndex ); 340cdf0e10cSrcweir else 341cdf0e10cSrcweir return com::sun::star::uno::Reference< com::sun::star::sdbc::XArray >(); 342cdf0e10cSrcweir } 343cdf0e10cSrcweir 344cdf0e10cSrcweir 345cdf0e10cSrcweir // XResultSet 346cdf0e10cSrcweir 347cdf0e10cSrcweir virtual sal_Bool SAL_CALL 348cdf0e10cSrcweir next( 349cdf0e10cSrcweir void ) 350cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 351cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 352cdf0e10cSrcweir 353cdf0e10cSrcweir virtual sal_Bool SAL_CALL 354cdf0e10cSrcweir isBeforeFirst( 355cdf0e10cSrcweir void ) 356cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 357cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 358cdf0e10cSrcweir 359cdf0e10cSrcweir virtual sal_Bool SAL_CALL 360cdf0e10cSrcweir isAfterLast( 361cdf0e10cSrcweir void ) 362cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 363cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 364cdf0e10cSrcweir 365cdf0e10cSrcweir virtual sal_Bool SAL_CALL 366cdf0e10cSrcweir isFirst( 367cdf0e10cSrcweir void ) 368cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 369cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 370cdf0e10cSrcweir 371cdf0e10cSrcweir virtual sal_Bool SAL_CALL 372cdf0e10cSrcweir isLast( 373cdf0e10cSrcweir void ) 374cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 375cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 376cdf0e10cSrcweir 377cdf0e10cSrcweir virtual void SAL_CALL 378cdf0e10cSrcweir beforeFirst( 379cdf0e10cSrcweir void ) 380cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 381cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 382cdf0e10cSrcweir 383cdf0e10cSrcweir virtual void SAL_CALL 384cdf0e10cSrcweir afterLast( 385cdf0e10cSrcweir void ) 386cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 387cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 388cdf0e10cSrcweir 389cdf0e10cSrcweir virtual sal_Bool SAL_CALL 390cdf0e10cSrcweir first( 391cdf0e10cSrcweir void ) 392cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 393cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 394cdf0e10cSrcweir 395cdf0e10cSrcweir virtual sal_Bool SAL_CALL 396cdf0e10cSrcweir last( 397cdf0e10cSrcweir void ) 398cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 399cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 400cdf0e10cSrcweir 401cdf0e10cSrcweir virtual sal_Int32 SAL_CALL 402cdf0e10cSrcweir getRow( 403cdf0e10cSrcweir void ) 404cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 405cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 406cdf0e10cSrcweir 407cdf0e10cSrcweir virtual sal_Bool SAL_CALL 408cdf0e10cSrcweir absolute( 409cdf0e10cSrcweir sal_Int32 row ) 410cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 411cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 412cdf0e10cSrcweir 413cdf0e10cSrcweir virtual sal_Bool SAL_CALL 414cdf0e10cSrcweir relative( 415cdf0e10cSrcweir sal_Int32 rows ) 416cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 417cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 418cdf0e10cSrcweir 419cdf0e10cSrcweir virtual sal_Bool SAL_CALL 420cdf0e10cSrcweir previous( 421cdf0e10cSrcweir void ) 422cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 423cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 424cdf0e10cSrcweir 425cdf0e10cSrcweir virtual void SAL_CALL 426cdf0e10cSrcweir refreshRow( 427cdf0e10cSrcweir void ) 428cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 429cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 430cdf0e10cSrcweir 431cdf0e10cSrcweir virtual sal_Bool SAL_CALL 432cdf0e10cSrcweir rowUpdated( 433cdf0e10cSrcweir void ) 434cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 435cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 436cdf0e10cSrcweir 437cdf0e10cSrcweir virtual sal_Bool SAL_CALL 438cdf0e10cSrcweir rowInserted( 439cdf0e10cSrcweir void ) 440cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 441cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 442cdf0e10cSrcweir 443cdf0e10cSrcweir virtual sal_Bool SAL_CALL 444cdf0e10cSrcweir rowDeleted( 445cdf0e10cSrcweir void ) 446cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 447cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 448cdf0e10cSrcweir 449cdf0e10cSrcweir 450cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL 451cdf0e10cSrcweir getStatement( 452cdf0e10cSrcweir void ) 453cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 454cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 455cdf0e10cSrcweir 456cdf0e10cSrcweir // XCloseable 457cdf0e10cSrcweir 458cdf0e10cSrcweir virtual void SAL_CALL 459cdf0e10cSrcweir close( 460cdf0e10cSrcweir void ) 461cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 462cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 463cdf0e10cSrcweir 464cdf0e10cSrcweir // XContentAccess 465cdf0e10cSrcweir 466cdf0e10cSrcweir virtual rtl::OUString SAL_CALL 467cdf0e10cSrcweir queryContentIdentifierString( 468cdf0e10cSrcweir void ) 469cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 470cdf0e10cSrcweir 471cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > SAL_CALL 472cdf0e10cSrcweir queryContentIdentifier( 473cdf0e10cSrcweir void ) 474cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 475cdf0e10cSrcweir 476cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent > SAL_CALL 477cdf0e10cSrcweir queryContent( 478cdf0e10cSrcweir void ) 479cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 480cdf0e10cSrcweir 481cdf0e10cSrcweir // XResultSetMetaDataSupplier 482cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSetMetaData > SAL_CALL 483cdf0e10cSrcweir getMetaData( 484cdf0e10cSrcweir void ) 485cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 486cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 487cdf0e10cSrcweir 488cdf0e10cSrcweir 489cdf0e10cSrcweir // XPropertySet 490cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL 491cdf0e10cSrcweir getPropertySetInfo() 492cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException); 493cdf0e10cSrcweir 494cdf0e10cSrcweir virtual void SAL_CALL setPropertyValue( 495cdf0e10cSrcweir const rtl::OUString& aPropertyName, 496cdf0e10cSrcweir const com::sun::star::uno::Any& aValue ) 497cdf0e10cSrcweir throw( com::sun::star::beans::UnknownPropertyException, 498cdf0e10cSrcweir com::sun::star::beans::PropertyVetoException, 499cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 500cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 501cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 502cdf0e10cSrcweir 503cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL 504cdf0e10cSrcweir getPropertyValue( 505cdf0e10cSrcweir const rtl::OUString& PropertyName ) 506cdf0e10cSrcweir throw( com::sun::star::beans::UnknownPropertyException, 507cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 508cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 509cdf0e10cSrcweir 510cdf0e10cSrcweir virtual void SAL_CALL 511cdf0e10cSrcweir addPropertyChangeListener( 512cdf0e10cSrcweir const rtl::OUString& aPropertyName, 513cdf0e10cSrcweir const com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener >& xListener ) 514cdf0e10cSrcweir throw( com::sun::star::beans::UnknownPropertyException, 515cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 516cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 517cdf0e10cSrcweir 518cdf0e10cSrcweir virtual void SAL_CALL 519cdf0e10cSrcweir removePropertyChangeListener( 520cdf0e10cSrcweir const rtl::OUString& aPropertyName, 521cdf0e10cSrcweir const com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener >& aListener ) 522cdf0e10cSrcweir throw( com::sun::star::beans::UnknownPropertyException, 523cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 524cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 525cdf0e10cSrcweir 526cdf0e10cSrcweir virtual void SAL_CALL 527cdf0e10cSrcweir addVetoableChangeListener( 528cdf0e10cSrcweir const rtl::OUString& PropertyName, 529cdf0e10cSrcweir const com::sun::star::uno::Reference< com::sun::star::beans::XVetoableChangeListener >& aListener ) 530cdf0e10cSrcweir throw( com::sun::star::beans::UnknownPropertyException, 531cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 532cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 533cdf0e10cSrcweir 534cdf0e10cSrcweir virtual void SAL_CALL removeVetoableChangeListener( 535cdf0e10cSrcweir const rtl::OUString& PropertyName, 536cdf0e10cSrcweir const com::sun::star::uno::Reference< com::sun::star::beans::XVetoableChangeListener >& aListener ) 537cdf0e10cSrcweir throw( com::sun::star::beans::UnknownPropertyException, 538cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 539cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 540cdf0e10cSrcweir 541cdf0e10cSrcweir protected: 542cdf0e10cSrcweir 543cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF; 544cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider > m_xProvider; 545cdf0e10cSrcweir sal_Int32 m_nRow; 546cdf0e10cSrcweir sal_Bool m_nWasNull; 547cdf0e10cSrcweir sal_Int32 m_nOpenMode; 548cdf0e10cSrcweir sal_Bool m_bRowCountFinal; 549cdf0e10cSrcweir 550cdf0e10cSrcweir typedef std::vector< com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > > IdentSet; 551cdf0e10cSrcweir typedef std::vector< com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > > ItemSet; 552cdf0e10cSrcweir typedef std::vector< rtl::OUString > PathSet; 553cdf0e10cSrcweir 554cdf0e10cSrcweir IdentSet m_aIdents; 555cdf0e10cSrcweir ItemSet m_aItems; 556cdf0e10cSrcweir PathSet m_aPath; 557cdf0e10cSrcweir 558cdf0e10cSrcweir com::sun::star::uno::Sequence< com::sun::star::beans::Property > m_sProperty; 559cdf0e10cSrcweir com::sun::star::uno::Sequence< com::sun::star::ucb::NumberedSortingInfo > m_sSortingInfo; 560cdf0e10cSrcweir 561cdf0e10cSrcweir osl::Mutex m_aMutex; 562cdf0e10cSrcweir cppu::OInterfaceContainerHelper* m_pDisposeEventListeners; 563cdf0e10cSrcweir 564cdf0e10cSrcweir cppu::OInterfaceContainerHelper* m_pRowCountListeners; 565cdf0e10cSrcweir cppu::OInterfaceContainerHelper* m_pIsFinalListeners; 566cdf0e10cSrcweir }; 567cdf0e10cSrcweir 568cdf0e10cSrcweir 569cdf0e10cSrcweir } // end namespace fileaccess 570cdf0e10cSrcweir 571cdf0e10cSrcweir 572cdf0e10cSrcweir #endif 573