1*caf5cd79SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*caf5cd79SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*caf5cd79SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*caf5cd79SAndrew Rist * distributed with this work for additional information 6*caf5cd79SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*caf5cd79SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*caf5cd79SAndrew Rist * "License"); you may not use this file except in compliance 9*caf5cd79SAndrew Rist * with the License. You may obtain a copy of the License at 10*caf5cd79SAndrew Rist * 11*caf5cd79SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*caf5cd79SAndrew Rist * 13*caf5cd79SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*caf5cd79SAndrew Rist * software distributed under the License is distributed on an 15*caf5cd79SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*caf5cd79SAndrew Rist * KIND, either express or implied. See the License for the 17*caf5cd79SAndrew Rist * specific language governing permissions and limitations 18*caf5cd79SAndrew Rist * under the License. 19*caf5cd79SAndrew Rist * 20*caf5cd79SAndrew Rist *************************************************************/ 21*caf5cd79SAndrew Rist 22*caf5cd79SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _CONNECTIVITY_SDBCX_VIEW_HXX_ 25cdf0e10cSrcweir #define _CONNECTIVITY_SDBCX_VIEW_HXX_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <osl/diagnose.h> 28cdf0e10cSrcweir #include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp> 29cdf0e10cSrcweir #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> 30cdf0e10cSrcweir #include <comphelper/proparrhlp.hxx> 31cdf0e10cSrcweir #include <cppuhelper/compbase1.hxx> 32cdf0e10cSrcweir #include "connectivity/CommonTools.hxx" 33cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.h> 34cdf0e10cSrcweir #include <com/sun/star/container/XNamed.hpp> 35cdf0e10cSrcweir #include "connectivity/sdbcx/VDescriptor.hxx" 36cdf0e10cSrcweir #include "connectivity/dbtoolsdllapi.hxx" 37cdf0e10cSrcweir #include <comphelper/IdPropArrayHelper.hxx> 38cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx> 39cdf0e10cSrcweir 40cdf0e10cSrcweir namespace connectivity 41cdf0e10cSrcweir { 42cdf0e10cSrcweir namespace sdbcx 43cdf0e10cSrcweir { 44cdf0e10cSrcweir 45cdf0e10cSrcweir typedef ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo, 46cdf0e10cSrcweir ::com::sun::star::container::XNamed> OView_BASE; 47cdf0e10cSrcweir 48cdf0e10cSrcweir 49cdf0e10cSrcweir 50cdf0e10cSrcweir class OOO_DLLPUBLIC_DBTOOLS OView : 51cdf0e10cSrcweir public ::comphelper::OMutexAndBroadcastHelper, 52cdf0e10cSrcweir public OView_BASE, 53cdf0e10cSrcweir public ::comphelper::OIdPropertyArrayUsageHelper<OView>, 54cdf0e10cSrcweir public ODescriptor 55cdf0e10cSrcweir { 56cdf0e10cSrcweir protected: 57cdf0e10cSrcweir ::rtl::OUString m_CatalogName; 58cdf0e10cSrcweir ::rtl::OUString m_SchemaName; 59cdf0e10cSrcweir ::rtl::OUString m_Command; 60cdf0e10cSrcweir sal_Int32 m_CheckOption; 61cdf0e10cSrcweir // need for the getName method 62cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; 63cdf0e10cSrcweir 64cdf0e10cSrcweir // OPropertyArrayUsageHelper 65cdf0e10cSrcweir virtual ::cppu::IPropertyArrayHelper* createArrayHelper( sal_Int32 _nId) const; 66cdf0e10cSrcweir // OPropertySetHelper 67cdf0e10cSrcweir virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); 68cdf0e10cSrcweir 69cdf0e10cSrcweir public: 70cdf0e10cSrcweir DECLARE_SERVICE_INFO(); 71cdf0e10cSrcweir 72cdf0e10cSrcweir OView(sal_Bool _bCase,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _xMetaData); 73cdf0e10cSrcweir OView( sal_Bool _bCase, 74cdf0e10cSrcweir const ::rtl::OUString& _rName, 75cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _xMetaData, 76cdf0e10cSrcweir sal_Int32 _nCheckOption = 0, 77cdf0e10cSrcweir const ::rtl::OUString& _rCommand = ::rtl::OUString(), 78cdf0e10cSrcweir const ::rtl::OUString& _rSchemaName = ::rtl::OUString(), 79cdf0e10cSrcweir const ::rtl::OUString& _rCatalogName = ::rtl::OUString()); 80cdf0e10cSrcweir virtual ~OView(); 81cdf0e10cSrcweir 82cdf0e10cSrcweir // ODescriptor 83cdf0e10cSrcweir virtual void construct(); 84cdf0e10cSrcweir 85cdf0e10cSrcweir // ::cppu::OComponentHelper 86cdf0e10cSrcweir virtual void SAL_CALL disposing(void); 87cdf0e10cSrcweir 88cdf0e10cSrcweir // XInterface 89cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); 90cdf0e10cSrcweir virtual void SAL_CALL acquire() throw(); 91cdf0e10cSrcweir virtual void SAL_CALL release() throw(); 92cdf0e10cSrcweir //XTypeProvider 93cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); 94cdf0e10cSrcweir // XPropertySet 95cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); 96cdf0e10cSrcweir // XNamed 97cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getName( ) throw(::com::sun::star::uno::RuntimeException); 98cdf0e10cSrcweir virtual void SAL_CALL setName( const ::rtl::OUString& ) throw(::com::sun::star::uno::RuntimeException); 99cdf0e10cSrcweir }; 100cdf0e10cSrcweir } 101cdf0e10cSrcweir } 102cdf0e10cSrcweir 103cdf0e10cSrcweir #endif // _CONNECTIVITY_SDBCX_VIEW_HXX_ 104cdf0e10cSrcweir 105