summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-25 18:22:55 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-25 19:41:19 +0200
commitd011153df470bc7bec621fc8de3ef98ad5cd41f6 (patch)
tree1714aec169ddace620903b6fc3e68afdba03038f
parent5d1245b89c18691eb80b3037cc816a422bb39316 (diff)
FunctionNotSupported exceptions for XResultSetUpdate. (firebird-sdbc)
Change-Id: Ie24ba7eeb8d638433fe6b27d74d70121472347c5
-rw-r--r--connectivity/source/drivers/firebird/FResultSet.cxx49
-rw-r--r--connectivity/source/drivers/firebird/FResultSet.hxx28
2 files changed, 38 insertions, 39 deletions
diff --git a/connectivity/source/drivers/firebird/FResultSet.cxx b/connectivity/source/drivers/firebird/FResultSet.cxx
index 4e0fb53396c2..82619aa37a93 100644
--- a/connectivity/source/drivers/firebird/FResultSet.cxx
+++ b/connectivity/source/drivers/firebird/FResultSet.cxx
@@ -40,6 +40,7 @@
#include <propertyids.hxx>
#include <TConnection.hxx>
+#include <connectivity/dbexception.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <rtl/string.hxx>
@@ -54,6 +55,7 @@ using namespace ::comphelper;
using namespace ::connectivity;
using namespace ::connectivity::firebird;
using namespace ::cppu;
+using namespace ::dbtools;
using namespace ::osl;
using namespace ::rtl;
@@ -656,52 +658,35 @@ Any SAL_CALL OResultSet::getWarnings( ) throw(SQLException, RuntimeException)
{
return Any();
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException)
+// ---- XResultSetUpdate - UNSUPPORTED ---------------------------------------
+void SAL_CALL OResultSet::insertRow() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- // you only have to implement this if you want to insert new rows
+ throwFunctionNotSupportedException("XResultSetUpdate::insertRow", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException)
-{
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- // only when you allow updates
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::deleteRow( ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateRow() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
+ throwFunctionNotSupportedException("XResultSetUpdate::updateRow", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::deleteRow() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
+ throwFunctionNotSupportedException("XResultSetUpdate::deleteRow", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::cancelRowUpdates() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XResultSetUpdate::cancelRowUpdates", *this);
+}
- // only when you allow insert's
+void SAL_CALL OResultSet::moveToInsertRow() throw(SQLException, RuntimeException)
+{
+ throwFunctionNotSupportedException("XResultSetUpdate::moveToInsertRow", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::moveToCurrentRow() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
+ throwFunctionNotSupportedException("XResultSetUpdate::moveToCurrentRow", *this);
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/firebird/FResultSet.hxx b/connectivity/source/drivers/firebird/FResultSet.hxx
index 894eaffe3c2e..bbbd9be549d3 100644
--- a/connectivity/source/drivers/firebird/FResultSet.hxx
+++ b/connectivity/source/drivers/firebird/FResultSet.hxx
@@ -204,13 +204,27 @@ namespace connectivity
// 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);
- // XResultSetUpdate
- virtual void SAL_CALL insertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL deleteRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL cancelRowUpdates( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL moveToInsertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL moveToCurrentRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // XResultSetUpdate - UNSUPPORTED
+ virtual void SAL_CALL insertRow()
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateRow()
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL deleteRow()
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL cancelRowUpdates()
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL moveToInsertRow()
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL moveToCurrentRow()
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+
// XRowUpdate
virtual void SAL_CALL updateNull( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);