make dbase bookmnarkable

This commit is contained in:
Ocke Janssen 2000-09-29 14:05:41 +00:00
parent d523e6dbfd
commit ea10f0557a
10 changed files with 388 additions and 60 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: DConnection.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:14:25 $
* last change: $Author: oj $ $Date: 2000-09-29 15:02:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -83,6 +83,9 @@ namespace connectivity
// XConnection
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);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > createCatalog();
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);
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);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareCall( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
};
}
}

View file

@ -0,0 +1,87 @@
/*************************************************************************
*
* $RCSfile: DPreparedStatement.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2000-09-29 15:02:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CONNECTIVITY_DBASE_DPREPAREDSTATEMENT_HXX_
#define _CONNECTIVITY_DBASE_DPREPAREDSTATEMENT_HXX_
#ifndef _CONNECTIVITY_FILE_OPREPAREDSTATEMENT_HXX_
#include "file/FPreparedStatement.hxx"
#endif
namespace connectivity
{
namespace dbase
{
class OConnection;
class ODbasePreparedStatement : public file::OPreparedStatement
{
protected:
virtual file::OResultSet* createResultSet();
public:
// DECLARE_CTY_DEFAULTS(file::OStatement);
ODbasePreparedStatement( file::OConnection* _pConnection,const ::std::vector<connectivity::OTypeInfo>& _TypeInfo) : file::OPreparedStatement( _pConnection,_TypeInfo){}
DECLARE_SERVICE_INFO();
};
}
}
#endif //_CONNECTIVITY_DBASE_DPREPAREDSTATEMENT_HXX_

View file

@ -0,0 +1,126 @@
/*************************************************************************
*
* $RCSfile: DResultSet.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2000-09-29 15:02:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CONNECTIVITY_DBASE_DRESULTSET_HXX_
#define _CONNECTIVITY_DBASE_DRESULTSET_HXX_
#ifndef _CONNECTIVITY_FILE_FRESULTSET_HXX_
#include "file/FResultSet.hxx"
#endif
#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
#include <com/sun/star/sdbcx/XRowLocate.hpp>
#endif
#ifndef _COM_SUN_STAR_SDBCX_XDELETEROWS_HPP_
#include <com/sun/star/sdbcx/XDeleteRows.hpp>
#endif
#ifndef _CPPUHELPER_IMPLBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
#endif
namespace connectivity
{
namespace dbase
{
class ODbaseResultSet;
// these typedef's are only necessary for the compiler
typedef ::cppu::ImplHelper2< ::com::sun::star::sdbcx::XRowLocate,
::com::sun::star::sdbcx::XDeleteRows> ODbaseResultSet_BASE;
typedef file::OResultSet ODbaseResultSet_BASE2;
typedef ::utl::OPropertyArrayUsageHelper<ODbaseResultSet> ODbaseResultSet_BASE3;
class ODbaseResultSet : public ODbaseResultSet_BASE2,
public ODbaseResultSet_BASE,
public ODbaseResultSet_BASE3
{
sal_Bool m_bBookmarkable;
protected:
DECLARE_CTY_PROPERTY(ODbaseResultSet_BASE3,ODbaseResultSet_BASE2);
public:
DECLARE_CTY_DEFAULTS(ODbaseResultSet_BASE2);
DECLARE_SERVICE_INFO();
ODbaseResultSet( file::OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator);
// XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
//XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
// XPropertySet
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException)
{
return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
}
// XRowLocate
virtual ::com::sun::star::uno::Any SAL_CALL getBookmark( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// XDeleteRows
virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
};
}
}
#endif //_CONNECTIVITY_DBASE_DRESULTSET_HXX_

View file

@ -0,0 +1,86 @@
/*************************************************************************
*
* $RCSfile: DStatement.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2000-09-29 15:02:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CONNECTIVITY_DBASE_DSTATEMENT_HXX_
#define _CONNECTIVITY_DBASE_DSTATEMENT_HXX_
#ifndef _CONNECTIVITY_FILE_OSTATEMENT_HXX_
#include "file/FStatement.hxx"
#endif
namespace connectivity
{
namespace dbase
{
class OConnection;
class ODbaseStatement : public file::OStatement
{
protected:
virtual file::OResultSet* createResultSet();
public:
// DECLARE_CTY_DEFAULTS(file::OStatement);
ODbaseStatement( file::OConnection* _pConnection) : file::OStatement( _pConnection){}
DECLARE_SERVICE_INFO();
};
}
}
#endif //_CONNECTIVITY_DBASE_DSTATEMENT_HXX_

View file

@ -2,9 +2,9 @@
*
* $RCSfile: DTable.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: oj $ $Date: 2000-09-20 06:51:20 $
* last change: $Author: oj $ $Date: 2000-09-29 15:02:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -181,7 +181,7 @@ namespace connectivity
BOOL CreateImpl();
String getEntry();
virtual BOOL InsertRow(file::ORefAssignValues& rRow, BOOL bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
virtual BOOL InsertRow(file::OValueVector& rRow, BOOL bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
virtual BOOL DeleteRow(const OSQLColumns& _rCols);
virtual BOOL UpdateRow(file::OValueVector& rRow, file::OValueRow pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
};

View file

@ -2,9 +2,9 @@
*
* $RCSfile: FConnection.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: oj $ $Date: 2000-09-20 06:51:34 $
* last change: $Author: oj $ $Date: 2000-09-29 15:05:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -139,22 +139,22 @@ namespace connectivity
// for each row returned by
// DatabaseMetaData.getTypeInfo.
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbcx::XTablesSupplier> m_xCatalog;
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbcx::XTablesSupplier> m_xCatalog;
::com::sun::star::sdbc::SQLWarning m_aLastWarning; // Last SQLWarning generated by
connectivity::OWeakRefArray m_aStatements; // vector containing a list
// of all the Statement objects
// for this Connection
::com::sun::star::sdbc::SQLWarning m_aLastWarning; // Last SQLWarning generated by
// an operation
String m_aURL; // URL of connection
// String m_aDirectoryName;
String m_aFilenameExtension;
OFileDriver* m_pDriver; // Pointer to the owning
// driver object
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XDynamicResultSet > m_xDir;
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent> m_xContent;
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XDynamicResultSet > m_xDir; // directory
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent> m_xContent;
rtl_TextEncoding m_nTextEncoding;
sal_Bool m_bClosed;
sal_Bool m_bAutoCommit;
sal_Bool m_bReadOnly;
@ -209,7 +209,8 @@ namespace connectivity
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > createCatalog();
String getExtension() const { return m_aFilenameExtension;}
OFileDriver* getDriver() const { return m_pDriver; }
OFileDriver* getDriver() const { return m_pDriver; }
rtl_TextEncoding getTextEncoding() const { return m_nTextEncoding; }
};
}

View file

@ -2,9 +2,9 @@
*
* $RCSfile: FPreparedStatement.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:14:26 $
* last change: $Author: oj $ $Date: 2000-09-29 15:05:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -92,10 +92,10 @@ namespace connectivity
{
class OPreparedStatement : public OStatement_BASE2,
public ::com::sun::star::sdbc::XPreparedStatement,
public ::com::sun::star::sdbc::XParameters,
public ::com::sun::star::sdbc::XResultSetMetaDataSupplier,
public ::com::sun::star::lang::XServiceInfo
public ::com::sun::star::sdbc::XPreparedStatement,
public ::com::sun::star::sdbc::XParameters,
public ::com::sun::star::sdbc::XResultSetMetaDataSupplier,
public ::com::sun::star::lang::XServiceInfo
{
protected:
@ -105,9 +105,13 @@ namespace connectivity
::rtl::OUString m_aSql;
OValueRow m_aRow;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData> m_xMetaData;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > m_xRS; // only to enshure that the result isn't deleted
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData> m_xMetaData;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > m_xRS; // only to enshure that the result isn't deleted
OResultSet* m_pResultSet;
OFileTable* m_pTable;
// factory method for resultset's
virtual OResultSet* createResultSet();
public:
DECLARE_CTY_DEFAULTS(OStatement_BASE2);
@ -115,12 +119,14 @@ namespace connectivity
// ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
OPreparedStatement( OConnection* _pConnection,const ::std::vector<connectivity::OTypeInfo>& _TypeInfo);
void construct(const ::rtl::OUString& sql) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
void construct(const ::rtl::OUString& sql) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// OComponentHelper
virtual void SAL_CALL disposing(void);
//XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
//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< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
// XPreparedStatement
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL executeQuery( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);

View file

@ -2,9 +2,9 @@
*
* $RCSfile: FResultSet.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:14:26 $
* last change: $Author: oj $ $Date: 2000-09-29 15:05:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -245,17 +245,21 @@ OFILEKeyCompare(const void * elem1, const void * elem2);
public ::utl::OPropertyArrayUsageHelper<OResultSet>
{
protected:
::std::vector<void*> m_aBindVector;
::std::vector<sal_Int32> m_aColMapping; // pos 0 is unused so we don't have to decrement 1 everytime
OValueRow m_aRow;
OValueRow m_aEvaluateRow; // contains all values of a row
OValueRow m_aParameterRow;
OValueRow m_aInsertRow; // needed for insert by cursor
ORefAssignValues m_aAssignValues; // needed for insert,update and parameters
// to compare with the restrictions
::std::vector<sal_Int32>* m_pEvaluationKeySet;
::std::vector<sal_Int32>::iterator m_aEvaluateIter;
::std::map<sal_Int32,sal_Int32> m_aBookmarkToPos;
OKeySet* m_pFileSet;
OKeySet::iterator m_aFileSetIter;
@ -278,7 +282,7 @@ OFILEKeyCompare(const void * elem1, const void * elem2);
::com::sun::star::uno::WeakReferenceHelper m_aStatement;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData> m_xMetaData;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> m_xDBMetaData;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> m_xDBMetaData;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xColNames; // table columns
::rtl::OUString m_aTableRange;
@ -291,10 +295,14 @@ OFILEKeyCompare(const void * elem1, const void * elem2);
sal_Bool m_bEOF; // after last record
sal_Bool m_bLastRecord;
sal_Bool m_bFileSetFrozen;
sal_Bool m_bInserted; // true when moveToInsertRow was called
// set to false when cursor moved or cancel
sal_Bool m_bRowUpdated;
sal_Bool m_bRowInserted;
sal_Bool m_bRowDeleted;
void construct();
sal_Bool evaluate();
BOOL Move(OFileTable::FilePosition eCursorPosition, INT32 nOffset, BOOL bRetrieveData);
BOOL ExecuteRow(OFileTable::FilePosition eFirstCursorPosition,
INT32 nOffset = 1,
BOOL bRebind = TRUE,
@ -319,6 +327,10 @@ OFILEKeyCompare(const void * elem1, const void * elem2);
void scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes);
protected:
using OResultSet_BASE::rBHelper;
BOOL Move(OFileTable::FilePosition eCursorPosition, INT32 nOffset, BOOL bRetrieveData);
BOOL SkipDeleted(OFileTable::FilePosition eCursorPosition, INT32 nOffset, BOOL bRetrieveData);
// OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
// OPropertySetHelper

View file

@ -2,9 +2,9 @@
*
* $RCSfile: FStatement.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:14:26 $
* last change: $Author: oj $ $Date: 2000-09-29 15:05:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -115,10 +115,11 @@ namespace connectivity
{
namespace file
{
typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::sdbc::XStatement,
::com::sun::star::sdbc::XWarningsSupplier,
::com::sun::star::util::XCancellable,
::com::sun::star::sdbc::XCloseable> OStatement_BASE;
class OResultSet;
typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::sdbc::XStatement,
::com::sun::star::sdbc::XWarningsSupplier,
::com::sun::star::util::XCancellable,
::com::sun::star::sdbc::XCloseable> OStatement_BASE;
//**************************************************************
//************ Class: java.sql.Statement
@ -129,8 +130,8 @@ namespace connectivity
public ::utl::OPropertyArrayUsageHelper<OStatement_Base>
{
::com::sun::star::sdbc::SQLWarning m_aLastWarning;
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XResultSet> m_xResultSet; // The last ResultSet created
::com::sun::star::sdbc::SQLWarning m_aLastWarning;
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XResultSet> m_xResultSet; // The last ResultSet created
// for this Statement
protected:
@ -152,13 +153,15 @@ namespace connectivity
sal_Bool m_bEscapeProcessing;
protected:
void reset () throw( ::com::sun::star::sdbc::SQLException);
void clearMyResultSet () throw( ::com::sun::star::sdbc::SQLException);
void setWarning (const ::com::sun::star::sdbc::SQLWarning &ex) throw( ::com::sun::star::sdbc::SQLException);
void reset () throw( ::com::sun::star::sdbc::SQLException);
void clearMyResultSet () throw( ::com::sun::star::sdbc::SQLException);
void setWarning (const ::com::sun::star::sdbc::SQLWarning &ex) throw( ::com::sun::star::sdbc::SQLException);
sal_Int32 getPrecision ( sal_Int32 sqlType);
void disposeResultSet();
// factory method for resultset's
virtual OResultSet* createResultSet() = 0;
// OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
// OPropertySetHelper
@ -174,33 +177,33 @@ namespace connectivity
// OComponentHelper
virtual void SAL_CALL disposing(void){OStatement_BASE::disposing();}
// XInterface
// virtual void SAL_CALL release() throw(::com::sun::star::uno::RuntimeException) = 0;
// virtual void SAL_CALL release() throw(::com::sun::star::uno::RuntimeException) = 0;
// XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
//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< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
// XPropertySet
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException)
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException)
{
return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
}
// XStatement
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL executeQuery( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) ;
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) ;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL executeQuery( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) ;
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) ;
// XWarningsSupplier
virtual ::com::sun::star::uno::Any SAL_CALL getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// XCancellable
virtual void SAL_CALL cancel( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL cancel( ) throw(::com::sun::star::uno::RuntimeException);
// XCloseable
virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
};
class OStatement_BASE2 : public OStatement_Base,
public connectivity::OSubComponent< OStatement_BASE2>
class OStatement_BASE2 : public OStatement_Base,
public connectivity::OSubComponent< OStatement_BASE2>
{
friend class connectivity::OSubComponent< OStatement_BASE2>;
@ -210,19 +213,22 @@ namespace connectivity
// OComponentHelper
virtual void SAL_CALL disposing(void);
// XInterface
virtual void SAL_CALL release() throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL release() throw(::com::sun::star::uno::RuntimeException);
};
class OStatement : public OStatement_BASE2,
public ::com::sun::star::lang::XServiceInfo
public ::com::sun::star::lang::XServiceInfo
{
protected:
// factory method for resultset's
virtual OResultSet* createResultSet();
public:
DECLARE_CTY_DEFAULTS(OStatement_BASE2);
// ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
OStatement( OConnection* _pConnection) : OStatement_BASE2( _pConnection){}
DECLARE_SERVICE_INFO();
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
{
return OStatement_BASE2::queryInterface( rType);
}

View file

@ -2,9 +2,9 @@
*
* $RCSfile: FTable.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:14:26 $
* last change: $Author: oj $ $Date: 2000-09-29 15:05:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -138,7 +138,7 @@ namespace connectivity
virtual sal_Bool fetchRow(OValueRow _rRow,const OSQLColumns& _rCols, sal_Bool bRetrieveData) = 0;
::vos::ORef<OSQLColumns> getTableColumns() const {return m_aColumns;}
virtual BOOL InsertRow(ORefAssignValues& rRow, BOOL bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols)
virtual BOOL InsertRow(OValueVector& rRow, BOOL bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols)
{
return sal_False;
}
@ -153,6 +153,7 @@ namespace connectivity
const ::rtl::OUString& getName() const { return m_Name; }
const ::rtl::OUString& getSchema() const { return m_SchemaName; }
sal_Bool isReadOnly() const { return m_aFileStream.IsOpen() && (m_aFileStream.GetStreamMode() & STREAM_READWRITE) != STREAM_READWRITE; }
// com::sun::star::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();