1*6df1ea1fSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*6df1ea1fSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*6df1ea1fSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*6df1ea1fSAndrew Rist * distributed with this work for additional information 6*6df1ea1fSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*6df1ea1fSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*6df1ea1fSAndrew Rist * "License"); you may not use this file except in compliance 9*6df1ea1fSAndrew Rist * with the License. You may obtain a copy of the License at 10*6df1ea1fSAndrew Rist * 11*6df1ea1fSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*6df1ea1fSAndrew Rist * 13*6df1ea1fSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*6df1ea1fSAndrew Rist * software distributed under the License is distributed on an 15*6df1ea1fSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*6df1ea1fSAndrew Rist * KIND, either express or implied. See the License for the 17*6df1ea1fSAndrew Rist * specific language governing permissions and limitations 18*6df1ea1fSAndrew Rist * under the License. 19*6df1ea1fSAndrew Rist * 20*6df1ea1fSAndrew Rist *************************************************************/ 21*6df1ea1fSAndrew Rist 22*6df1ea1fSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _CACHED_CONTENT_RESULTSET_HXX 25cdf0e10cSrcweir #define _CACHED_CONTENT_RESULTSET_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <contentresultsetwrapper.hxx> 28cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp> 29cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 30cdf0e10cSrcweir #include <com/sun/star/ucb/XFetchProvider.hpp> 31cdf0e10cSrcweir #include <com/sun/star/ucb/XFetchProviderForContentAccess.hpp> 32cdf0e10cSrcweir #include <com/sun/star/ucb/FetchResult.hpp> 33cdf0e10cSrcweir #include <com/sun/star/ucb/XContentIdentifierMapping.hpp> 34cdf0e10cSrcweir #include <com/sun/star/ucb/XCachedContentResultSetFactory.hpp> 35cdf0e10cSrcweir 36cdf0e10cSrcweir #define CACHED_CONTENT_RESULTSET_SERVICE_NAME "com.sun.star.ucb.CachedContentResultSet" 37cdf0e10cSrcweir #define CACHED_CONTENT_RESULTSET_FACTORY_NAME "com.sun.star.ucb.CachedContentResultSetFactory" 38cdf0e10cSrcweir 39cdf0e10cSrcweir //========================================================================= 40cdf0e10cSrcweir 41cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace script { 42cdf0e10cSrcweir class XTypeConverter; 43cdf0e10cSrcweir } } } } 44cdf0e10cSrcweir 45cdf0e10cSrcweir class CCRS_PropertySetInfo; 46cdf0e10cSrcweir class CachedContentResultSet 47cdf0e10cSrcweir : public ContentResultSetWrapper 48cdf0e10cSrcweir , public com::sun::star::lang::XTypeProvider 49cdf0e10cSrcweir , public com::sun::star::lang::XServiceInfo 50cdf0e10cSrcweir { 51cdf0e10cSrcweir //-------------------------------------------------------------------------- 52cdf0e10cSrcweir // class CCRS_Cache 53cdf0e10cSrcweir 54cdf0e10cSrcweir class CCRS_Cache 55cdf0e10cSrcweir { 56cdf0e10cSrcweir private: 57cdf0e10cSrcweir com::sun::star::ucb::FetchResult* m_pResult; 58cdf0e10cSrcweir com::sun::star::uno::Reference< 59cdf0e10cSrcweir com::sun::star::ucb::XContentIdentifierMapping > 60cdf0e10cSrcweir m_xContentIdentifierMapping; 61cdf0e10cSrcweir com::sun::star::uno::Sequence< sal_Bool >* m_pMappedReminder; 62cdf0e10cSrcweir 63cdf0e10cSrcweir private: 64cdf0e10cSrcweir com::sun::star::uno::Any& SAL_CALL 65cdf0e10cSrcweir getRowAny( sal_Int32 nRow ) 66cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 67cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 68cdf0e10cSrcweir 69cdf0e10cSrcweir void SAL_CALL clear(); 70cdf0e10cSrcweir 71cdf0e10cSrcweir 72cdf0e10cSrcweir void SAL_CALL remindMapped( sal_Int32 nRow ); 73cdf0e10cSrcweir sal_Bool SAL_CALL isRowMapped( sal_Int32 nRow ); 74cdf0e10cSrcweir void SAL_CALL clearMappedReminder(); 75cdf0e10cSrcweir com::sun::star::uno::Sequence< sal_Bool >* SAL_CALL getMappedReminder(); 76cdf0e10cSrcweir 77cdf0e10cSrcweir public: 78cdf0e10cSrcweir CCRS_Cache( const com::sun::star::uno::Reference< 79cdf0e10cSrcweir com::sun::star::ucb::XContentIdentifierMapping > & xMapping ); 80cdf0e10cSrcweir ~CCRS_Cache(); 81cdf0e10cSrcweir 82cdf0e10cSrcweir void SAL_CALL loadData( 83cdf0e10cSrcweir const com::sun::star::ucb::FetchResult& rResult ); 84cdf0e10cSrcweir 85cdf0e10cSrcweir sal_Bool SAL_CALL 86cdf0e10cSrcweir hasRow( sal_Int32 nRow ); 87cdf0e10cSrcweir 88cdf0e10cSrcweir sal_Bool SAL_CALL 89cdf0e10cSrcweir hasCausedException( sal_Int32 nRow ); 90cdf0e10cSrcweir 91cdf0e10cSrcweir sal_Int32 SAL_CALL 92cdf0e10cSrcweir getMaxRow(); 93cdf0e10cSrcweir 94cdf0e10cSrcweir sal_Bool SAL_CALL 95cdf0e10cSrcweir hasKnownLast(); 96cdf0e10cSrcweir 97cdf0e10cSrcweir //--- 98cdf0e10cSrcweir const com::sun::star::uno::Any& SAL_CALL 99cdf0e10cSrcweir getAny( sal_Int32 nRow, sal_Int32 nColumnIndex ) 100cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 101cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 102cdf0e10cSrcweir 103cdf0e10cSrcweir const rtl::OUString& SAL_CALL 104cdf0e10cSrcweir getContentIdentifierString( sal_Int32 nRow ) 105cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 106cdf0e10cSrcweir 107cdf0e10cSrcweir const com::sun::star::uno::Reference< 108cdf0e10cSrcweir com::sun::star::ucb::XContentIdentifier >& SAL_CALL 109cdf0e10cSrcweir getContentIdentifier( sal_Int32 nRow ) 110cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 111cdf0e10cSrcweir 112cdf0e10cSrcweir const com::sun::star::uno::Reference< 113cdf0e10cSrcweir com::sun::star::ucb::XContent >& SAL_CALL 114cdf0e10cSrcweir getContent( sal_Int32 nRow ) 115cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 116cdf0e10cSrcweir }; 117cdf0e10cSrcweir //----------------------------------------------------------------- 118cdf0e10cSrcweir //members 119cdf0e10cSrcweir 120cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > 121cdf0e10cSrcweir m_xSMgr; 122cdf0e10cSrcweir 123cdf0e10cSrcweir //different Interfaces from Origin: 124cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::ucb::XFetchProvider > 125cdf0e10cSrcweir m_xFetchProvider; //XFetchProvider-interface from m_xOrigin 126cdf0e10cSrcweir 127cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::ucb::XFetchProviderForContentAccess > 128cdf0e10cSrcweir m_xFetchProviderForContentAccess; //XFetchProviderForContentAccess-interface from m_xOrigin 129cdf0e10cSrcweir 130cdf0e10cSrcweir //my PropertySetInfo 131cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > 132cdf0e10cSrcweir m_xMyPropertySetInfo;//holds m_pMyPropSetInfo alive 133cdf0e10cSrcweir CCRS_PropertySetInfo* m_pMyPropSetInfo; 134cdf0e10cSrcweir 135cdf0e10cSrcweir 136cdf0e10cSrcweir // 137cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifierMapping > 138cdf0e10cSrcweir m_xContentIdentifierMapping;// can be used for remote optimized ContentAccess 139cdf0e10cSrcweir 140cdf0e10cSrcweir //some Properties and helping variables 141cdf0e10cSrcweir sal_Int32 m_nRow; 142cdf0e10cSrcweir sal_Bool m_bAfterLast; // TRUE, if m_nRow is after final count; can be TRUE without knowing the exact final count 143cdf0e10cSrcweir 144cdf0e10cSrcweir sal_Int32 m_nLastAppliedPos; 145cdf0e10cSrcweir sal_Bool m_bAfterLastApplied; 146cdf0e10cSrcweir 147cdf0e10cSrcweir sal_Int32 m_nKnownCount; // count we know from the Origin 148cdf0e10cSrcweir sal_Bool m_bFinalCount; // TRUE if the Origin has reached final count and we got that count in m_nKnownCount 149cdf0e10cSrcweir 150cdf0e10cSrcweir sal_Int32 m_nFetchSize; 151cdf0e10cSrcweir sal_Int32 m_nFetchDirection; 152cdf0e10cSrcweir 153cdf0e10cSrcweir sal_Bool m_bLastReadWasFromCache; 154cdf0e10cSrcweir sal_Bool m_bLastCachedReadWasNull; 155cdf0e10cSrcweir 156cdf0e10cSrcweir //cache: 157cdf0e10cSrcweir CCRS_Cache m_aCache; 158cdf0e10cSrcweir CCRS_Cache m_aCacheContentIdentifierString; 159cdf0e10cSrcweir CCRS_Cache m_aCacheContentIdentifier; 160cdf0e10cSrcweir CCRS_Cache m_aCacheContent; 161cdf0e10cSrcweir 162cdf0e10cSrcweir 163cdf0e10cSrcweir private: 164cdf0e10cSrcweir //----------------------------------------------------------------- 165cdf0e10cSrcweir //helping XPropertySet methods. 166cdf0e10cSrcweir virtual void SAL_CALL impl_initPropertySetInfo(); 167cdf0e10cSrcweir 168cdf0e10cSrcweir 169cdf0e10cSrcweir //----------------------------------------------------------------- 170cdf0e10cSrcweir sal_Bool SAL_CALL 171cdf0e10cSrcweir applyPositionToOrigin( sal_Int32 nRow ) 172cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 173cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 174cdf0e10cSrcweir 175cdf0e10cSrcweir void SAL_CALL 176cdf0e10cSrcweir impl_fetchData( sal_Int32 nRow, sal_Int32 nCount 177cdf0e10cSrcweir , sal_Int32 nFetchDirection ) 178cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 179cdf0e10cSrcweir 180cdf0e10cSrcweir sal_Bool SAL_CALL 181cdf0e10cSrcweir impl_isKnownValidPosition( sal_Int32 nRow ); 182cdf0e10cSrcweir 183cdf0e10cSrcweir sal_Bool SAL_CALL 184cdf0e10cSrcweir impl_isKnownInvalidPosition( sal_Int32 nRow ); 185cdf0e10cSrcweir 186cdf0e10cSrcweir void SAL_CALL 187cdf0e10cSrcweir impl_changeRowCount( sal_Int32 nOld, sal_Int32 nNew ); 188cdf0e10cSrcweir 189cdf0e10cSrcweir void SAL_CALL 190cdf0e10cSrcweir impl_changeIsRowCountFinal( sal_Bool bOld, sal_Bool bNew ); 191cdf0e10cSrcweir 192cdf0e10cSrcweir public: 193cdf0e10cSrcweir CachedContentResultSet( 194cdf0e10cSrcweir const com::sun::star::uno::Reference< 195cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory > & 196cdf0e10cSrcweir xSMgr, 197cdf0e10cSrcweir const com::sun::star::uno::Reference< 198cdf0e10cSrcweir com::sun::star::sdbc::XResultSet > & xOrigin, 199cdf0e10cSrcweir const com::sun::star::uno::Reference< 200cdf0e10cSrcweir com::sun::star::ucb::XContentIdentifierMapping > & 201cdf0e10cSrcweir xContentIdentifierMapping ); 202cdf0e10cSrcweir 203cdf0e10cSrcweir virtual ~CachedContentResultSet(); 204cdf0e10cSrcweir 205cdf0e10cSrcweir //----------------------------------------------------------------- 206cdf0e10cSrcweir // XInterface inherited 207cdf0e10cSrcweir //----------------------------------------------------------------- 208cdf0e10cSrcweir XINTERFACE_DECL() 209cdf0e10cSrcweir //----------------------------------------------------------------- 210cdf0e10cSrcweir // XTypeProvider 211cdf0e10cSrcweir //----------------------------------------------------------------- 212cdf0e10cSrcweir XTYPEPROVIDER_DECL() 213cdf0e10cSrcweir //----------------------------------------------------------------- 214cdf0e10cSrcweir // XServiceInfo 215cdf0e10cSrcweir //----------------------------------------------------------------- 216cdf0e10cSrcweir XSERVICEINFO_NOFACTORY_DECL() 217cdf0e10cSrcweir 218cdf0e10cSrcweir //----------------------------------------------------------------- 219cdf0e10cSrcweir // XPropertySet inherited 220cdf0e10cSrcweir //----------------------------------------------------------------- 221cdf0e10cSrcweir 222cdf0e10cSrcweir virtual void SAL_CALL 223cdf0e10cSrcweir setPropertyValue( const rtl::OUString& aPropertyName, 224cdf0e10cSrcweir const com::sun::star::uno::Any& aValue ) 225cdf0e10cSrcweir throw( com::sun::star::beans::UnknownPropertyException, 226cdf0e10cSrcweir com::sun::star::beans::PropertyVetoException, 227cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 228cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 229cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 230cdf0e10cSrcweir 231cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL 232cdf0e10cSrcweir getPropertyValue( const rtl::OUString& PropertyName ) 233cdf0e10cSrcweir throw( com::sun::star::beans::UnknownPropertyException, 234cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 235cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 236cdf0e10cSrcweir 237cdf0e10cSrcweir //----------------------------------------------------------------- 238cdf0e10cSrcweir // own inherited 239cdf0e10cSrcweir //----------------------------------------------------------------- 240cdf0e10cSrcweir virtual void SAL_CALL 241cdf0e10cSrcweir impl_disposing( const com::sun::star::lang::EventObject& Source ) 242cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 243cdf0e10cSrcweir 244cdf0e10cSrcweir virtual void SAL_CALL 245cdf0e10cSrcweir impl_propertyChange( const com::sun::star::beans::PropertyChangeEvent& evt ) 246cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 247cdf0e10cSrcweir 248cdf0e10cSrcweir virtual void SAL_CALL 249cdf0e10cSrcweir impl_vetoableChange( const com::sun::star::beans::PropertyChangeEvent& aEvent ) 250cdf0e10cSrcweir throw( com::sun::star::beans::PropertyVetoException, 251cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 252cdf0e10cSrcweir 253cdf0e10cSrcweir //----------------------------------------------------------------- 254cdf0e10cSrcweir // XContentAccess inherited 255cdf0e10cSrcweir //----------------------------------------------------------------- 256cdf0e10cSrcweir virtual rtl::OUString SAL_CALL 257cdf0e10cSrcweir queryContentIdentifierString() 258cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 259cdf0e10cSrcweir 260cdf0e10cSrcweir virtual com::sun::star::uno::Reference< 261cdf0e10cSrcweir com::sun::star::ucb::XContentIdentifier > SAL_CALL 262cdf0e10cSrcweir queryContentIdentifier() 263cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 264cdf0e10cSrcweir 265cdf0e10cSrcweir virtual com::sun::star::uno::Reference< 266cdf0e10cSrcweir com::sun::star::ucb::XContent > SAL_CALL 267cdf0e10cSrcweir queryContent() 268cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 269cdf0e10cSrcweir 270cdf0e10cSrcweir //----------------------------------------------------------------- 271cdf0e10cSrcweir // XResultSet inherited 272cdf0e10cSrcweir //----------------------------------------------------------------- 273cdf0e10cSrcweir virtual sal_Bool SAL_CALL 274cdf0e10cSrcweir next() 275cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 276cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 277cdf0e10cSrcweir virtual sal_Bool SAL_CALL 278cdf0e10cSrcweir isBeforeFirst() 279cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 280cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 281cdf0e10cSrcweir virtual sal_Bool SAL_CALL 282cdf0e10cSrcweir isAfterLast() 283cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 284cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 285cdf0e10cSrcweir virtual sal_Bool SAL_CALL 286cdf0e10cSrcweir isFirst() 287cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 288cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 289cdf0e10cSrcweir virtual sal_Bool SAL_CALL 290cdf0e10cSrcweir isLast() 291cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 292cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 293cdf0e10cSrcweir virtual void SAL_CALL 294cdf0e10cSrcweir beforeFirst() 295cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 296cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 297cdf0e10cSrcweir virtual void SAL_CALL 298cdf0e10cSrcweir afterLast() 299cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 300cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 301cdf0e10cSrcweir virtual sal_Bool SAL_CALL 302cdf0e10cSrcweir first() 303cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 304cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 305cdf0e10cSrcweir virtual sal_Bool SAL_CALL 306cdf0e10cSrcweir last() 307cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 308cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 309cdf0e10cSrcweir virtual sal_Int32 SAL_CALL 310cdf0e10cSrcweir getRow() 311cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 312cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 313cdf0e10cSrcweir virtual sal_Bool SAL_CALL 314cdf0e10cSrcweir absolute( sal_Int32 row ) 315cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 316cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 317cdf0e10cSrcweir virtual sal_Bool SAL_CALL 318cdf0e10cSrcweir relative( sal_Int32 rows ) 319cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 320cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 321cdf0e10cSrcweir virtual sal_Bool SAL_CALL 322cdf0e10cSrcweir previous() 323cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 324cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 325cdf0e10cSrcweir virtual void SAL_CALL 326cdf0e10cSrcweir refreshRow() 327cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 328cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 329cdf0e10cSrcweir virtual sal_Bool SAL_CALL 330cdf0e10cSrcweir rowUpdated() 331cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 332cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 333cdf0e10cSrcweir virtual sal_Bool SAL_CALL 334cdf0e10cSrcweir rowInserted() 335cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 336cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 337cdf0e10cSrcweir virtual sal_Bool SAL_CALL 338cdf0e10cSrcweir rowDeleted() 339cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 340cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 341cdf0e10cSrcweir virtual com::sun::star::uno::Reference< 342cdf0e10cSrcweir com::sun::star::uno::XInterface > SAL_CALL 343cdf0e10cSrcweir getStatement() 344cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 345cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 346cdf0e10cSrcweir 347cdf0e10cSrcweir //----------------------------------------------------------------- 348cdf0e10cSrcweir // XRow inherited 349cdf0e10cSrcweir //----------------------------------------------------------------- 350cdf0e10cSrcweir virtual sal_Bool SAL_CALL 351cdf0e10cSrcweir wasNull() 352cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 353cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 354cdf0e10cSrcweir 355cdf0e10cSrcweir virtual rtl::OUString SAL_CALL 356cdf0e10cSrcweir getString( sal_Int32 columnIndex ) 357cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 358cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 359cdf0e10cSrcweir 360cdf0e10cSrcweir virtual sal_Bool SAL_CALL 361cdf0e10cSrcweir getBoolean( sal_Int32 columnIndex ) 362cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 363cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 364cdf0e10cSrcweir 365cdf0e10cSrcweir virtual sal_Int8 SAL_CALL 366cdf0e10cSrcweir getByte( sal_Int32 columnIndex ) 367cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 368cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 369cdf0e10cSrcweir 370cdf0e10cSrcweir virtual sal_Int16 SAL_CALL 371cdf0e10cSrcweir getShort( sal_Int32 columnIndex ) 372cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 373cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 374cdf0e10cSrcweir 375cdf0e10cSrcweir virtual sal_Int32 SAL_CALL 376cdf0e10cSrcweir getInt( sal_Int32 columnIndex ) 377cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 378cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 379cdf0e10cSrcweir 380cdf0e10cSrcweir virtual sal_Int64 SAL_CALL 381cdf0e10cSrcweir getLong( sal_Int32 columnIndex ) 382cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 383cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 384cdf0e10cSrcweir 385cdf0e10cSrcweir virtual float SAL_CALL 386cdf0e10cSrcweir getFloat( sal_Int32 columnIndex ) 387cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 388cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 389cdf0e10cSrcweir 390cdf0e10cSrcweir virtual double SAL_CALL 391cdf0e10cSrcweir getDouble( sal_Int32 columnIndex ) 392cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 393cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 394cdf0e10cSrcweir 395cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL 396cdf0e10cSrcweir getBytes( sal_Int32 columnIndex ) 397cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 398cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 399cdf0e10cSrcweir 400cdf0e10cSrcweir virtual com::sun::star::util::Date SAL_CALL 401cdf0e10cSrcweir getDate( sal_Int32 columnIndex ) 402cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 403cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 404cdf0e10cSrcweir 405cdf0e10cSrcweir virtual com::sun::star::util::Time SAL_CALL 406cdf0e10cSrcweir getTime( sal_Int32 columnIndex ) 407cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 408cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 409cdf0e10cSrcweir 410cdf0e10cSrcweir virtual com::sun::star::util::DateTime SAL_CALL 411cdf0e10cSrcweir getTimestamp( sal_Int32 columnIndex ) 412cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 413cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 414cdf0e10cSrcweir 415cdf0e10cSrcweir virtual com::sun::star::uno::Reference< 416cdf0e10cSrcweir com::sun::star::io::XInputStream > SAL_CALL 417cdf0e10cSrcweir getBinaryStream( sal_Int32 columnIndex ) 418cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 419cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 420cdf0e10cSrcweir 421cdf0e10cSrcweir virtual com::sun::star::uno::Reference< 422cdf0e10cSrcweir com::sun::star::io::XInputStream > SAL_CALL 423cdf0e10cSrcweir getCharacterStream( sal_Int32 columnIndex ) 424cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 425cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 426cdf0e10cSrcweir 427cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL 428cdf0e10cSrcweir getObject( sal_Int32 columnIndex, 429cdf0e10cSrcweir const com::sun::star::uno::Reference< 430cdf0e10cSrcweir com::sun::star::container::XNameAccess >& typeMap ) 431cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 432cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 433cdf0e10cSrcweir 434cdf0e10cSrcweir virtual com::sun::star::uno::Reference< 435cdf0e10cSrcweir com::sun::star::sdbc::XRef > SAL_CALL 436cdf0e10cSrcweir getRef( sal_Int32 columnIndex ) 437cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 438cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 439cdf0e10cSrcweir 440cdf0e10cSrcweir virtual com::sun::star::uno::Reference< 441cdf0e10cSrcweir com::sun::star::sdbc::XBlob > SAL_CALL 442cdf0e10cSrcweir getBlob( sal_Int32 columnIndex ) 443cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 444cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 445cdf0e10cSrcweir 446cdf0e10cSrcweir virtual com::sun::star::uno::Reference< 447cdf0e10cSrcweir com::sun::star::sdbc::XClob > SAL_CALL 448cdf0e10cSrcweir getClob( sal_Int32 columnIndex ) 449cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 450cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 451cdf0e10cSrcweir 452cdf0e10cSrcweir virtual com::sun::star::uno::Reference< 453cdf0e10cSrcweir com::sun::star::sdbc::XArray > SAL_CALL 454cdf0e10cSrcweir getArray( sal_Int32 columnIndex ) 455cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 456cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 457cdf0e10cSrcweir 458cdf0e10cSrcweir //----------------------------------------------------------------- 459cdf0e10cSrcweir // Type Converter support 460cdf0e10cSrcweir //----------------------------------------------------------------- 461cdf0e10cSrcweir 462cdf0e10cSrcweir private: 463cdf0e10cSrcweir sal_Bool m_bTriedToGetTypeConverter; 464cdf0e10cSrcweir com::sun::star::uno::Reference< 465cdf0e10cSrcweir com::sun::star::script::XTypeConverter > m_xTypeConverter; 466cdf0e10cSrcweir 467cdf0e10cSrcweir const com::sun::star::uno::Reference< 468cdf0e10cSrcweir com::sun::star::script::XTypeConverter >& getTypeConverter(); 469cdf0e10cSrcweir }; 470cdf0e10cSrcweir 471cdf0e10cSrcweir //========================================================================= 472cdf0e10cSrcweir 473cdf0e10cSrcweir class CachedContentResultSetFactory 474cdf0e10cSrcweir : public cppu::OWeakObject 475cdf0e10cSrcweir , public com::sun::star::lang::XTypeProvider 476cdf0e10cSrcweir , public com::sun::star::lang::XServiceInfo 477cdf0e10cSrcweir , public com::sun::star::ucb::XCachedContentResultSetFactory 478cdf0e10cSrcweir { 479cdf0e10cSrcweir protected: 480cdf0e10cSrcweir com::sun::star::uno::Reference< 481cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory > m_xSMgr; 482cdf0e10cSrcweir 483cdf0e10cSrcweir public: 484cdf0e10cSrcweir 485cdf0e10cSrcweir CachedContentResultSetFactory( 486cdf0e10cSrcweir const com::sun::star::uno::Reference< 487cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory > & rSMgr); 488cdf0e10cSrcweir 489cdf0e10cSrcweir virtual ~CachedContentResultSetFactory(); 490cdf0e10cSrcweir 491cdf0e10cSrcweir //----------------------------------------------------------------- 492cdf0e10cSrcweir // XInterface 493cdf0e10cSrcweir XINTERFACE_DECL() 494cdf0e10cSrcweir 495cdf0e10cSrcweir //----------------------------------------------------------------- 496cdf0e10cSrcweir // XTypeProvider 497cdf0e10cSrcweir XTYPEPROVIDER_DECL() 498cdf0e10cSrcweir 499cdf0e10cSrcweir //----------------------------------------------------------------- 500cdf0e10cSrcweir // XServiceInfo 501cdf0e10cSrcweir XSERVICEINFO_DECL() 502cdf0e10cSrcweir 503cdf0e10cSrcweir //----------------------------------------------------------------- 504cdf0e10cSrcweir // XCachedContentResultSetFactory 505cdf0e10cSrcweir 506cdf0e10cSrcweir virtual com::sun::star::uno::Reference< 507cdf0e10cSrcweir com::sun::star::sdbc::XResultSet > SAL_CALL 508cdf0e10cSrcweir createCachedContentResultSet( 509cdf0e10cSrcweir const com::sun::star::uno::Reference< 510cdf0e10cSrcweir com::sun::star::sdbc::XResultSet > & xSource, 511cdf0e10cSrcweir const com::sun::star::uno::Reference< 512cdf0e10cSrcweir com::sun::star::ucb::XContentIdentifierMapping > & xMapping ) 513cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 514cdf0e10cSrcweir }; 515cdf0e10cSrcweir 516cdf0e10cSrcweir #endif 517cdf0e10cSrcweir 518