diff options
Diffstat (limited to 'connectivity/source/drivers/macab/MacabConnection.cxx')
-rw-r--r-- | connectivity/source/drivers/macab/MacabConnection.cxx | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/connectivity/source/drivers/macab/MacabConnection.cxx b/connectivity/source/drivers/macab/MacabConnection.cxx index 6932f5aea724..28bcb7c3675d 100644 --- a/connectivity/source/drivers/macab/MacabConnection.cxx +++ b/connectivity/source/drivers/macab/MacabConnection.cxx @@ -36,7 +36,7 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; IMPLEMENT_SERVICE_INFO(MacabConnection, "com.sun.star.sdbc.drivers.MacabConnection", "com.sun.star.sdbc.Connection") -//----------------------------------------------------------------------------- + MacabConnection::MacabConnection(MacabDriver* _pDriver) : OSubComponent<MacabConnection, MacabConnection_BASE>((::cppu::OWeakObject*)_pDriver, this), m_pAddressBook(NULL), @@ -44,7 +44,7 @@ MacabConnection::MacabConnection(MacabDriver* _pDriver) { m_pDriver->acquire(); } -//----------------------------------------------------------------------------- + MacabConnection::~MacabConnection() { if (!isClosed()) @@ -53,12 +53,12 @@ MacabConnection::~MacabConnection() m_pDriver->release(); m_pDriver = NULL; } -//----------------------------------------------------------------------------- + void SAL_CALL MacabConnection::release() throw() { relase_ChildImpl(); } -// ----------------------------------------------------------------------------- + void MacabConnection::construct(const OUString&, const Sequence< PropertyValue >&) throw(SQLException) { osl_atomic_increment( &m_refCount ); @@ -69,7 +69,7 @@ void MacabConnection::construct(const OUString&, const Sequence< PropertyValue > osl_atomic_decrement( &m_refCount ); } // XServiceInfo -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL MacabConnection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -81,7 +81,7 @@ Reference< XStatement > SAL_CALL MacabConnection::createStatement( ) throw(SQLE m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL MacabConnection::prepareStatement( const OUString& _sSql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -93,7 +93,7 @@ Reference< XPreparedStatement > SAL_CALL MacabConnection::prepareStatement( cons m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL MacabConnection::prepareCall( const OUString& ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -102,7 +102,7 @@ Reference< XPreparedStatement > SAL_CALL MacabConnection::prepareCall( const OUS // not implemented yet :-) a task to do return NULL; } -// -------------------------------------------------------------------------------- + OUString SAL_CALL MacabConnection::nativeSQL( const OUString& _sSql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -110,14 +110,14 @@ OUString SAL_CALL MacabConnection::nativeSQL( const OUString& _sSql ) throw(SQLE return _sSql; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::setAutoCommit( sal_Bool ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabConnection_BASE::rBHelper.bDisposed); // here you have to set your commit mode please have a look at the jdbc documentation to get a clear explanation } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabConnection::getAutoCommit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -127,7 +127,7 @@ sal_Bool SAL_CALL MacabConnection::getAutoCommit( ) throw(SQLException, Runtime return sal_True; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::commit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -135,7 +135,7 @@ void SAL_CALL MacabConnection::commit( ) throw(SQLException, RuntimeException) // when you database does support transactions you should commit here } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::rollback( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -143,7 +143,7 @@ void SAL_CALL MacabConnection::rollback( ) throw(SQLException, RuntimeException // same as commit but for the other case } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabConnection::isClosed( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -151,7 +151,7 @@ sal_Bool SAL_CALL MacabConnection::isClosed( ) throw(SQLException, RuntimeExcep // just simple -> we are closed when we are disposed, that means someone called dispose(); (XComponent) return MacabConnection_BASE::rBHelper.bDisposed; } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL MacabConnection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -168,7 +168,7 @@ Reference< XDatabaseMetaData > SAL_CALL MacabConnection::getMetaData( ) throw(S return xMetaData; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::setReadOnly( sal_Bool ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -176,7 +176,7 @@ void SAL_CALL MacabConnection::setReadOnly( sal_Bool ) throw(SQLException, Runti // set you connection to readonly } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabConnection::isReadOnly( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -185,7 +185,7 @@ sal_Bool SAL_CALL MacabConnection::isReadOnly( ) throw(SQLException, RuntimeExc // return if your connection to readonly return sal_False; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::setCatalog( const OUString& ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -193,7 +193,7 @@ void SAL_CALL MacabConnection::setCatalog( const OUString& ) throw(SQLException, // if your database doesn't work with catalogs you go to next method otherwise you kjnow what to do } -// -------------------------------------------------------------------------------- + OUString SAL_CALL MacabConnection::getCatalog( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -203,7 +203,7 @@ OUString SAL_CALL MacabConnection::getCatalog( ) throw(SQLException, RuntimeExc // return your current catalog return OUString(); } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::setTransactionIsolation( sal_Int32 ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -212,7 +212,7 @@ void SAL_CALL MacabConnection::setTransactionIsolation( sal_Int32 ) throw(SQLExc // set your isolation level // please have a look at @see com.sun.star.sdbc.TransactionIsolation } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -222,7 +222,7 @@ sal_Int32 SAL_CALL MacabConnection::getTransactionIsolation( ) throw(SQLExcepti // please have a look at @see com.sun.star.sdbc.TransactionIsolation return TransactionIsolation::NONE; } -// -------------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL MacabConnection::getTypeMap( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -232,12 +232,12 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL MacabConnection:: return NULL; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& ) throw(SQLException, RuntimeException) { // the other way around } -// -------------------------------------------------------------------------------- + // XCloseable void SAL_CALL MacabConnection::close( ) throw(SQLException, RuntimeException) { @@ -247,19 +247,19 @@ void SAL_CALL MacabConnection::close( ) throw(SQLException, RuntimeException) } dispose(); } -// -------------------------------------------------------------------------------- + // XWarningsSupplier Any SAL_CALL MacabConnection::getWarnings( ) throw(SQLException, RuntimeException) { // when you collected some warnings -> return it return Any(); } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::clearWarnings( ) throw(SQLException, RuntimeException) { // you should clear your collected warnings here } -//------------------------------------------------------------------------------ + void MacabConnection::disposing() { // we noticed that we should be destroied in near future so we have to dispose our statements @@ -284,7 +284,7 @@ void MacabConnection::disposing() dispose_ChildImpl(); MacabConnection_BASE::disposing(); } -// ----------------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL MacabConnection::createCatalog() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -298,12 +298,12 @@ Reference< XTablesSupplier > SAL_CALL MacabConnection::createCatalog() } return xTab; } -// ----------------------------------------------------------------------------- + MacabAddressBook* MacabConnection::getAddressBook() const { return m_pAddressBook; } -// ----------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL createMacabConnection( void* _pDriver ) { MacabConnection* pConnection = new MacabConnection( static_cast< MacabDriver* >( _pDriver ) ); |