summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-25 18:38:43 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-25 19:41:19 +0200
commitde0384045c20453a5468715cc364c31f14b2ae3e (patch)
treed8099cbc3a6798028e471257a5a65acf1263cfe0
parentd011153df470bc7bec621fc8de3ef98ad5cd41f6 (diff)
Cleanup XResultSetUpdate in ResultSet / throw exceptions (firebird-sdbc).
Change-Id: Ifc5437f10421ba00c16caa860f9737444a81d891
-rw-r--r--connectivity/source/drivers/firebird/FResultSet.cxx157
-rw-r--r--connectivity/source/drivers/firebird/FResultSet.hxx88
2 files changed, 140 insertions, 105 deletions
diff --git a/connectivity/source/drivers/firebird/FResultSet.cxx b/connectivity/source/drivers/firebird/FResultSet.cxx
index 82619aa37a93..f72d528cf196 100644
--- a/connectivity/source/drivers/firebird/FResultSet.cxx
+++ b/connectivity/source/drivers/firebird/FResultSet.cxx
@@ -688,171 +688,154 @@ void SAL_CALL OResultSet::moveToCurrentRow() throw(SQLException, RuntimeExceptio
{
throwFunctionNotSupportedException("XResultSetUpdate::moveToCurrentRow", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
+// ---- XRowUpdate - UNSUPPORTED ---------------------------------------------
+void SAL_CALL OResultSet::updateNull(sal_Int32 columnIndex)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
+ throwFunctionNotSupportedException("XRowUpdate::updateNull", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateBoolean(sal_Int32 columnIndex, sal_Bool x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateBoolean", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
+
+void SAL_CALL OResultSet::updateByte(sal_Int32 columnIndex, sal_Int8 x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- MutexGuard aGuard(m_pConnection->getMutex());
-
+ throwFunctionNotSupportedException("XRowUpdate::updateByte", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateShort(sal_Int32 columnIndex, sal_Int16 x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateShort", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
+
+void SAL_CALL OResultSet::updateInt(sal_Int32 columnIndex, sal_Int32 x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- MutexGuard aGuard(m_pConnection->getMutex());
-
+ throwFunctionNotSupportedException("XRowUpdate::updateInt", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
+
+void SAL_CALL OResultSet::updateLong(sal_Int32 columnIndex, sal_Int64 x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateLong", *this);
}
-// -----------------------------------------------------------------------
-void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException)
+
+void SAL_CALL OResultSet::updateFloat(sal_Int32 columnIndex, float x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateFloat", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateDouble(sal_Int32 columnIndex, double x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateDouble", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw(SQLException, RuntimeException)
+
+void SAL_CALL OResultSet::updateString(sal_Int32 columnIndex, const OUString& x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateString", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
+
+void SAL_CALL OResultSet::updateBytes(sal_Int32 columnIndex, const Sequence< sal_Int8 >& x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateBytes", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) throw(SQLException, RuntimeException)
+
+void SAL_CALL OResultSet::updateDate(sal_Int32 columnIndex, const Date& x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateDate", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const Time& x ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateTime(sal_Int32 columnIndex, const Time& x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateTime", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const DateTime& x ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateTimestamp(sal_Int32 columnIndex, const DateTime& x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateTimeStamp", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const uno::Reference< XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateBinaryStream(sal_Int32 columnIndex,
+ const uno::Reference< XInputStream >& x,
+ sal_Int32 length)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
(void) length;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateBinaryStream", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const uno::Reference< XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
+
+void SAL_CALL OResultSet::updateCharacterStream(sal_Int32 columnIndex,
+ const uno::Reference< XInputStream >& x,
+ sal_Int32 length)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
(void) length;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateCharacterStream", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException)
-{
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateObject(sal_Int32 columnIndex, const Any& x)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
+ throwFunctionNotSupportedException("XRowUpdate::updateObject", *this);
}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 scale ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateNumericObject(sal_Int32 columnIndex,
+ const Any& x,
+ sal_Int32 scale)
+ throw(SQLException, RuntimeException)
{
(void) columnIndex;
(void) x;
(void) scale;
+ throwFunctionNotSupportedException("XRowUpdate::updateNumericObject", *this);
+}
+// -------------------------------------------------------------------------
+void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException)
+{
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
diff --git a/connectivity/source/drivers/firebird/FResultSet.hxx b/connectivity/source/drivers/firebird/FResultSet.hxx
index bbbd9be549d3..bae203fe09a3 100644
--- a/connectivity/source/drivers/firebird/FResultSet.hxx
+++ b/connectivity/source/drivers/firebird/FResultSet.hxx
@@ -225,24 +225,76 @@ namespace connectivity
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);
- virtual void SAL_CALL updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateFloat( sal_Int32 columnIndex, float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateDouble( sal_Int32 columnIndex, double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateString( sal_Int32 columnIndex, const ::rtl::OUString& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateBytes( sal_Int32 columnIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateBinaryStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateCharacterStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ // XRowUpdate - UNSUPPORTED
+ 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);
+ virtual void SAL_CALL updateByte(sal_Int32 columnIndex,
+ sal_Int8 x)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateShort(sal_Int32 columnIndex,
+ sal_Int16 x)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateInt(sal_Int32 columnIndex,
+ sal_Int32 x)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateLong(sal_Int32 columnIndex,
+ sal_Int64 x )
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateFloat(sal_Int32 columnIndex,
+ float x)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateDouble(sal_Int32 columnIndex,
+ double x )
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateString(sal_Int32 columnIndex,
+ const ::rtl::OUString& x )
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateBytes(sal_Int32 columnIndex,
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& x)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateDate(sal_Int32 columnIndex,
+ const ::com::sun::star::util::Date& x)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateTime(sal_Int32 columnIndex,
+ const ::com::sun::star::util::Time& x)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateTimestamp(sal_Int32 columnIndex,
+ const ::com::sun::star::util::DateTime& x)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateBinaryStream(sal_Int32 columnIndex,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,
+ sal_Int32 length)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateCharacterStream(sal_Int32 columnIndex,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,
+ sal_Int32 length)
+ throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateObject(sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateNumericObject(sal_Int32 columnIndex,
+ const ::com::sun::star::uno::Any& x,
+ sal_Int32 scale )
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+
// XColumnLocate
virtual sal_Int32 SAL_CALL findColumn( const ::rtl::OUString& columnName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// XRowLocate