1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include "KCatalog.hxx"
22 #include "KConnection.hxx"
23 #include "KTables.hxx"
25 using namespace connectivity::kab
;
26 using namespace ::com::sun::star::uno
;
27 using namespace ::com::sun::star::beans
;
28 using namespace ::com::sun::star::sdbcx
;
29 using namespace ::com::sun::star::sdbc
;
30 using namespace ::com::sun::star::container
;
31 using namespace ::com::sun::star::lang
;
32 using namespace ::cppu
;
35 KabCatalog::KabCatalog(KabConnection
* _pCon
)
36 : connectivity::sdbcx::OCatalog(_pCon
),
38 m_xMetaData(m_pConnection
->getMetaData())
42 void KabCatalog::refreshTables()
44 TStringVector aVector
;
45 Sequence
< OUString
> aTypes(1);
47 Reference
< XResultSet
> xResult
= m_xMetaData
->getTables(
55 Reference
< XRow
> xRow(xResult
,UNO_QUERY
);
58 while (xResult
->next())
60 // aName = xRow->getString(2);
62 aName
= xRow
->getString(3);
63 aVector
.push_back(aName
);
67 m_pTables
->reFill(aVector
);
69 m_pTables
= new KabTables(m_xMetaData
,*this,m_aMutex
,aVector
);
72 void KabCatalog::refreshViews()
76 void KabCatalog::refreshGroups()
80 void KabCatalog::refreshUsers()
86 Reference
< XNameAccess
> SAL_CALL
KabCatalog::getTables( ) throw(RuntimeException
, std::exception
)
88 ::osl::MutexGuard
aGuard(m_aMutex
);
89 checkDisposed(rBHelper
.bDisposed
);
96 catch( const RuntimeException
& )
98 // allowed to leave this method
101 catch( const Exception
& )
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */