User: vg Date: 2007/01/15 06:31:43 Modified: dba/dbaccess/source/core/inc/statement.hxx
Log: INTEGRATION: CWS dba22b (1.7.106); FILE MERGED 2006/12/13 10:39:08 fs 1.7.106.1: #i69460# statement should translate the SQL to SDBC level, if possible File Changes: Directory: /dba/dbaccess/source/core/inc/ ========================================= File [changed]: statement.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/inc/statement.hxx?r1=1.7&r2=1.8 Delta lines: +30 -13 --------------------- --- statement.hxx 20 Jun 2006 02:47:16 -0000 1.7 +++ statement.hxx 15 Jan 2007 14:31:40 -0000 1.8 @@ -62,6 +62,9 @@ #ifndef _COM_SUN_STAR_SDBC_XGENERATEDRESULTSET_HPP_ #include <com/sun/star/sdbc/XGeneratedResultSet.hpp> #endif +#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_ +#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> +#endif #ifndef _CPPUHELPER_PROPSHLP_HXX #include <cppuhelper/propshlp.hxx> #endif @@ -74,6 +77,10 @@ #ifndef _COMPHELPER_BROADCASTHELPER_HXX_ #include <comphelper/broadcasthelper.hxx> #endif +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif + //************************************************************ // OStatementBase //************************************************************ @@ -168,23 +175,23 @@ //************************************************************ // OStatement //************************************************************ -class OStatement : public OStatementBase, - public ::com::sun::star::sdbc::XStatement, - public ::com::sun::star::lang::XServiceInfo +typedef ::cppu::ImplHelper2 < ::com::sun::star::sdbc::XStatement + , ::com::sun::star::lang::XServiceInfo + > OStatement_IFACE; +class OStatement :public OStatementBase + ,public OStatement_IFACE { +private: + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement > m_xAggregateStatement; + ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > m_xComposer; + bool m_bAttemptedComposerCreation; + public: OStatement(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > & _xConn, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & _xStatement) - :OStatementBase(_xConn, _xStatement) {} - -// ::com::sun::star::lang::XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & _xStatement); -// ::com::sun::star::uno::XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( 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(); + DECLARE_XINTERFACE(); + DECLARE_XTYPEPROVIDER(); // ::com::sun::star::lang::XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); @@ -196,6 +203,16 @@ virtual sal_Int32 SAL_CALL executeUpdate( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL execute( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getConnection( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + + // OComponentHelper + virtual void SAL_CALL disposing(); + +private: + /** does escape processing for the given SQL command, if the our EscapeProcessing + property allows so. + */ + ::rtl::OUString impl_doEscapeProcessing_nothrow( const ::rtl::OUString& _rSQL ) const; + bool impl_ensureComposer_nothrow() const; }; #endif // _DBA_COREAPI_STATEMENT_HXX_ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
