1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _CONNECTIVITY_ADABAS_CATALOG_HXX_ 25 #define _CONNECTIVITY_ADABAS_CATALOG_HXX_ 26 27 #include "connectivity/sdbcx/VCatalog.hxx" 28 #include "odbc/OFunctiondefs.hxx" 29 #include "connectivity/StdTypeDefs.hxx" 30 31 namespace connectivity 32 { 33 namespace adabas 34 { 35 // please don't name the class the same name as in an other namespaces 36 // some compilers have problems with this task as I noticed on Windows 37 class OAdabasConnection; 38 class OAdabasCatalog : public connectivity::sdbcx::OCatalog 39 { 40 OAdabasConnection* m_pConnection; // used to get the metadata 41 SQLHANDLE m_aConnectionHdl; // used for odbc specific stuff 42 43 void fillVector(const ::rtl::OUString& _sQuery,TStringVector& _rVector); 44 45 protected: 46 /** builds the name which should be used to access the object later on in the collection. 47 Will only be called in fillNames. 48 @param _xRow 49 The current row from a call of XDatabaseMetaData::getTables. 50 */ 51 virtual ::rtl::OUString buildName( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >& _xRow); 52 public: 53 // implementation of the pure virtual methods 54 virtual void refreshTables(); 55 virtual void refreshViews() ; 56 virtual void refreshGroups(); 57 virtual void refreshUsers() ; 58 59 public: 60 OAdabasCatalog(SQLHANDLE _aConnectionHdl,OAdabasConnection* _pCon); 61 getConnection() const62 OAdabasConnection* getConnection() const { return m_pConnection; } getPrivateTables() const63 sdbcx::OCollection* getPrivateTables() const { return m_pTables;} getPrivateViews() const64 sdbcx::OCollection* getPrivateViews() const { return m_pViews; } 65 66 static const ::rtl::OUString& getDot(); 67 // correct the column properties of float/real/double values 68 // all & parameters are IN and OUT 69 static void correctColumnProperties(sal_Int32 _nPrec, sal_Int32& _rnType,::rtl::OUString& _rsTypeName); 70 }; 71 } 72 } 73 #endif // _CONNECTIVITY_ADABAS_CATALOG_HXX_ 74 75