1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: BConnection.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _CONNECTIVITY_ADABAS_BCONNECTION_HXX_
31 #define _CONNECTIVITY_ADABAS_BCONNECTION_HXX_
33 #include <cppuhelper/compbase2.hxx>
34 #include "odbc/OConnection.hxx"
35 #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
36 #include <cppuhelper/weakref.hxx>
37 #include <vos/ref.hxx>
39 namespace connectivity
47 typedef connectivity::odbc::OConnection OConnection_BASE2
;
49 // we must use the name "OAdabasConnection" because of a compiler bug
51 class OAdabasConnection
: public OConnection_BASE2
53 ::com::sun::star::uno::WeakReference
< ::com::sun::star::sdbcx::XTablesSupplier
> m_xCatalog
;
56 virtual SQLRETURN
openConnectionWithAuth(const ::rtl::OUString
& aConnectStr
,sal_Int32 nTimeOut
, const ::rtl::OUString
& _uid
,const ::rtl::OUString
& _pwd
);
57 virtual connectivity::odbc::OConnection
* cloneConnection(); // creates a new connection
59 virtual SQLRETURN
Construct( const ::rtl::OUString
& url
,const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& info
) throw(::com::sun::star::sdbc::SQLException
);
61 OAdabasConnection(const SQLHANDLE _pDriverHandle
,connectivity::odbc::ODBCDriver
* _pDriver
);
64 virtual void SAL_CALL
disposing();
66 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbcx::XTablesSupplier
> createCatalog();
67 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDatabaseMetaData
> SAL_CALL
getMetaData( ) throw(::com::sun::star::sdbc::SQLException
, ::com::sun::star::uno::RuntimeException
);
69 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XStatement
> SAL_CALL
createStatement( ) throw(::com::sun::star::sdbc::SQLException
, ::com::sun::star::uno::RuntimeException
);
70 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XPreparedStatement
> SAL_CALL
prepareStatement( const ::rtl::OUString
& sql
) throw(::com::sun::star::sdbc::SQLException
, ::com::sun::star::uno::RuntimeException
);
73 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw (::com::sun::star::uno::RuntimeException
);
74 static ::com::sun::star::uno::Sequence
< sal_Int8
> getUnoTunnelImplementationId();
76 ::vos::ORef
<OSQLColumns
> createSelectColumns(const ::rtl::OUString
& _rSql
);
80 #endif // _CONNECTIVITY_ADABAS_BCONNECTION_HXX_