1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX 29 #define DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX 30 31 #ifndef DBACCESS_CONNECTION_DEPENDENT_HXX 32 #include "connectiondependent.hxx" 33 #endif 34 35 /** === begin UNO includes === **/ 36 #ifndef _COM_SUN_STAR_SDB_TOOLS_XTABLENAME_HPP_ 37 #include <com/sun/star/sdb/tools/XTableName.hpp> 38 #endif 39 /** === end UNO includes === **/ 40 41 #ifndef _CPPUHELPER_IMPLBASE1_HXX_ 42 #include <cppuhelper/implbase1.hxx> 43 #endif 44 45 #include <memory> 46 47 //........................................................................ 48 namespace sdbtools 49 { 50 //........................................................................ 51 52 //==================================================================== 53 //= TableName 54 //==================================================================== 55 typedef ::cppu::WeakImplHelper1 < ::com::sun::star::sdb::tools::XTableName 56 > TableName_Base; 57 struct TableName_Impl; 58 /** default implementation for XTableName 59 */ 60 class TableName :public TableName_Base 61 ,public ConnectionDependentComponent 62 { 63 private: 64 ::std::auto_ptr< TableName_Impl > m_pImpl; 65 66 public: 67 /** constructs the instance 68 69 @param _rContext 70 the component's context 71 @param _rxConnection 72 the connection to work with. Will be held weak. Must not be <NULL/>. 73 74 @throws ::com::sun::star::lang::NullPointerException 75 if _rxConnection is <NULL/> 76 */ 77 TableName( 78 const ::comphelper::ComponentContext& _rContext, 79 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection 80 ); 81 82 // XTableName 83 virtual ::rtl::OUString SAL_CALL getCatalogName() throw (::com::sun::star::uno::RuntimeException); 84 virtual void SAL_CALL setCatalogName( const ::rtl::OUString& _catalogname ) throw (::com::sun::star::uno::RuntimeException); 85 virtual ::rtl::OUString SAL_CALL getSchemaName() throw (::com::sun::star::uno::RuntimeException); 86 virtual void SAL_CALL setSchemaName( const ::rtl::OUString& _schemaname ) throw (::com::sun::star::uno::RuntimeException); 87 virtual ::rtl::OUString SAL_CALL getTableName() throw (::com::sun::star::uno::RuntimeException); 88 virtual void SAL_CALL setTableName( const ::rtl::OUString& _tablename ) throw (::com::sun::star::uno::RuntimeException); 89 virtual ::rtl::OUString SAL_CALL getNameForSelect() throw (::com::sun::star::uno::RuntimeException); 90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getTable() throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); 91 virtual void SAL_CALL setTable( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _table ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); 92 virtual ::rtl::OUString SAL_CALL getComposedName( ::sal_Int32 Type, ::sal_Bool _Quote ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); 93 virtual void SAL_CALL setComposedName( const ::rtl::OUString& ComposedName, ::sal_Int32 Type ) throw (::com::sun::star::uno::RuntimeException); 94 95 protected: 96 virtual ~TableName(); 97 98 private: 99 TableName(); // never implemented 100 TableName( const TableName& ); // never implemented 101 TableName& operator=( const TableName& ); // never implemented 102 }; 103 104 //........................................................................ 105 } // namespace sdbtools 106 //........................................................................ 107 108 #endif // DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX 109 110