Update ooo320-m1
[ooovba.git] / connectivity / source / drivers / mozab / MTable.cxx
blob29aadaac503470f28f292ce6a6466777867c514b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: MTable.cxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_connectivity.hxx"
33 #include "MTable.hxx"
34 #include "MTables.hxx"
35 #include "MColumns.hxx"
36 #include <com/sun/star/sdbc/XRow.hpp>
37 #include <com/sun/star/sdbc/XResultSet.hpp>
38 #include <com/sun/star/sdbcx/KeyType.hpp>
39 #include <com/sun/star/sdbc/KeyRule.hpp>
40 #include <cppuhelper/typeprovider.hxx>
41 #include <com/sun/star/lang/DisposedException.hpp>
42 #include <com/sun/star/sdbc/ColumnValue.hpp>
43 #include <comphelper/sequence.hxx>
44 #include <comphelper/extract.hxx>
45 #include <comphelper/types.hxx>
46 #include "connectivity/dbtools.hxx"
47 #include "connectivity/TKeys.hxx"
48 #include "connectivity/TIndexes.hxx"
49 #include "MCatalog.hxx"
52 using namespace ::comphelper;
53 using namespace connectivity::mozab;
54 using namespace connectivity;
55 using namespace ::com::sun::star::uno;
56 using namespace ::com::sun::star::beans;
57 using namespace ::com::sun::star::sdbcx;
58 using namespace ::com::sun::star::sdbc;
59 using namespace ::com::sun::star::container;
60 using namespace ::com::sun::star::lang;
62 OTable::OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection)
63 :OTable_Base( _pTables, _pConnection, sal_True )
64 ,m_pConnection( _pConnection )
66 construct();
68 // -------------------------------------------------------------------------
69 OTable::OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection,
70 const ::rtl::OUString& _Name, const ::rtl::OUString& _Type, const ::rtl::OUString& _Description )
71 :OTable_Base(_pTables, _pConnection, sal_True, _Name, _Type, _Description )
72 ,m_pConnection( _pConnection )
74 construct();
77 //--------------------------------------------------------------------------
78 sdbcx::OCollection* OTable::createColumns( const TStringVector& _rNames )
80 return new OColumns( this, m_aMutex, _rNames );
83 //--------------------------------------------------------------------------
84 sdbcx::OCollection* OTable::createKeys(const TStringVector& _rNames)
86 return new OKeysHelper( this, m_aMutex, _rNames );
89 //--------------------------------------------------------------------------
90 sdbcx::OCollection* OTable::createIndexes(const TStringVector& _rNames)
92 return new OIndexesHelper( this, m_aMutex, _rNames );
95 // -----------------------------------------------------------------------------