Clean up naming of OStatement_Base etc. (firebird-sdbc)

Change-Id: I4cb81565ae2fa6efd434e6e789f16fab90d0ae4a
This commit is contained in:
Andrzej J.R. Hunt 2013-07-23 19:04:33 +02:00
parent ed9dac3baf
commit cacb32caab
7 changed files with 123 additions and 101 deletions

View File

@ -70,7 +70,7 @@ namespace connectivity
::com::sun::star::document::XDocumentEventListener
> OConnection_BASE;
class OStatement_Base;
class OStatementCommonBase;
class FirebirdDriver;
class ODatabaseMetaData;

View File

@ -72,7 +72,7 @@ IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbcx.firebird.PreparedS
OPreparedStatement::OPreparedStatement( OConnection* _pConnection,
const TTypeInfoVector& _TypeInfo,
const OUString& sql)
:OStatement_Base(_pConnection)
:OStatementCommonBase(_pConnection)
,m_aTypeInfo(_TypeInfo)
,m_sSqlStatement(sql)
,m_statementHandle(0)
@ -87,7 +87,7 @@ void OPreparedStatement::ensurePrepared()
throw (SQLException)
{
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
if (m_statementHandle)
return;
@ -161,34 +161,35 @@ OPreparedStatement::~OPreparedStatement()
void SAL_CALL OPreparedStatement::acquire() throw()
{
OStatement_Base::acquire();
OStatementCommonBase::acquire();
}
void SAL_CALL OPreparedStatement::release() throw()
{
OStatement_Base::release();
OStatementCommonBase::release();
}
Any SAL_CALL OPreparedStatement::queryInterface(const Type& rType)
throw(RuntimeException)
{
Any aRet = OStatement_Base::queryInterface(rType);
Any aRet = OStatementCommonBase::queryInterface(rType);
if(!aRet.hasValue())
aRet = OPreparedStatement_BASE::queryInterface(rType);
aRet = OPreparedStatement_Base::queryInterface(rType);
return aRet;
}
uno::Sequence< Type > SAL_CALL OPreparedStatement::getTypes()
throw(RuntimeException)
{
return OPreparedStatement_BASE::getTypes();
return concatSequences(OPreparedStatement_Base::getTypes(),
OStatementCommonBase::getTypes());
}
Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData()
throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
// TODO: implement
// if(!m_xMetaData.is())
@ -202,21 +203,21 @@ void SAL_CALL OPreparedStatement::close() throw(SQLException, RuntimeException)
SAL_INFO("connectivity.firebird", "close()");
MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
if (m_statementHandle)
{
// TODO: implement
}
OStatement_Base::close();
OStatementCommonBase::close();
}
sal_Bool SAL_CALL OPreparedStatement::execute()
throw(SQLException, RuntimeException)
{
MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
// TODO: implement
return sal_False;
@ -226,7 +227,7 @@ sal_Int32 SAL_CALL OPreparedStatement::executeUpdate()
throw(SQLException, RuntimeException)
{
MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
// TODO: implement
return 0;
@ -241,7 +242,7 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex,
"x: " << x);
MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
ensurePrepared();
checkParameterIndex(nParameterIndex);
@ -277,7 +278,7 @@ Reference< XConnection > SAL_CALL OPreparedStatement::getConnection()
throw(SQLException, RuntimeException)
{
MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
return Reference< XConnection >(m_pConnection);
}
@ -289,7 +290,7 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery()
"Got called with sql: " << m_sSqlStatement);
MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
ensurePrepared();
ISC_STATUS aErr;
@ -322,7 +323,7 @@ void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -331,7 +332,7 @@ void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
@ -342,7 +343,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date&
(void) parameterIndex;
(void) aData;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -353,7 +354,7 @@ void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time&
(void) parameterIndex;
(void) aVal;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -363,7 +364,7 @@ void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const
(void) parameterIndex;
(void) aVal;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -373,7 +374,7 @@ void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
@ -384,7 +385,7 @@ void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x )
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -394,7 +395,7 @@ void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -404,7 +405,7 @@ void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 a
(void) parameterIndex;
(void) aVal;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -414,7 +415,7 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s
(void) parameterIndex;
(void) sqlType;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -424,7 +425,7 @@ void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Refer
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -434,7 +435,7 @@ void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Refer
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -444,7 +445,7 @@ void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Refe
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -454,7 +455,7 @@ void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Refere
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -465,7 +466,7 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c
(void) x;
(void) sqlType;
(void) scale;
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
}
@ -477,7 +478,7 @@ void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_I
(void) sqlType;
(void) typeName;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -487,7 +488,7 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -497,7 +498,7 @@ void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -507,7 +508,7 @@ void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequ
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -519,7 +520,7 @@ void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex,
(void) x;
(void) length;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -530,7 +531,7 @@ void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, con
(void) x;
(void) length;
::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@ -567,7 +568,7 @@ void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons
case PROPERTY_ID_USEBOOKMARKS:
break;
default:
OStatement_Base::setFastPropertyValue_NoBroadcast(nHandle,rValue);
OStatementCommonBase::setFastPropertyValue_NoBroadcast(nHandle,rValue);
}
}

View File

@ -58,10 +58,10 @@ namespace connectivity
::com::sun::star::sdbc::XParameters,
::com::sun::star::sdbc::XPreparedBatchExecution,
::com::sun::star::sdbc::XResultSetMetaDataSupplier,
::com::sun::star::lang::XServiceInfo> OPreparedStatement_BASE;
::com::sun::star::lang::XServiceInfo> OPreparedStatement_Base;
class OPreparedStatement : public OStatement_Base,
public OPreparedStatement_BASE
class OPreparedStatement : public OStatementCommonBase,
public OPreparedStatement_Base
{
protected:
struct Parameter

View File

@ -38,6 +38,7 @@
#include "FResultSet.hxx"
#include "Util.hxx"
#include <comphelper/sequence.hxx>
#include <osl/diagnose.h>
#include <osl/thread.h>
#include <rtl/ustrbuf.hxx>
@ -84,20 +85,12 @@ IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbcx.OStatement","com.sun.star.
void SAL_CALL OStatement::acquire() throw()
{
OStatement_Base::acquire();
OStatementCommonBase::acquire();
}
void SAL_CALL OStatement::release() throw()
{
OStatement_Base::release();
}
Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeException)
{
Any aRet = ::cppu::queryInterface(rType,static_cast< XBatchExecution*> (this));
if(!aRet.hasValue())
aRet = OStatement_Base::queryInterface(rType);
return aRet;
OStatementCommonBase::release();
}
// ---- XStatement -----------------------------------------------------------
@ -106,7 +99,7 @@ sal_Int32 SAL_CALL OStatement::executeUpdate(const OUString& sqlIn)
{
// TODO: close ResultSet if existing -- so so in all 3 execute methods.
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
const OUString sql = sanitizeSqlString(sqlIn);
@ -132,7 +125,7 @@ uno::Reference< XResultSet > SAL_CALL OStatement::executeQuery(const OUString& s
throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
const OUString sql = sanitizeSqlString(sqlIn);
@ -179,7 +172,7 @@ sal_Bool SAL_CALL OStatement::execute(const OUString& sqlIn)
"Got called with sql: " << sqlIn);
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
XSQLDA* pOutSqlda = 0;
isc_stmt_handle aStatementHandle = 0;
@ -216,8 +209,26 @@ uno::Reference< XConnection > SAL_CALL OStatement::getConnection()
throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
return (uno::Reference< XConnection >)m_pConnection;
}
Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeException)
{
Any aRet = OStatement_Base::queryInterface(rType);
if(!aRet.hasValue())
aRet = ::cppu::queryInterface(rType,static_cast< XBatchExecution*> (this));
if(!aRet.hasValue())
aRet = OStatementCommonBase::queryInterface(rType);
return aRet;
}
uno::Sequence< Type > SAL_CALL OStatement::getTypes()
throw(RuntimeException)
{
return concatSequences(OStatement_Base::getTypes(),
OStatementCommonBase::getTypes());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -49,10 +49,10 @@ namespace connectivity
// once the general restructuring of Statement/PreparedStatement is
// complete.
typedef ::cppu::ImplHelper1< ::com::sun::star::sdbc::XStatement >
OStatementStatement_BASE;
OStatement_Base;
class OStatement : public OStatement_Base,
public OStatementStatement_BASE,
class OStatement : public OStatementCommonBase,
public OStatement_Base,
public ::com::sun::star::sdbc::XBatchExecution,
public ::com::sun::star::lang::XServiceInfo
{
@ -61,12 +61,11 @@ namespace connectivity
public:
// a constructor, which is required for returning objects:
OStatement( OConnection* _pConnection)
: OStatement_Base( _pConnection)
: OStatementCommonBase( _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 void SAL_CALL acquire() throw();
virtual void SAL_CALL release() throw();
@ -87,6 +86,17 @@ namespace connectivity
virtual void SAL_CALL addBatch( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL clearBatch( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL executeBatch( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// 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);
};
}
}

View File

@ -59,20 +59,20 @@ using namespace ::osl;
using namespace ::rtl;
using namespace ::std;
OStatement_Base::OStatement_Base(OConnection* _pConnection)
: OStatement_BASE(_pConnection->getMutex()),
OPropertySetHelper(OStatement_BASE::rBHelper),
OStatementCommonBase::OStatementCommonBase(OConnection* _pConnection)
: OStatementCommonBase_Base(_pConnection->getMutex()),
OPropertySetHelper(OStatementCommonBase_Base::rBHelper),
m_pConnection(_pConnection),
rBHelper(OStatement_BASE::rBHelper)
rBHelper(OStatementCommonBase_Base::rBHelper)
{
m_pConnection->acquire();
}
OStatement_Base::~OStatement_Base()
OStatementCommonBase::~OStatementCommonBase()
{
}
void OStatement_Base::disposeResultSet()
void OStatementCommonBase::disposeResultSet()
{
//free the cursor if alive
// uno::Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
@ -82,47 +82,47 @@ void OStatement_Base::disposeResultSet()
}
//-----------------------------------------------------------------------------
Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(RuntimeException)
Any SAL_CALL OStatementCommonBase::queryInterface( const Type & rType ) throw(RuntimeException)
{
Any aRet = OStatement_BASE::queryInterface(rType);
Any aRet = OStatementCommonBase_Base::queryInterface(rType);
if(!aRet.hasValue())
aRet = OPropertySetHelper::queryInterface(rType);
return aRet;
}
// -------------------------------------------------------------------------
Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException)
Sequence< Type > SAL_CALL OStatementCommonBase::getTypes( ) throw(RuntimeException)
{
::cppu::OTypeCollection aTypes(
::cppu::UnoType< uno::Reference< XMultiPropertySet > >::get(),
::cppu::UnoType< uno::Reference< XFastPropertySet > >::get(),
::cppu::UnoType< uno::Reference< XPropertySet > >::get());
return concatSequences(aTypes.getTypes(),OStatement_BASE::getTypes());
return concatSequences(aTypes.getTypes(),OStatementCommonBase_Base::getTypes());
}
// -------------------------------------------------------------------------
void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException)
void SAL_CALL OStatementCommonBase::cancel( ) throw(RuntimeException)
{
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
// cancel the current sql statement
}
// -------------------------------------------------------------------------
void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException)
void SAL_CALL OStatementCommonBase::close( ) throw(SQLException, RuntimeException)
{
SAL_INFO("connectivity.firebird", "close().");
{
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
dispose();
}
OUString OStatement_Base::sanitizeSqlString(const OUString& sqlIn)
OUString OStatementCommonBase::sanitizeSqlString(const OUString& sqlIn)
{
// TODO: verify this is all we need.
static const sal_Unicode pattern('"');
@ -130,7 +130,7 @@ OUString OStatement_Base::sanitizeSqlString(const OUString& sqlIn)
return sqlIn.replace(pattern, empty);
}
int OStatement_Base::prepareAndDescribeStatement(const OUString& sqlIn,
int OStatementCommonBase::prepareAndDescribeStatement(const OUString& sqlIn,
isc_stmt_handle& aStatementHandle,
XSQLDA*& pOutSqlda,
XSQLDA* pInSqlda)
@ -214,25 +214,25 @@ int OStatement_Base::prepareAndDescribeStatement(const OUString& sqlIn,
}
// ---- XMultipleResults - UNSUPPORTED ----------------------------------------
uno::Reference< XResultSet > SAL_CALL OStatement_Base::getResultSet() throw(SQLException, RuntimeException)
uno::Reference< XResultSet > SAL_CALL OStatementCommonBase::getResultSet() throw(SQLException, RuntimeException)
{
// TODO: verify we really can't support this
return uno::Reference< XResultSet >();
// MutexGuard aGuard( m_aMutex );
// checkDisposed(OStatement_BASE::rBHelper.bDisposed);
// checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
// return m_xResultSet;
}
sal_Bool SAL_CALL OStatement_Base::getMoreResults() throw(SQLException, RuntimeException)
sal_Bool SAL_CALL OStatementCommonBase::getMoreResults() throw(SQLException, RuntimeException)
{
// TODO: verify we really can't support this
return sal_False;
// MutexGuard aGuard( m_aMutex );
// checkDisposed(OStatement_BASE::rBHelper.bDisposed);
// checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
}
sal_Int32 SAL_CALL OStatement_Base::getUpdateCount() throw(SQLException, RuntimeException)
sal_Int32 SAL_CALL OStatementCommonBase::getUpdateCount() throw(SQLException, RuntimeException)
{
// TODO: verify we really can't support this
return 0;
@ -240,16 +240,16 @@ sal_Int32 SAL_CALL OStatement_Base::getUpdateCount() throw(SQLException, Runtime
// ---- XWarningsSupplier - UNSUPPORTED ----------------------------------------
Any SAL_CALL OStatement_Base::getWarnings() throw(SQLException, RuntimeException)
Any SAL_CALL OStatementCommonBase::getWarnings() throw(SQLException, RuntimeException)
{
return Any();
}
void SAL_CALL OStatement_Base::clearWarnings() throw(SQLException, RuntimeException)
void SAL_CALL OStatementCommonBase::clearWarnings() throw(SQLException, RuntimeException)
{
}
::cppu::IPropertyArrayHelper* OStatement_Base::createArrayHelper( ) const
::cppu::IPropertyArrayHelper* OStatementCommonBase::createArrayHelper( ) const
{
// this properties are define by the service statement
// they must in alphabetic order
@ -271,12 +271,12 @@ void SAL_CALL OStatement_Base::clearWarnings() throw(SQLException, RuntimeExcept
}
::cppu::IPropertyArrayHelper & OStatement_Base::getInfoHelper()
::cppu::IPropertyArrayHelper & OStatementCommonBase::getInfoHelper()
{
return *const_cast<OStatement_Base*>(this)->getArrayHelper();
return *const_cast<OStatementCommonBase*>(this)->getArrayHelper();
}
// -------------------------------------------------------------------------
sal_Bool OStatement_Base::convertFastPropertyValue(
sal_Bool OStatementCommonBase::convertFastPropertyValue(
Any & rConvertedValue,
Any & rOldValue,
sal_Int32 nHandle,
@ -292,7 +292,7 @@ sal_Bool OStatement_Base::convertFastPropertyValue(
return bConverted;
}
// -------------------------------------------------------------------------
void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
void OStatementCommonBase::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
{
(void) rValue;
// set the value to what ever is necessary
@ -313,7 +313,7 @@ void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const A
}
}
// -------------------------------------------------------------------------
void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
void OStatementCommonBase::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
{
(void) rValue;
switch(nHandle)
@ -333,17 +333,17 @@ void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
}
}
void SAL_CALL OStatement_Base::acquire() throw()
void SAL_CALL OStatementCommonBase::acquire() throw()
{
OStatement_BASE::acquire();
OStatementCommonBase_Base::acquire();
}
void SAL_CALL OStatement_Base::release() throw()
void SAL_CALL OStatementCommonBase::release() throw()
{
OStatement_BASE::release();
OStatementCommonBase_Base::release();
}
uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OStatement_Base::getPropertySetInfo( ) throw(RuntimeException)
uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OStatementCommonBase::getPropertySetInfo( ) throw(RuntimeException)
{
return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
}

View File

@ -61,11 +61,11 @@ namespace connectivity
typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::sdbc::XWarningsSupplier,
::com::sun::star::util::XCancellable,
::com::sun::star::sdbc::XCloseable,
::com::sun::star::sdbc::XMultipleResults> OStatement_BASE;
::com::sun::star::sdbc::XMultipleResults> OStatementCommonBase_Base;
class OStatement_Base : public OStatement_BASE,
class OStatementCommonBase : public OStatementCommonBase_Base,
public ::cppu::OPropertySetHelper,
public OPropertyArrayUsageHelper<OStatement_Base>
public OPropertyArrayUsageHelper<OStatementCommonBase>
{
protected:
@ -98,7 +98,7 @@ namespace connectivity
virtual void SAL_CALL getFastPropertyValue(
::com::sun::star::uno::Any& rValue,
sal_Int32 nHandle) const;
virtual ~OStatement_Base();
virtual ~OStatementCommonBase();
int prepareAndDescribeStatement(const OUString& sqlIn,
isc_stmt_handle& aStatementHandle,
XSQLDA*& pOutSqlda,
@ -107,11 +107,11 @@ namespace connectivity
public:
::cppu::OBroadcastHelper& rBHelper;
OStatement_Base(OConnection* _pConnection);
using OStatement_BASE::operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >;
OStatementCommonBase(OConnection* _pConnection);
using OStatementCommonBase_Base::operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >;
// OComponentHelper
virtual void SAL_CALL disposing(void){OStatement_BASE::disposing();}
virtual void SAL_CALL disposing(void){OStatementCommonBase_Base::disposing();}
// XInterface
virtual void SAL_CALL release() throw();
virtual void SAL_CALL acquire() throw();