1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <cppuhelper/compbase.hxx>
23 #include <cppuhelper/basemutex.hxx>
24 #include <com/sun/star/sdbc/XConnection.hpp>
25 #include <comphelper/uno3.hxx>
26 #include <connectivity/ConnectionWrapper.hxx>
28 namespace connectivity
32 // OConnectionWeakWrapper - wraps all methods to the real connection from the driver
33 // but when disposed it doesn't dispose the real connection
35 typedef ::cppu::ImplInheritanceHelper
<OConnectionWrapper
, css::sdbc::XConnection
> OConnectionWeakWrapper_BASE
;
37 class OConnectionWeakWrapper
: public OConnectionWeakWrapper_BASE
41 virtual ~OConnectionWeakWrapper() override
;
43 explicit OConnectionWeakWrapper(css::uno::Reference
< css::uno::XAggregation
>& _xConnection
);
46 DECLARE_SERVICE_INFO();
49 virtual css::uno::Reference
< css::sdbc::XStatement
> SAL_CALL
createStatement( ) override
;
50 virtual css::uno::Reference
< css::sdbc::XPreparedStatement
> SAL_CALL
prepareStatement( const OUString
& sql
) override
;
51 virtual css::uno::Reference
< css::sdbc::XPreparedStatement
> SAL_CALL
prepareCall( const OUString
& sql
) override
;
52 virtual OUString SAL_CALL
nativeSQL( const OUString
& sql
) override
;
53 virtual void SAL_CALL
setAutoCommit( sal_Bool autoCommit
) override
;
54 virtual sal_Bool SAL_CALL
getAutoCommit( ) override
;
55 virtual void SAL_CALL
commit( ) override
;
56 virtual void SAL_CALL
rollback( ) override
;
57 virtual sal_Bool SAL_CALL
isClosed( ) override
;
58 virtual css::uno::Reference
< css::sdbc::XDatabaseMetaData
> SAL_CALL
getMetaData( ) override
;
59 virtual void SAL_CALL
setReadOnly( sal_Bool readOnly
) override
;
60 virtual sal_Bool SAL_CALL
isReadOnly( ) override
;
61 virtual void SAL_CALL
setCatalog( const OUString
& catalog
) override
;
62 virtual OUString SAL_CALL
getCatalog( ) override
;
63 virtual void SAL_CALL
setTransactionIsolation( sal_Int32 level
) override
;
64 virtual sal_Int32 SAL_CALL
getTransactionIsolation( ) override
;
65 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getTypeMap( ) override
;
66 virtual void SAL_CALL
setTypeMap( const css::uno::Reference
< css::container::XNameAccess
>& typeMap
) override
;
68 virtual void SAL_CALL
close( ) override
;
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */