LibreOffice Module ucbhelper (master) 1
resultsetmetadata.hxx
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#ifndef INCLUDED_UCBHELPER_RESULTSETMETADATA_HXX
21#define INCLUDED_UCBHELPER_RESULTSETMETADATA_HXX
22
23#include <vector>
24#include <memory>
25#include <com/sun/star/uno/Reference.h>
26#include <com/sun/star/uno/Sequence.h>
27#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
30
31namespace com::sun::star {
32 namespace beans { struct Property; }
33 namespace uno { class XComponentContext; }
34}
35
36namespace ucbhelper_impl {
37 struct ResultSetMetaData_Impl;
38}
39
40namespace ucbhelper
41{
42
43
50{
53
54 inline ResultSetColumnData();
55};
56
57// Note: Never change the initial values! Implementations using this struct
58// may heavily depend on the behaviour of the default constructor.
59
61: isCaseSensitive( true )
62{
63}
64
65
73 public cppu::WeakImplHelper<css::sdbc::XResultSetMetaData>
74{
75 std::unique_ptr<ucbhelper_impl::ResultSetMetaData_Impl> m_pImpl;
76 css::uno::Reference< css::uno::XComponentContext > m_xContext;
77 css::uno::Sequence< css::beans::Property > m_aProps;
78
79public:
80
89 const css::uno::Reference< css::uno::XComponentContext >& rxContext,
90 const css::uno::Sequence< css::beans::Property >& rProps );
91
106 const css::uno::Reference< css::uno::XComponentContext >& rxContext,
107 const css::uno::Sequence< css::beans::Property >& rProps,
108 std::vector< ResultSetColumnData >&& rColumnData );
109
113 virtual ~ResultSetMetaData() override;
114
115 // XResultSetMetaData
116
122 virtual sal_Int32 SAL_CALL
123 getColumnCount() override;
132 virtual sal_Bool SAL_CALL
133 isAutoIncrement( sal_Int32 column ) override;
141 virtual sal_Bool SAL_CALL
142 isCaseSensitive( sal_Int32 column ) override;
151 virtual sal_Bool SAL_CALL
152 isSearchable( sal_Int32 column ) override;
160 virtual sal_Bool SAL_CALL
161 isCurrency( sal_Int32 column ) override;
172 virtual sal_Int32 SAL_CALL
173 isNullable( sal_Int32 column ) override;
181 virtual sal_Bool SAL_CALL
182 isSigned( sal_Int32 column ) override;
190 virtual sal_Int32 SAL_CALL
191 getColumnDisplaySize( sal_Int32 column ) override;
200 virtual OUString SAL_CALL
201 getColumnLabel( sal_Int32 column ) override;
209 virtual OUString SAL_CALL
210 getColumnName( sal_Int32 column ) override;
221 virtual OUString SAL_CALL
222 getSchemaName( sal_Int32 column ) override;
234 virtual sal_Int32 SAL_CALL
235 getPrecision( sal_Int32 column ) override;
244 virtual sal_Int32 SAL_CALL
245 getScale( sal_Int32 column ) override;
256 virtual OUString SAL_CALL
257 getTableName( sal_Int32 column ) override;
258 virtual OUString SAL_CALL
269 getCatalogName( sal_Int32 column ) override;
281 virtual sal_Int32 SAL_CALL
282 getColumnType( sal_Int32 column ) override;
293 virtual OUString SAL_CALL
294 getColumnTypeName( sal_Int32 column ) override;
302 virtual sal_Bool SAL_CALL
303 isReadOnly( sal_Int32 column ) override;
311 virtual sal_Bool SAL_CALL
312 isWritable( sal_Int32 column ) override;
320 virtual sal_Bool SAL_CALL
321 isDefinitelyWritable( sal_Int32 column ) override;
333 virtual OUString SAL_CALL
334 getColumnServiceName( sal_Int32 column ) override;
335};
336
337} // namespace ucbhelper
338
339#endif /* ! INCLUDED_UCBHELPER_RESULTSETMETADATA_HXX */
340
341/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This is an implementation of the interface XResultSetMetaData.
css::uno::Sequence< css::beans::Property > m_aProps
ResultSetMetaData(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Sequence< css::beans::Property > &rProps, std::vector< ResultSetColumnData > &&rColumnData)
Constructor.
css::uno::Reference< css::uno::XComponentContext > m_xContext
ResultSetMetaData(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Sequence< css::beans::Property > &rProps)
Constructor.
std::unique_ptr< ucbhelper_impl::ResultSetMetaData_Impl > m_pImpl
bool isNullable
bool isAutoIncrement
bool isCurrency
This is a structure that holds additional meta data for one column of a resultset.
unsigned char sal_Bool
#define UCBHELPER_DLLPUBLIC