merge the formfield patch from ooo-build
[ooovba.git] / connectivity / source / inc / adabas / BCatalog.hxx
blobfdfce1c0bcde3f5aff118962ad3d20dbef6ffc38
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: BCatalog.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _CONNECTIVITY_ADABAS_CATALOG_HXX_
31 #define _CONNECTIVITY_ADABAS_CATALOG_HXX_
33 #include "connectivity/sdbcx/VCatalog.hxx"
34 #include "odbc/OFunctiondefs.hxx"
35 #include "connectivity/StdTypeDefs.hxx"
37 namespace connectivity
39 namespace adabas
41 // please don't name the class the same name as in an other namespaces
42 // some compilers have problems with this task as I noticed on windows
43 class OAdabasConnection;
44 class OAdabasCatalog : public connectivity::sdbcx::OCatalog
46 OAdabasConnection* m_pConnection; // used to get the metadata
47 SQLHANDLE m_aConnectionHdl; // used for odbc specific stuff
49 void fillVector(const ::rtl::OUString& _sQuery,TStringVector& _rVector);
51 protected:
52 /** builds the name which should be used to access the object later on in the collection.
53 Will only be called in fillNames.
54 @param _xRow
55 The cuurent row from a call of XDatabaseMetaData::getTables.
57 virtual ::rtl::OUString buildName( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >& _xRow);
58 public:
59 // implementation of the pure virtual methods
60 virtual void refreshTables();
61 virtual void refreshViews() ;
62 virtual void refreshGroups();
63 virtual void refreshUsers() ;
65 public:
66 OAdabasCatalog(SQLHANDLE _aConnectionHdl,OAdabasConnection* _pCon);
68 OAdabasConnection* getConnection() const { return m_pConnection; }
69 sdbcx::OCollection* getPrivateTables() const { return m_pTables;}
70 sdbcx::OCollection* getPrivateViews() const { return m_pViews; }
72 static const ::rtl::OUString& getDot();
73 // correct the the column properties of float/real/double values
74 // all & parameters are IN and OUT
75 static void correctColumnProperties(sal_Int32 _nPrec, sal_Int32& _rnType,::rtl::OUString& _rsTypeName);
79 #endif // _CONNECTIVITY_ADABAS_CATALOG_HXX_