Tag: cws_src680_dba24d User: fs Date: 2007-11-19 09:48:33+0000 Modified: dba/dbaccess/source/ui/inc/WCopyTable.hxx
Log: #i81658# +ICopyTableSourceObject::getPreparedSelectStatement, to re-use the statement already created by some implementations File Changes: Directory: /dba/dbaccess/source/ui/inc/ ======================================= File [changed]: WCopyTable.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/WCopyTable.hxx?r1=1.22.28.4&r2=1.22.28.5 Delta lines: +25 -2 -------------------- --- WCopyTable.hxx 2007-11-17 21:13:15+0000 1.22.28.4 +++ WCopyTable.hxx 2007-11-19 09:48:30+0000 1.22.28.5 @@ -4,9 +4,9 @@ * * $RCSfile: WCopyTable.hxx,v $ * - * $Revision: 1.22.28.4 $ + * $Revision: 1.22.28.5 $ * - * last change: $Author: fs $ $Date: 2007/11/17 21:13:15 $ + * last change: $Author: fs $ $Date: 2007/11/19 09:48:30 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -144,15 +144,31 @@ class ICopyTableSourceObject { public: + /// retrieves the fully qualified name of the object to copy virtual ::rtl::OUString getQualifiedObjectName() const = 0; + /// determines whether the object is a view virtual bool isView() const = 0; + /** copies the UI settings of the object to the given target object. Might be + ignored by implementations which do not have Ui settings. + */ virtual void copyUISettingsTo( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ) const = 0; + /// retrieves the column names of the to-be-copied object virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > getColumnNames() const = 0; + /// retrieves the names of the primary keys of the to-be-copied object virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > getPrimaryKeyColumnNames() const = 0; + /// creates a OFieldDescription for the given column of the to-be-copied object virtual OFieldDescription* createFieldDescription( const ::rtl::OUString& _rColumnName ) const = 0; + /// returns the SELECT statement which can be used to retrieve the data of the to-be-copied object virtual ::rtl::OUString getSelectStatement() const = 0; + /** returns the prepared statement which can be used to retrieve the data of the to-be-copied object + + The default implementation of this method will simply prepare a statement with the return value + of ->getSelectStatement. + */ + virtual ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XPreparedStatement > + getPreparedSelectStatement() const = 0; virtual ~ICopyTableSourceObject(); }; @@ -185,6 +201,8 @@ getPrimaryKeyColumnNames() const; virtual OFieldDescription* createFieldDescription( const ::rtl::OUString& _rColumnName ) const; virtual ::rtl::OUString getSelectStatement() const; + virtual ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XPreparedStatement > + getPreparedSelectStatement() const; }; // ======================================================== @@ -200,6 +218,7 @@ ::rtl::OUString m_sTableSchema; ::rtl::OUString m_sTableBareName; ::std::map< ::rtl::OUString, OFieldDescription > m_aColumnInfo; + ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XPreparedStatement > m_xStatement; public: NamedTableCopySource( @@ -217,9 +236,13 @@ getPrimaryKeyColumnNames() const; virtual OFieldDescription* createFieldDescription( const ::rtl::OUString& _rColumnName ) const; virtual ::rtl::OUString getSelectStatement() const; + virtual ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XPreparedStatement > + getPreparedSelectStatement() const; private: void impl_ensureColumnInfo_nothrow(); + ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XPreparedStatement > + impl_ensureStatement_throw(); }; // ======================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
