Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / connectivity / source / drivers / mysql / YColumns.cxx
blob30b6cd2df9f2dd0aeeed944110e6551c75d8fbd6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "mysql/YColumns.hxx"
21 #include "TConnection.hxx"
24 using namespace ::comphelper;
25 using namespace connectivity::mysql;
26 using namespace connectivity::sdbcx;
27 using namespace connectivity;
28 using namespace ::com::sun::star::uno;
29 using namespace ::com::sun::star::beans;
30 using namespace ::com::sun::star::sdbcx;
31 using namespace ::com::sun::star::sdbc;
32 using namespace ::com::sun::star::container;
33 using namespace ::com::sun::star::lang;
35 OMySQLColumns::OMySQLColumns( ::cppu::OWeakObject& _rParent
36 ,bool _bCase
37 ,::osl::Mutex& _rMutex
38 ,const TStringVector &_rVector
39 ,bool _bUseHardRef
40 ) : OColumnsHelper(_rParent,_bCase,_rMutex,_rVector,_bUseHardRef)
44 Reference< XPropertySet > OMySQLColumns::createDescriptor()
46 return new OMySQLColumn(true);
50 OMySQLColumn::OMySQLColumn( bool _bCase)
51 : connectivity::sdbcx::OColumn( _bCase )
53 construct();
56 void OMySQLColumn::construct()
58 m_sAutoIncrement = "auto_increment";
59 registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement));
62 ::cppu::IPropertyArrayHelper* OMySQLColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const
64 return doCreateArrayHelper();
67 ::cppu::IPropertyArrayHelper & SAL_CALL OMySQLColumn::getInfoHelper()
69 return *OMySQLColumn_PROP::getArrayHelper(isNew() ? 1 : 0);
72 Sequence< OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(RuntimeException, std::exception)
74 Sequence< OUString > aSupported(1);
75 aSupported[0] = "com.sun.star.sdbcx.Column";
77 return aSupported;
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */