2000-09-18 15:18:56 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|
*
|
2008-04-10 09:42:26 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
2008-04-10 09:42:26 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
2008-04-10 09:42:26 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
2008-04-10 09:42:26 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
2008-04-10 09:42:26 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
2008-04-10 09:42:26 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
|
|
|
|
************************************************************************/
|
|
|
|
|
#ifndef _CONNECTIVITY_ADABAS_CATALOG_HXX_
|
|
|
|
|
#define _CONNECTIVITY_ADABAS_CATALOG_HXX_
|
|
|
|
|
|
|
|
|
|
#include "connectivity/sdbcx/VCatalog.hxx"
|
|
|
|
|
#include "odbc/OFunctiondefs.hxx"
|
2005-03-10 14:32:39 +00:00
|
|
|
#include "connectivity/StdTypeDefs.hxx"
|
2000-09-18 15:18:56 +00:00
|
|
|
|
|
|
|
|
namespace connectivity
|
|
|
|
|
{
|
|
|
|
|
namespace adabas
|
|
|
|
|
{
|
2000-10-09 10:44:40 +00:00
|
|
|
// please don't name the class the same name as in an other namespaces
|
|
|
|
|
// some compilers have problems with this task as I noticed on windows
|
2000-09-18 15:18:56 +00:00
|
|
|
class OAdabasConnection;
|
|
|
|
|
class OAdabasCatalog : public connectivity::sdbcx::OCatalog
|
|
|
|
|
{
|
2000-10-09 10:44:40 +00:00
|
|
|
OAdabasConnection* m_pConnection; // used to get the metadata
|
|
|
|
|
SQLHANDLE m_aConnectionHdl; // used for odbc specific stuff
|
2000-09-18 15:18:56 +00:00
|
|
|
|
2005-03-10 14:32:39 +00:00
|
|
|
void fillVector(const ::rtl::OUString& _sQuery,TStringVector& _rVector);
|
|
|
|
|
|
2002-10-25 08:07:25 +00:00
|
|
|
protected:
|
|
|
|
|
/** builds the name which should be used to access the object later on in the collection.
|
|
|
|
|
Will only be called in fillNames.
|
|
|
|
|
@param _xRow
|
|
|
|
|
The cuurent row from a call of XDatabaseMetaData::getTables.
|
|
|
|
|
*/
|
|
|
|
|
virtual ::rtl::OUString buildName( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >& _xRow);
|
2000-09-18 15:18:56 +00:00
|
|
|
public:
|
2000-10-09 10:44:40 +00:00
|
|
|
// implementation of the pure virtual methods
|
2000-09-18 15:18:56 +00:00
|
|
|
virtual void refreshTables();
|
|
|
|
|
virtual void refreshViews() ;
|
|
|
|
|
virtual void refreshGroups();
|
|
|
|
|
virtual void refreshUsers() ;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
OAdabasCatalog(SQLHANDLE _aConnectionHdl,OAdabasConnection* _pCon);
|
|
|
|
|
|
2001-03-28 10:29:53 +00:00
|
|
|
OAdabasConnection* getConnection() const { return m_pConnection; }
|
|
|
|
|
sdbcx::OCollection* getPrivateTables() const { return m_pTables;}
|
|
|
|
|
sdbcx::OCollection* getPrivateViews() const { return m_pViews; }
|
2001-08-01 05:21:30 +00:00
|
|
|
|
|
|
|
|
static const ::rtl::OUString& getDot();
|
2001-08-02 09:41:53 +00:00
|
|
|
// correct the the column properties of float/real/double values
|
|
|
|
|
// all & parameters are IN and OUT
|
|
|
|
|
static void correctColumnProperties(sal_Int32 _nPrec, sal_Int32& _rnType,::rtl::OUString& _rsTypeName);
|
2000-09-18 15:18:56 +00:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif // _CONNECTIVITY_ADABAS_CATALOG_HXX_
|
|
|
|
|
|