LibreOffice Module dbaccess (master) 1
querycomposer.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#pragma once
20
21#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
22#include <com/sun/star/sdb/XParametersSupplier.hpp>
23#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
24#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
25#include <com/sun/star/lang/XServiceInfo.hpp>
29#include <apitools.hxx>
30#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
31
32
33namespace dbaccess
34{
35 typedef ::cppu::ImplHelper5< css::sdb::XSQLQueryComposer,
36 css::sdb::XParametersSupplier,
37 css::sdbcx::XTablesSupplier,
38 css::sdbcx::XColumnsSupplier,
39 css::lang::XServiceInfo > OQueryComposer_BASE;
40
42 public OSubComponent,
44 {
45 std::vector< OUString> m_aFilters;
46 std::vector< OUString> m_aOrders;
47 OUString m_sOrgFilter;
48 OUString m_sOrgOrder;
49 css::uno::Reference< css::sdb::XSingleSelectQueryComposer> m_xComposer;
50 css::uno::Reference< css::sdb::XSingleSelectQueryComposer> m_xComposerHelper;
51
52 protected:
53 virtual void SAL_CALL disposing() override;
54 virtual ~OQueryComposer() override;
55 public:
56
57 OQueryComposer( const css::uno::Reference< css::sdbc::XConnection>& _xConnection );
58
59 // css::lang::XTypeProvider
60 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
61 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
62
63 // css::uno::XInterface
64 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
65 virtual void SAL_CALL acquire() noexcept override;
66 virtual void SAL_CALL release() noexcept override;
67 // XServiceInfo
68 virtual OUString SAL_CALL getImplementationName( ) override;
69 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
70 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
71 // XSQLQueryComposer
72 virtual OUString SAL_CALL getQuery( ) override;
73 virtual void SAL_CALL setQuery( const OUString& command ) override;
74 virtual OUString SAL_CALL getComposedQuery( ) override;
75 virtual OUString SAL_CALL getFilter( ) override;
76 virtual css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > SAL_CALL getStructuredFilter( ) override;
77 virtual OUString SAL_CALL getOrder( ) override;
78 virtual void SAL_CALL appendFilterByColumn( const css::uno::Reference< css::beans::XPropertySet >& column ) override;
79 virtual void SAL_CALL appendOrderByColumn( const css::uno::Reference< css::beans::XPropertySet >& column, sal_Bool ascending ) override;
80 virtual void SAL_CALL setFilter( const OUString& filter ) override;
81 virtual void SAL_CALL setOrder( const OUString& order ) override;
82 // XTablesSupplier
83 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTables( ) override;
84 // XColumnsSupplier
85 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns( ) override;
86 // XParametersSupplier
87 virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getParameters( ) override;
88 };
89}
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< OUString > m_aFilters
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > m_xComposerHelper
virtual OUString SAL_CALL getQuery() override
virtual css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > SAL_CALL getStructuredFilter() override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL setQuery(const OUString &command) override
virtual void SAL_CALL setFilter(const OUString &filter) override
virtual OUString SAL_CALL getFilter() override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL acquire() noexcept override
virtual ~OQueryComposer() override
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > m_xComposer
virtual OUString SAL_CALL getComposedQuery() override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTables() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL setOrder(const OUString &order) override
OQueryComposer(const css::uno::Reference< css::sdbc::XConnection > &_xConnection)
std::vector< OUString > m_aOrders
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL appendOrderByColumn(const css::uno::Reference< css::beans::XPropertySet > &column, sal_Bool ascending) override
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL appendFilterByColumn(const css::uno::Reference< css::beans::XPropertySet > &column) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getParameters() override
virtual OUString SAL_CALL getOrder() override
virtual void SAL_CALL disposing() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
::cppu::ImplHelper5< css::sdb::XSQLQueryComposer, css::sdb::XParametersSupplier, css::sdbcx::XTablesSupplier, css::sdbcx::XColumnsSupplier, css::lang::XServiceInfo > OQueryComposer_BASE
unsigned char sal_Bool