1*2e2212a7SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*2e2212a7SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2e2212a7SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2e2212a7SAndrew Rist * distributed with this work for additional information 6*2e2212a7SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2e2212a7SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2e2212a7SAndrew Rist * "License"); you may not use this file except in compliance 9*2e2212a7SAndrew Rist * with the License. You may obtain a copy of the License at 10*2e2212a7SAndrew Rist * 11*2e2212a7SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*2e2212a7SAndrew Rist * 13*2e2212a7SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2e2212a7SAndrew Rist * software distributed under the License is distributed on an 15*2e2212a7SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2e2212a7SAndrew Rist * KIND, either express or implied. See the License for the 17*2e2212a7SAndrew Rist * specific language governing permissions and limitations 18*2e2212a7SAndrew Rist * under the License. 19*2e2212a7SAndrew Rist * 20*2e2212a7SAndrew Rist *************************************************************/ 21*2e2212a7SAndrew Rist 22*2e2212a7SAndrew Rist 23cdf0e10cSrcweir #ifndef DBA_DATABASEDATAPROVIDER_HXX_INCLUDED 24cdf0e10cSrcweir #define DBA_DATABASEDATAPROVIDER_HXX_INCLUDED 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "sal/config.h" 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include "com/sun/star/uno/XComponentContext.hpp" 29cdf0e10cSrcweir #include "com/sun/star/lang/XServiceInfo.hpp" 30cdf0e10cSrcweir #include "com/sun/star/chart2/data/XDatabaseDataProvider.hpp" 31cdf0e10cSrcweir #include "com/sun/star/chart2/XInternalDataProvider.hpp" 32cdf0e10cSrcweir #include <com/sun/star/chart/XComplexDescriptionAccess.hpp> 33cdf0e10cSrcweir #include <com/sun/star/sdbc/XRowSet.hpp> 34cdf0e10cSrcweir #include <com/sun/star/sdbc/XParameters.hpp> 35cdf0e10cSrcweir #include <com/sun/star/container/XChild.hpp> 36cdf0e10cSrcweir 37cdf0e10cSrcweir #include "cppuhelper/compbase4.hxx" 38cdf0e10cSrcweir #include "cppuhelper/basemutex.hxx" 39cdf0e10cSrcweir #include "cppuhelper/propertysetmixin.hxx" 40cdf0e10cSrcweir #include <cppuhelper/implementationentry.hxx> 41cdf0e10cSrcweir 42cdf0e10cSrcweir #include <comphelper/sequence.hxx> 43cdf0e10cSrcweir 44cdf0e10cSrcweir #include "connectivity/parameters.hxx" 45cdf0e10cSrcweir #include "connectivity/filtermanager.hxx" 46cdf0e10cSrcweir 47cdf0e10cSrcweir 48cdf0e10cSrcweir namespace dbaccess 49cdf0e10cSrcweir { 50cdf0e10cSrcweir 51cdf0e10cSrcweir class DatabaseDataSource; 52cdf0e10cSrcweir typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::chart2::data::XDatabaseDataProvider 53cdf0e10cSrcweir , ::com::sun::star::container::XChild 54cdf0e10cSrcweir , ::com::sun::star::chart::XComplexDescriptionAccess 55cdf0e10cSrcweir , ::com::sun::star::lang::XServiceInfo > TDatabaseDataProvider; 56cdf0e10cSrcweir 57cdf0e10cSrcweir class DatabaseDataProvider: private ::cppu::BaseMutex, 58cdf0e10cSrcweir public TDatabaseDataProvider, 59cdf0e10cSrcweir public ::cppu::PropertySetMixin< ::com::sun::star::chart2::data::XDatabaseDataProvider > 60cdf0e10cSrcweir { 61cdf0e10cSrcweir public: 62cdf0e10cSrcweir explicit DatabaseDataProvider(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & context); 63cdf0e10cSrcweir 64cdf0e10cSrcweir // ::com::sun::star::lang::XServiceInfo - static methods 65cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException ); 66cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException ); 67cdf0e10cSrcweir static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > 68cdf0e10cSrcweir SAL_CALL Create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & context); 69cdf0e10cSrcweir 70cdf0e10cSrcweir private: 71cdf0e10cSrcweir // ::com::sun::star::uno::XInterface: 72cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(::com::sun::star::uno::Type const & type) throw (::com::sun::star::uno::RuntimeException); acquire()73cdf0e10cSrcweir virtual void SAL_CALL acquire() throw () 74cdf0e10cSrcweir { TDatabaseDataProvider::acquire(); } release()75cdf0e10cSrcweir virtual void SAL_CALL release() throw () 76cdf0e10cSrcweir { TDatabaseDataProvider::release(); } 77cdf0e10cSrcweir 78cdf0e10cSrcweir // ::com::sun::star::lang::XServiceInfo 79cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); 80cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); 81cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); 82cdf0e10cSrcweir 83cdf0e10cSrcweir // ::com::sun::star::chart2::data::XDataProvider: 84cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL createDataSourcePossible(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & aArguments) throw (::com::sun::star::uno::RuntimeException); 85cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > SAL_CALL createDataSource(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & aArguments) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException); 86cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL detectArguments(const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > & xDataSource) throw (::com::sun::star::uno::RuntimeException); 87cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL createDataSequenceByRangeRepresentationPossible(const ::rtl::OUString & aRangeRepresentation) throw (::com::sun::star::uno::RuntimeException); 88cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL createDataSequenceByRangeRepresentation(const ::rtl::OUString & aRangeRepresentation) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException); 89cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XRangeSelection > SAL_CALL getRangeSelection() throw (::com::sun::star::uno::RuntimeException); 90cdf0e10cSrcweir 91cdf0e10cSrcweir // ::com::sun::star::chart2::data::XRangeXMLConversion: 92cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL convertRangeToXML(const ::rtl::OUString & aRangeRepresentation) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException); 93cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL convertRangeFromXML(const ::rtl::OUString & aXMLRange) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException); 94cdf0e10cSrcweir 95cdf0e10cSrcweir // ::com::sun::star::lang::XInitialization: 96cdf0e10cSrcweir virtual void SAL_CALL initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::uno::Exception); 97cdf0e10cSrcweir 98cdf0e10cSrcweir // ::com::sun::star::beans::XPropertySet: 99cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException); 100cdf0e10cSrcweir virtual void SAL_CALL setPropertyValue(const ::rtl::OUString & aPropertyName, const ::com::sun::star::uno::Any & aValue) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException); 101cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const ::rtl::OUString & PropertyName) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException); 102cdf0e10cSrcweir virtual void SAL_CALL addPropertyChangeListener(const ::rtl::OUString & aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & xListener) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException); 103cdf0e10cSrcweir virtual void SAL_CALL removePropertyChangeListener(const ::rtl::OUString & aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException); 104cdf0e10cSrcweir virtual void SAL_CALL addVetoableChangeListener(const ::rtl::OUString & PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException); 105cdf0e10cSrcweir virtual void SAL_CALL removeVetoableChangeListener(const ::rtl::OUString & PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException); 106cdf0e10cSrcweir 107cdf0e10cSrcweir // ::com::sun::star::chart2::data::XDatabaseDataProvider: 108cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getMasterFields() throw (::com::sun::star::uno::RuntimeException); 109cdf0e10cSrcweir virtual void SAL_CALL setMasterFields(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & the_value) throw (::com::sun::star::uno::RuntimeException); 110cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getDetailFields() throw (::com::sun::star::uno::RuntimeException); 111cdf0e10cSrcweir virtual void SAL_CALL setDetailFields(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & the_value) throw (::com::sun::star::uno::RuntimeException); 112cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getCommand() throw (::com::sun::star::uno::RuntimeException); 113cdf0e10cSrcweir virtual void SAL_CALL setCommand(const ::rtl::OUString & the_value) throw (::com::sun::star::uno::RuntimeException); 114cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getCommandType() throw (::com::sun::star::uno::RuntimeException); 115cdf0e10cSrcweir virtual void SAL_CALL setCommandType(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException); 116cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getFilter() throw (::com::sun::star::uno::RuntimeException); 117cdf0e10cSrcweir virtual void SAL_CALL setFilter(const ::rtl::OUString & the_value) throw (::com::sun::star::uno::RuntimeException); 118cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL getApplyFilter() throw (::com::sun::star::uno::RuntimeException); 119cdf0e10cSrcweir virtual void SAL_CALL setApplyFilter( ::sal_Bool _applyfilter ) throw (::com::sun::star::uno::RuntimeException); 120cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getHavingClause() throw (::com::sun::star::uno::RuntimeException); 121cdf0e10cSrcweir virtual void SAL_CALL setHavingClause( const ::rtl::OUString& _havingclause ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 122cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getGroupBy() throw (::com::sun::star::uno::RuntimeException); 123cdf0e10cSrcweir virtual void SAL_CALL setGroupBy( const ::rtl::OUString& _groupby ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 124cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getOrder() throw (::com::sun::star::uno::RuntimeException); 125cdf0e10cSrcweir virtual void SAL_CALL setOrder( const ::rtl::OUString& _order ) throw (::com::sun::star::uno::RuntimeException); 126cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL getEscapeProcessing() throw (::com::sun::star::uno::RuntimeException); 127cdf0e10cSrcweir virtual void SAL_CALL setEscapeProcessing(::sal_Bool the_value) throw (::com::sun::star::uno::RuntimeException); 128cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getRowLimit() throw (::com::sun::star::uno::RuntimeException); 129cdf0e10cSrcweir virtual void SAL_CALL setRowLimit( ::sal_Int32 _rowlimit ) throw (::com::sun::star::uno::RuntimeException); 130cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getActiveConnection() throw (::com::sun::star::uno::RuntimeException); 131cdf0e10cSrcweir virtual void SAL_CALL setActiveConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > & the_value) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException); 132cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getDataSourceName() throw (::com::sun::star::uno::RuntimeException); 133cdf0e10cSrcweir virtual void SAL_CALL setDataSourceName( const ::rtl::OUString& _datasourcename ) throw (::com::sun::star::uno::RuntimeException); 134cdf0e10cSrcweir 135cdf0e10cSrcweir // com::sun::star::sdbc::XParameters 136cdf0e10cSrcweir virtual void SAL_CALL setNull(sal_Int32 parameterIndex, sal_Int32 sqlType) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 137cdf0e10cSrcweir virtual void SAL_CALL setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 138cdf0e10cSrcweir virtual void SAL_CALL setBoolean(sal_Int32 parameterIndex, sal_Bool x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 139cdf0e10cSrcweir virtual void SAL_CALL setByte(sal_Int32 parameterIndex, sal_Int8 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 140cdf0e10cSrcweir virtual void SAL_CALL setShort(sal_Int32 parameterIndex, sal_Int16 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 141cdf0e10cSrcweir virtual void SAL_CALL setInt(sal_Int32 parameterIndex, sal_Int32 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 142cdf0e10cSrcweir virtual void SAL_CALL setLong(sal_Int32 parameterIndex, sal_Int64 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 143cdf0e10cSrcweir virtual void SAL_CALL setFloat(sal_Int32 parameterIndex, float x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 144cdf0e10cSrcweir virtual void SAL_CALL setDouble(sal_Int32 parameterIndex, double x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 145cdf0e10cSrcweir virtual void SAL_CALL setString(sal_Int32 parameterIndex, const ::rtl::OUString& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 146cdf0e10cSrcweir virtual void SAL_CALL setBytes(sal_Int32 parameterIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 147cdf0e10cSrcweir virtual void SAL_CALL setDate(sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 148cdf0e10cSrcweir virtual void SAL_CALL setTime(sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 149cdf0e10cSrcweir virtual void SAL_CALL setTimestamp(sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 150cdf0e10cSrcweir virtual void SAL_CALL setBinaryStream(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& x, sal_Int32 length) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 151cdf0e10cSrcweir virtual void SAL_CALL setCharacterStream(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& x, sal_Int32 length) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 152cdf0e10cSrcweir virtual void SAL_CALL setObject(sal_Int32 parameterIndex, const ::com::sun::star::uno::Any& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 153cdf0e10cSrcweir virtual void SAL_CALL setObjectWithInfo(sal_Int32 parameterIndex, const ::com::sun::star::uno::Any& x, sal_Int32 targetSqlType, sal_Int32 scale) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 154cdf0e10cSrcweir virtual void SAL_CALL setRef(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef>& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 155cdf0e10cSrcweir virtual void SAL_CALL setBlob(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob>& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 156cdf0e10cSrcweir virtual void SAL_CALL setClob(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob>& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 157cdf0e10cSrcweir virtual void SAL_CALL setArray(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray>& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 158cdf0e10cSrcweir virtual void SAL_CALL clearParameters() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 159cdf0e10cSrcweir 160cdf0e10cSrcweir // com::sun::star::sdbc::XRowSet 161cdf0e10cSrcweir virtual void SAL_CALL execute() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 162cdf0e10cSrcweir virtual void SAL_CALL addRowSetListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener>& _rxListener) throw(::com::sun::star::uno::RuntimeException); 163cdf0e10cSrcweir virtual void SAL_CALL removeRowSetListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener>& _rxListener) throw(::com::sun::star::uno::RuntimeException); 164cdf0e10cSrcweir 165cdf0e10cSrcweir // com::sun::star::sdbc::XResultSet 166cdf0e10cSrcweir virtual sal_Bool SAL_CALL next() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 167cdf0e10cSrcweir virtual sal_Bool SAL_CALL isBeforeFirst() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 168cdf0e10cSrcweir virtual sal_Bool SAL_CALL isAfterLast() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 169cdf0e10cSrcweir virtual sal_Bool SAL_CALL isFirst() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 170cdf0e10cSrcweir virtual sal_Bool SAL_CALL isLast() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 171cdf0e10cSrcweir virtual void SAL_CALL beforeFirst() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 172cdf0e10cSrcweir virtual void SAL_CALL afterLast() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 173cdf0e10cSrcweir virtual sal_Bool SAL_CALL first() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 174cdf0e10cSrcweir virtual sal_Bool SAL_CALL last() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 175cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getRow() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 176cdf0e10cSrcweir virtual sal_Bool SAL_CALL absolute(sal_Int32 row) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 177cdf0e10cSrcweir virtual sal_Bool SAL_CALL relative(sal_Int32 rows) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 178cdf0e10cSrcweir virtual sal_Bool SAL_CALL previous() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 179cdf0e10cSrcweir virtual void SAL_CALL refreshRow() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 180cdf0e10cSrcweir virtual sal_Bool SAL_CALL rowUpdated() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 181cdf0e10cSrcweir virtual sal_Bool SAL_CALL rowInserted() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 182cdf0e10cSrcweir virtual sal_Bool SAL_CALL rowDeleted() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 183cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getStatement() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 184cdf0e10cSrcweir 185cdf0e10cSrcweir // conatiner::XChild 186cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException); 187cdf0e10cSrcweir virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); 188cdf0e10cSrcweir 189cdf0e10cSrcweir // ____ XComplexDescriptionAccess ____ 190cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL getComplexRowDescriptions() throw (::com::sun::star::uno::RuntimeException); 191cdf0e10cSrcweir virtual void SAL_CALL setComplexRowDescriptions( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aRowDescriptions ) throw (::com::sun::star::uno::RuntimeException); 192cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL getComplexColumnDescriptions() throw (::com::sun::star::uno::RuntimeException); 193cdf0e10cSrcweir virtual void SAL_CALL setComplexColumnDescriptions( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aColumnDescriptions ) throw (::com::sun::star::uno::RuntimeException); 194cdf0e10cSrcweir 195cdf0e10cSrcweir // ____ XChartDataArray (base of XComplexDescriptionAccess) ____ 196cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException); 197cdf0e10cSrcweir virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw (::com::sun::star::uno::RuntimeException); 198cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions() throw (::com::sun::star::uno::RuntimeException); 199cdf0e10cSrcweir virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRowDescriptions ) throw (::com::sun::star::uno::RuntimeException); 200cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions() throw (::com::sun::star::uno::RuntimeException); 201cdf0e10cSrcweir virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aColumnDescriptions ) throw (::com::sun::star::uno::RuntimeException); 202cdf0e10cSrcweir 203cdf0e10cSrcweir // ____ XChartData (base of XChartDataArray) ____ 204cdf0e10cSrcweir virtual void SAL_CALL addChartDataChangeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); 205cdf0e10cSrcweir virtual void SAL_CALL removeChartDataChangeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener )throw (::com::sun::star::uno::RuntimeException); 206cdf0e10cSrcweir virtual double SAL_CALL getNotANumber()throw (::com::sun::star::uno::RuntimeException); 207cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL isNotANumber(double nNumber )throw (::com::sun::star::uno::RuntimeException); 208cdf0e10cSrcweir private: 209cdf0e10cSrcweir DatabaseDataProvider(DatabaseDataProvider &); // not defined 210cdf0e10cSrcweir void operator =(DatabaseDataProvider &); // not defined 211cdf0e10cSrcweir ~DatabaseDataProvider()212cdf0e10cSrcweir virtual ~DatabaseDataProvider() {} 213cdf0e10cSrcweir 214cdf0e10cSrcweir // This function is called upon disposing the component, 215cdf0e10cSrcweir // if your component needs special work when it becomes 216cdf0e10cSrcweir // disposed, do it here. 217cdf0e10cSrcweir virtual void SAL_CALL disposing(); 218cdf0e10cSrcweir 219cdf0e10cSrcweir void impl_fillRowSet_throw(); 220cdf0e10cSrcweir void impl_executeRowSet_throw(::osl::ResettableMutexGuard& _rClearForNotifies); 221cdf0e10cSrcweir bool impl_fillParameters_nothrow( ::osl::ResettableMutexGuard& _rClearForNotifies); 222cdf0e10cSrcweir void impl_fillInternalDataProvider_throw(sal_Bool _bHasCategories,const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_aColumnNames); 223cdf0e10cSrcweir void impl_invalidateParameter_nothrow(); 224cdf0e10cSrcweir ::com::sun::star::uno::Any impl_getNumberFormatKey_nothrow(const ::rtl::OUString & _sRangeRepresentation) const; 225cdf0e10cSrcweir set(const::rtl::OUString & _sProperty,const T & _Value,T & _member)226cdf0e10cSrcweir template <typename T> void set( const ::rtl::OUString& _sProperty 227cdf0e10cSrcweir ,const T& _Value 228cdf0e10cSrcweir ,T& _member) 229cdf0e10cSrcweir { 230cdf0e10cSrcweir BoundListeners l; 231cdf0e10cSrcweir { 232cdf0e10cSrcweir ::osl::MutexGuard aGuard(m_aMutex); 233cdf0e10cSrcweir if ( _member != _Value ) 234cdf0e10cSrcweir { 235cdf0e10cSrcweir prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l); 236cdf0e10cSrcweir _member = _Value; 237cdf0e10cSrcweir } 238cdf0e10cSrcweir } 239cdf0e10cSrcweir l.notify(); 240cdf0e10cSrcweir } 241cdf0e10cSrcweir 242cdf0e10cSrcweir ::dbtools::ParameterManager m_aParameterManager; 243cdf0e10cSrcweir ::dbtools::FilterManager m_aFilterManager; 244cdf0e10cSrcweir ::std::map< ::rtl::OUString, ::com::sun::star::uno::Any> m_aNumberFormats; 245cdf0e10cSrcweir 246cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; 247cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xActiveConnection; 248cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet; 249cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XInternalDataProvider > m_xInternal; 250cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::chart::XComplexDescriptionAccess > m_xComplexDescriptionAccess; 251cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XRangeXMLConversion> m_xRangeConversion; 252cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> m_xHandler; 253cdf0e10cSrcweir // the object doin' most of the work - an SDB-rowset 254cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation> m_xAggregate; 255cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xAggregateSet; 256cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xParent; 257cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::rtl::OUString > m_MasterFields; 258cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::rtl::OUString > m_DetailFields; 259cdf0e10cSrcweir 260cdf0e10cSrcweir ::rtl::OUString m_Command; 261cdf0e10cSrcweir ::rtl::OUString m_DataSourceName; 262cdf0e10cSrcweir ::sal_Int32 m_CommandType; 263cdf0e10cSrcweir sal_Int32 m_RowLimit; 264cdf0e10cSrcweir ::rtl::OUString m_Filter; 265cdf0e10cSrcweir ::rtl::OUString m_HavingClause; 266cdf0e10cSrcweir ::rtl::OUString m_Order; 267cdf0e10cSrcweir ::rtl::OUString m_GroupBy; 268cdf0e10cSrcweir ::sal_Bool m_EscapeProcessing; 269cdf0e10cSrcweir ::sal_Bool m_ApplyFilter; 270cdf0e10cSrcweir }; 271cdf0e10cSrcweir 272cdf0e10cSrcweir } // namespace dbaccess 273cdf0e10cSrcweir 274cdf0e10cSrcweir #endif // DBA_DATABASEDATAPROVIDER_HXX_INCLUDED 275