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 #ifndef _CONNECTIVITY_ADABAS_CATALOG_HXX_ 28 #define _CONNECTIVITY_ADABAS_CATALOG_HXX_ 29 30 #include "connectivity/sdbcx/VCatalog.hxx" 31 #include "odbc/OFunctiondefs.hxx" 32 #include "connectivity/StdTypeDefs.hxx" 33 34 namespace connectivity 35 { 36 namespace adabas 37 { 38 // please don't name the class the same name as in an other namespaces 39 // some compilers have problems with this task as I noticed on windows 40 class OAdabasConnection; 41 class OAdabasCatalog : public connectivity::sdbcx::OCatalog 42 { 43 OAdabasConnection* m_pConnection; // used to get the metadata 44 SQLHANDLE m_aConnectionHdl; // used for odbc specific stuff 45 46 void fillVector(const ::rtl::OUString& _sQuery,TStringVector& _rVector); 47 48 protected: 49 /** builds the name which should be used to access the object later on in the collection. 50 Will only be called in fillNames. 51 @param _xRow 52 The cuurent row from a call of XDatabaseMetaData::getTables. 53 */ 54 virtual ::rtl::OUString buildName( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >& _xRow); 55 public: 56 // implementation of the pure virtual methods 57 virtual void refreshTables(); 58 virtual void refreshViews() ; 59 virtual void refreshGroups(); 60 virtual void refreshUsers() ; 61 62 public: 63 OAdabasCatalog(SQLHANDLE _aConnectionHdl,OAdabasConnection* _pCon); 64 65 OAdabasConnection* getConnection() const { return m_pConnection; } 66 sdbcx::OCollection* getPrivateTables() const { return m_pTables;} 67 sdbcx::OCollection* getPrivateViews() const { return m_pViews; } 68 69 static const ::rtl::OUString& getDot(); 70 // correct the the column properties of float/real/double values 71 // all & parameters are IN and OUT 72 static void correctColumnProperties(sal_Int32 _nPrec, sal_Int32& _rnType,::rtl::OUString& _rsTypeName); 73 }; 74 } 75 } 76 #endif // _CONNECTIVITY_ADABAS_CATALOG_HXX_ 77 78