Tag: cws_src680_kaddrbook User: ebischoff Date: 05/08/31 07:31:15 Modified: /dba/connectivity/source/drivers/kab/ KPreparedStatement.cxx, KPreparedStatement.hxx, KStatement.cxx, KStatement.hxx
Log: Continuing with code review File Changes: Directory: /dba/connectivity/source/drivers/kab/ ================================================ File [changed]: KPreparedStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KPreparedStatement.cxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +0 -0 ------------------- --- KPreparedStatement.cxx 29 Aug 2005 08:43:51 -0000 1.1.2.1 +++ KPreparedStatement.cxx 31 Aug 2005 14:31:07 -0000 1.1.2.2 @@ -2,9 +2,9 @@ * * $RCSfile: KPreparedStatement.cxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: ebischoff $ $Date: 2005/08/29 08:43:51 $ + * last change: $Author: ebischoff $ $Date: 2005/08/31 14:31:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses File [changed]: KPreparedStatement.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KPreparedStatement.hxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +3 -7 ------------------- --- KPreparedStatement.hxx 29 Aug 2005 08:43:51 -0000 1.1.2.1 +++ KPreparedStatement.hxx 31 Aug 2005 14:31:08 -0000 1.1.2.2 @@ -2,9 +2,9 @@ * * $RCSfile: KPreparedStatement.hxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: ebischoff $ $Date: 2005/08/29 08:43:51 $ + * last change: $Author: ebischoff $ $Date: 2005/08/31 14:31:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -72,9 +72,6 @@ #ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_ #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp> #endif -#ifndef _COM_SUN_STAR_SDBC_XPREPAREDBATCHEXECUTION_HPP_ -#include <com/sun/star/sdbc/XPreparedBatchExecution.hpp> -#endif namespace connectivity { @@ -82,9 +79,8 @@ { class OBoundParam; - typedef ::cppu::ImplHelper5< ::com::sun::star::sdbc::XPreparedStatement, + typedef ::cppu::ImplHelper4< ::com::sun::star::sdbc::XPreparedStatement, ::com::sun::star::sdbc::XParameters, - ::com::sun::star::sdbc::XPreparedBatchExecution, ::com::sun::star::sdbc::XResultSetMetaDataSupplier, ::com::sun::star::lang::XServiceInfo> KabPreparedStatement_BASE; File [changed]: KStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KStatement.cxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +3 -53 -------------------- --- KStatement.cxx 29 Aug 2005 08:43:53 -0000 1.1.2.1 +++ KStatement.cxx 31 Aug 2005 14:31:09 -0000 1.1.2.2 @@ -2,9 +2,9 @@ * * $RCSfile: KStatement.cxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: ebischoff $ $Date: 2005/08/29 08:43:53 $ + * last change: $Author: ebischoff $ $Date: 2005/08/31 14:31:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -349,11 +349,6 @@ dispose(); } // ------------------------------------------------------------------------- -void SAL_CALL KabStatement::clearBatch( ) throw(SQLException, RuntimeException) -{ - // if you support batches clear it here -} -// ------------------------------------------------------------------------- sal_Bool SAL_CALL KabStatement_Base::execute( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException) { @@ -417,34 +412,10 @@ // just return our connection here return (Reference< XConnection >) m_pConnection; } -// ----------------------------------------------------------------------------- -sal_Int32 SAL_CALL KabStatement_Base::getUpdateCount( ) throw(SQLException, RuntimeException) -{ - return 0; -} // ------------------------------------------------------------------------- Any SAL_CALL KabStatement::queryInterface( const Type & rType ) throw(RuntimeException) { - Any aRet = ::cppu::queryInterface(rType,static_cast< XBatchExecution*> (this)); - if (!aRet.hasValue()) - aRet = KabStatement_Base::queryInterface(rType); - return aRet; -} -// ------------------------------------------------------------------------- -void SAL_CALL KabStatement::addBatch( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException) -{ - ::osl::MutexGuard aGuard( m_aMutex ); - checkDisposed(KabStatement_BASE::rBHelper.bDisposed); - - m_aBatchList.push_back(sql); -} -// ------------------------------------------------------------------------- -Sequence< sal_Int32 > SAL_CALL KabStatement::executeBatch( ) throw(SQLException, RuntimeException) -{ - ::osl::MutexGuard aGuard( m_aMutex ); - checkDisposed(KabStatement_BASE::rBHelper.bDisposed); - - return Sequence< sal_Int32 >(); + return KabStatement_Base::queryInterface(rType); } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL KabStatement_Base::executeUpdate( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException) @@ -456,31 +427,11 @@ return 0; } // ------------------------------------------------------------------------- - -Reference< XResultSet > SAL_CALL KabStatement_Base::getResultSet( ) throw(SQLException, RuntimeException) -{ - ::osl::MutexGuard aGuard( m_aMutex ); - checkDisposed(KabStatement_BASE::rBHelper.bDisposed); - - // return our saved result set - return m_xResultSet; -} -// ------------------------------------------------------------------------- -sal_Bool SAL_CALL KabStatement_Base::getMoreResults( ) throw(SQLException, RuntimeException) -{ - ::osl::MutexGuard aGuard( m_aMutex ); - checkDisposed(KabStatement_BASE::rBHelper.bDisposed); - - // this driver handles no more than one result set - return sal_False; -} -// ------------------------------------------------------------------------- Any SAL_CALL KabStatement_Base::getWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabStatement_BASE::rBHelper.bDisposed); - return makeAny(m_aLastWarning); } // ------------------------------------------------------------------------- @@ -488,7 +439,6 @@ { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabStatement_BASE::rBHelper.bDisposed); - m_aLastWarning = SQLWarning(); } File [changed]: KStatement.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KStatement.hxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +6 -30 -------------------- --- KStatement.hxx 29 Aug 2005 08:43:54 -0000 1.1.2.1 +++ KStatement.hxx 31 Aug 2005 14:31:09 -0000 1.1.2.2 @@ -2,9 +2,9 @@ * * $RCSfile: KStatement.hxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: ebischoff $ $Date: 2005/08/29 08:43:54 $ + * last change: $Author: ebischoff $ $Date: 2005/08/31 14:31:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,17 +76,11 @@ #ifndef _COM_SUN_STAR_SDBC_XSTATEMENT_HPP_ #include <com/sun/star/sdbc/XStatement.hpp> #endif -#ifndef _COM_SUN_STAR_SDBC_XMULTIPLERESULTS_HPP_ -#include <com/sun/star/sdbc/XMultipleResults.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XBATCHEXECUTION_HPP_ -#include <com/sun/star/sdbc/XBatchExecution.hpp> -#endif #ifndef _COM_SUN_STAR_UTIL_XCANCELLABLE_HPP_ #include <com/sun/star/util/XCancellable.hpp> #endif -#ifndef _CPPUHELPER_COMPBASE5_HXX_ -#include <cppuhelper/compbase5.hxx> +#ifndef _CPPUHELPER_COMPBASE4_HXX_ +#include <cppuhelper/compbase4.hxx> #endif #ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_ #include <comphelper/proparrhlp.hxx> @@ -97,11 +91,10 @@ namespace kab { - typedef ::cppu::WeakComponentImplHelper5< ::com::sun::star::sdbc::XStatement, + typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::sdbc::XStatement, ::com::sun::star::sdbc::XWarningsSupplier, ::com::sun::star::util::XCancellable, - ::com::sun::star::sdbc::XCloseable, - ::com::sun::star::sdbc::XMultipleResults> KabStatement_BASE; + ::com::sun::star::sdbc::XCloseable> KabStatement_BASE; //************************************************************** // Class KabStatement_Base @@ -198,14 +191,6 @@ virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - // XMultipleResults - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getResultSet( - ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getUpdateCount( - ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL getMoreResults( - ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - // other methods inline KabConnection* getOwnConnection() const { return m_pConnection; } }; @@ -230,7 +215,6 @@ }; class KabStatement : public KabStatement_BASE2, - public ::com::sun::star::sdbc::XBatchExecution, public ::com::sun::star::lang::XServiceInfo { protected: @@ -244,14 +228,6 @@ const ::com::sun::star::uno::Type& rType) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL acquire() throw(); virtual void SAL_CALL release() throw(); - - // XBatchExecution - virtual void SAL_CALL addBatch( - const ::rtl::OUString& sql) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL clearBatch( - ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL executeBatch( - ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); }; } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
