User: ihi     
Date: 2006/10/18 06:09:29

Modified:
   dba/connectivity/source/drivers/mozab/MTable.cxx

Log:
 INTEGRATION: CWS dba205b (1.7.38); FILE MERGED
 2006/08/09 19:52:37 fs 1.7.38.1: refactored the OColumnAlias class, in 
preparation of fixing #b6248060#

File Changes:

Directory: /dba/connectivity/source/drivers/mozab/
==================================================

File [changed]: MTable.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MTable.cxx?r1=1.8&r2=1.9
Delta lines:  +23 -54
---------------------
--- MTable.cxx  17 Sep 2006 02:58:12 -0000      1.8
+++ MTable.cxx  18 Oct 2006 13:09:27 -0000      1.9
@@ -78,6 +78,12 @@
 #ifndef _CONNECTIVITY_DBTOOLS_HXX_
 #include "connectivity/dbtools.hxx"
 #endif
+#ifndef CONNECTIVITY_TKEYS_HXX
+#include "connectivity/TKeys.hxx"
+#endif
+#ifndef CONNECTIVITY_INDEXESHELPER_HXX
+#include "connectivity/TIndexes.hxx"
+#endif
 #ifndef _CONNECTIVITY_MOZAB_CATALOG_HXX_
 #include "MCatalog.hxx"
 #endif
@@ -94,75 +100,38 @@
 using namespace ::com::sun::star::lang;
 
 OTable::OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection)
-    : OTable_TYPEDEF(_pTables, sal_True)
-       ,m_pConnection(_pConnection)
+    :OTable_Base( _pTables, _pConnection, sal_True )
+    ,m_pConnection( _pConnection )
 {
     construct();
 }
 // -------------------------------------------------------------------------
-OTable::OTable( sdbcx::OCollection* _pTables,
-                OConnection* _pConnection,
-                const ::rtl::OUString& _Name,
-                const ::rtl::OUString& _Type,
-                const ::rtl::OUString& _Description ,
-                const ::rtl::OUString& _SchemaName,
-                const ::rtl::OUString& _CatalogName
-                ) : OTable_TYPEDEF(_pTables,sal_True,
-                                  _Name,
-                                  _Type,
-                                  _Description,
-                                  _SchemaName,
-                                  _CatalogName)
-                ,m_pConnection(_pConnection)
+OTable::OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection,
+                const ::rtl::OUString& _Name, const ::rtl::OUString& _Type, 
const ::rtl::OUString& _Description )
+    :OTable_Base(_pTables, _pConnection, sal_True, _Name, _Type, _Description )
+    ,m_pConnection( _pConnection )
 {
     construct();
 }
-// -------------------------------------------------------------------------
-void OTable::refreshColumns()
+
+//--------------------------------------------------------------------------
+sdbcx::OCollection* OTable::createColumns( const TStringVector& _rNames )
 {
-    TStringVector aVector;
-    if(!isNew())
-    {
-        Reference< XResultSet > xResult = 
m_pConnection->getMetaData()->getColumns(Any(),
-                                                        
m_SchemaName,m_Name,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("%")));
-
-        if(xResult.is())
-        {
-            Reference< XRow > xRow(xResult,UNO_QUERY);
-            while(xResult->next())
-                aVector.push_back(xRow->getString(4));
-        }
-    }
-
-    if(m_pColumns)
-        m_pColumns->reFill(aVector);
-    else
-        m_pColumns  = new OColumns(this,m_aMutex,aVector);
+    return new OColumns( this, m_aMutex, _rNames );
 }
+
 //--------------------------------------------------------------------------
-Sequence< sal_Int8 > OTable::getUnoTunnelImplementationId()
+sdbcx::OCollection* OTable::createKeys(const TStringVector& _rNames)
 {
-    static ::cppu::OImplementationId * pId = 0;
-    if (! pId)
-    {
-        ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-        if (! pId)
-        {
-            static ::cppu::OImplementationId aId;
-            pId = &aId;
-        }
-    }
-    return pId->getImplementationId();
+    return new OKeysHelper( this, m_aMutex, _rNames );
 }
 
-// com::sun::star::lang::XUnoTunnel
-//------------------------------------------------------------------
-sal_Int64 OTable::getSomething( const Sequence< sal_Int8 > & rId ) throw 
(RuntimeException)
+//--------------------------------------------------------------------------
+sdbcx::OCollection* OTable::createIndexes(const TStringVector& _rNames)
 {
-    return (rId.getLength() == 16 && 0 == 
rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(),  
rId.getConstArray(), 16 ) )
-                ? reinterpret_cast< sal_Int64 >( this )
-                : OTable_TYPEDEF::getSomething(rId);
+    return new OIndexesHelper( this, m_aMutex, _rNames );
 }
+
 // 
-----------------------------------------------------------------------------
 
 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to