LibreOffice Module connectivity (master) 1
NColumns.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20
21#include "NColumns.hxx"
22#include "NTable.hxx"
24#include <com/sun/star/sdbc/XRow.hpp>
25
26using namespace connectivity::sdbcx;
27using namespace connectivity;
28using namespace ::comphelper;
29using namespace ::com::sun::star::uno;
30using namespace ::com::sun::star::beans;
31using namespace ::com::sun::star::sdbc;
32using namespace ::com::sun::star::container;
33using namespace ::com::sun::star::lang;
34using namespace connectivity::evoab;
35
36
37sdbcx::ObjectType OEvoabColumns::createObject(const OUString& _rName)
38{
39 const Any aCatalog;
40 const OUString sCatalogName;
41 const OUString sSchemaName(m_pTable->getSchema());
42 const OUString sTableName(m_pTable->getTableName());
44 aCatalog,
45 sSchemaName,
46 sTableName,
47 _rName);
48
50 if (xResult.is())
51 {
52 Reference< XRow > xRow(xResult,UNO_QUERY);
53
54 while (xResult->next())
55 {
56 if (xRow->getString(4) == _rName)
57 {
58 xRet = new OColumn(
59 _rName,
60 xRow->getString(6),
61 xRow->getString(13),
62 xRow->getString(12),
63 xRow->getInt(11),
64 xRow->getInt(7),
65 xRow->getInt(9),
66 xRow->getInt(5),
67 false,
68 false,
69 false,
70 true,
71 sCatalogName,
72 sSchemaName,
73 sTableName);
74 break;
75 }
76 }
77 }
78
79 return xRet;
80}
81
83{
85}
86
87/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void impl_refresh() override
Definition: NColumns.cxx:82
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL getMetaData() override
OEvoabConnection * getConnection()
Definition: NTable.hxx:43
OUString const & getTableName() const
Definition: NTable.hxx:47
OUString const & getSchema() const
Definition: NTable.hxx:48
virtual void refreshColumns() override
Definition: NTable.cxx:54
css::uno::Reference< css::beans::XPropertySet > ObjectType
Definition: VCollection.hxx:59