build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / dbaccess / source / core / inc / querycomposer.hxx
blob659f2c951e2c09391df69cf643d3f83551d37a6f
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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_CORE_INC_QUERYCOMPOSER_HXX
20 #define INCLUDED_DBACCESS_SOURCE_CORE_INC_QUERYCOMPOSER_HXX
22 #include <connectivity/CommonTools.hxx>
23 #include <com/sun/star/sdb/XSQLQueryComposer.hpp>
24 #include <com/sun/star/sdb/XParametersSupplier.hpp>
25 #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
26 #include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/script/XTypeConverter.hpp>
29 #include <cppuhelper/implbase5.hxx>
30 #include <cppuhelper/basemutex.hxx>
31 #include <connectivity/sqliterator.hxx>
32 #include <connectivity/sqlparse.hxx>
33 #include "apitools.hxx"
34 #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
37 namespace dbaccess
39 typedef ::cppu::ImplHelper5< css::sdb::XSQLQueryComposer,
40 css::sdb::XParametersSupplier,
41 css::sdbcx::XTablesSupplier,
42 css::sdbcx::XColumnsSupplier,
43 css::lang::XServiceInfo > OQueryComposer_BASE;
45 class OQueryComposer : public ::cppu::BaseMutex,
46 public OSubComponent,
47 public OQueryComposer_BASE
49 ::std::vector< OUString> m_aFilters;
50 ::std::vector< OUString> m_aOrders;
51 OUString m_sOrgFilter;
52 OUString m_sOrgOrder;
53 css::uno::Reference< css::sdb::XSingleSelectQueryComposer> m_xComposer;
54 css::uno::Reference< css::sdb::XSingleSelectQueryComposer> m_xComposerHelper;
56 protected:
57 virtual void SAL_CALL disposing() override;
58 virtual ~OQueryComposer() override;
59 public:
61 OQueryComposer( const css::uno::Reference< css::sdbc::XConnection>& _xConnection );
63 // css::lang::XTypeProvider
64 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw (css::uno::RuntimeException, std::exception) override;
65 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (css::uno::RuntimeException, std::exception) override;
67 // css::uno::XInterface
68 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
69 throw(css::uno::RuntimeException, std::exception) override;
70 virtual void SAL_CALL acquire() throw() override;
71 virtual void SAL_CALL release() throw() override;
72 // XServiceInfo
73 virtual OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) override;
74 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(css::uno::RuntimeException, std::exception) override;
75 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) override;
76 // XSQLQueryComposer
77 virtual OUString SAL_CALL getQuery( ) throw(css::uno::RuntimeException, std::exception) override;
78 virtual void SAL_CALL setQuery( const OUString& command ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
79 virtual OUString SAL_CALL getComposedQuery( ) throw(css::uno::RuntimeException, std::exception) override;
80 virtual OUString SAL_CALL getFilter( ) throw(css::uno::RuntimeException, std::exception) override;
81 virtual css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > SAL_CALL getStructuredFilter( ) throw(css::uno::RuntimeException, std::exception) override;
82 virtual OUString SAL_CALL getOrder( ) throw(css::uno::RuntimeException, std::exception) override;
83 virtual void SAL_CALL appendFilterByColumn( const css::uno::Reference< css::beans::XPropertySet >& column ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
84 virtual void SAL_CALL appendOrderByColumn( const css::uno::Reference< css::beans::XPropertySet >& column, sal_Bool ascending ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
85 virtual void SAL_CALL setFilter( const OUString& filter ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
86 virtual void SAL_CALL setOrder( const OUString& order ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
87 // XTablesSupplier
88 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTables( ) throw(css::uno::RuntimeException, std::exception) override;
89 // XColumnsSupplier
90 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns( ) throw(css::uno::RuntimeException, std::exception) override;
91 // XParametersSupplier
92 virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getParameters( ) throw(css::uno::RuntimeException, std::exception) override;
95 #endif // INCLUDED_DBACCESS_SOURCE_CORE_INC_QUERYCOMPOSER_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */