build fix
[LibreOffice.git] / connectivity / source / drivers / kab / KResultSetMetaData.hxx
blob557a289aa11f66074d6cd25109c470ff0c1ff8a3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_KAB_KRESULTSETMETADATA_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_KAB_KRESULTSETMETADATA_HXX
23 #include <connectivity/CommonTools.hxx>
24 #include <com/sun/star/sdbc/XResultSetMetaData.hpp>
25 #include <cppuhelper/implbase.hxx>
26 #include <rtl/ref.hxx>
28 namespace connectivity
30 namespace kab
33 ** KabResultSetMetaData
35 typedef ::cppu::WeakImplHelper< css::sdbc::XResultSetMetaData> KabResultSetMetaData_BASE;
37 class KabResultSetMetaData : public KabResultSetMetaData_BASE
39 ::std::vector<sal_Int32> m_aKabFields; // for each selected column, contains the number
40 // of the corresponding KAddressBook field
42 protected:
43 virtual ~KabResultSetMetaData() override;
45 public:
46 KabResultSetMetaData();
48 // avoid ambigous cast error from the compiler
49 inline operator css::uno::Reference< css::sdbc::XResultSetMetaData > () throw()
50 { return this; }
52 void setKabFields(
53 const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(css::sdbc::SQLException);
54 inline sal_uInt32 fieldAtColumn(sal_Int32 columnIndex) const
55 { return m_aKabFields[columnIndex - 1]; }
57 virtual sal_Int32 SAL_CALL getColumnCount( ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
58 virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
59 virtual sal_Bool SAL_CALL isCaseSensitive( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
60 virtual sal_Bool SAL_CALL isSearchable( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
61 virtual sal_Bool SAL_CALL isCurrency( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
62 virtual sal_Int32 SAL_CALL isNullable( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
63 virtual sal_Bool SAL_CALL isSigned( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
64 virtual sal_Int32 SAL_CALL getColumnDisplaySize( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
65 virtual OUString SAL_CALL getColumnLabel( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
66 virtual OUString SAL_CALL getColumnName( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
67 virtual OUString SAL_CALL getSchemaName( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
68 virtual sal_Int32 SAL_CALL getPrecision( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
69 virtual sal_Int32 SAL_CALL getScale( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
70 virtual OUString SAL_CALL getTableName( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
71 virtual OUString SAL_CALL getCatalogName( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
72 virtual sal_Int32 SAL_CALL getColumnType( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
73 virtual OUString SAL_CALL getColumnTypeName( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
74 virtual sal_Bool SAL_CALL isReadOnly( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
75 virtual sal_Bool SAL_CALL isWritable( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
76 virtual sal_Bool SAL_CALL isDefinitelyWritable( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
77 virtual OUString SAL_CALL getColumnServiceName( sal_Int32 column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
82 #endif // INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_KAB_KRESULTSETMETADATA_HXX
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */