LibreOffice Module connectivity (master) 1
ZConnectionWrapper.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#pragma once
21
24#include <com/sun/star/sdbc/XConnection.hpp>
25#include <comphelper/uno3.hxx>
27
28namespace connectivity
29{
30
31
32 // OConnectionWeakWrapper - wraps all methods to the real connection from the driver
33 // but when disposed it doesn't dispose the real connection
34
35 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XConnection > OConnectionWeakWrapper_BASE;
36
39 , public OConnectionWrapper
40 {
41 protected:
42 // OComponentHelper
43 virtual void SAL_CALL disposing() override;
44 virtual ~OConnectionWeakWrapper() override;
45 public:
46 explicit OConnectionWeakWrapper(css::uno::Reference< css::uno::XAggregation >& _xConnection);
47
48 // XServiceInfo
51 DECLARE_XINTERFACE( )
52
53 // XConnection
54 virtual css::uno::Reference< css::sdbc::XStatement > SAL_CALL createStatement( ) override;
55 virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareStatement( const OUString& sql ) override;
56 virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareCall( const OUString& sql ) override;
57 virtual OUString SAL_CALL nativeSQL( const OUString& sql ) override;
58 virtual void SAL_CALL setAutoCommit( sal_Bool autoCommit ) override;
59 virtual sal_Bool SAL_CALL getAutoCommit( ) override;
60 virtual void SAL_CALL commit( ) override;
61 virtual void SAL_CALL rollback( ) override;
62 virtual sal_Bool SAL_CALL isClosed( ) override;
63 virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL getMetaData( ) override;
64 virtual void SAL_CALL setReadOnly( sal_Bool readOnly ) override;
65 virtual sal_Bool SAL_CALL isReadOnly( ) override;
66 virtual void SAL_CALL setCatalog( const OUString& catalog ) override;
67 virtual OUString SAL_CALL getCatalog( ) override;
68 virtual void SAL_CALL setTransactionIsolation( sal_Int32 level ) override;
69 virtual sal_Int32 SAL_CALL getTransactionIsolation( ) override;
70 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTypeMap( ) override;
71 virtual void SAL_CALL setTypeMap( const css::uno::Reference< css::container::XNameAccess >& typeMap ) override;
72 // XCloseable
73 virtual void SAL_CALL close( ) override;
74 };
75}
76
77/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL getMetaData() override
virtual void SAL_CALL setAutoCommit(sal_Bool autoCommit) override
virtual void SAL_CALL setCatalog(const OUString &catalog) override
virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareStatement(const OUString &sql) override
virtual void SAL_CALL close() override
OConnectionWeakWrapper(css::uno::Reference< css::uno::XAggregation > &_xConnection)
virtual sal_Bool SAL_CALL isReadOnly() override
virtual sal_Bool SAL_CALL isClosed() override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL setTypeMap(const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual sal_Int32 SAL_CALL getTransactionIsolation() override
virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareCall(const OUString &sql) override
virtual css::uno::Reference< css::sdbc::XStatement > SAL_CALL createStatement() override
virtual void SAL_CALL setReadOnly(sal_Bool readOnly) override
virtual void SAL_CALL setTransactionIsolation(sal_Int32 level) override
virtual void SAL_CALL commit() override
virtual OUString SAL_CALL nativeSQL(const OUString &sql) override
virtual void SAL_CALL rollback() override
virtual OUString SAL_CALL getCatalog() override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTypeMap() override
virtual sal_Bool SAL_CALL getAutoCommit() override
::cppu::WeakComponentImplHelper< css::sdbc::XConnection > OConnectionWeakWrapper_BASE
unsigned char sal_Bool
#define DECLARE_XTYPEPROVIDER()