1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20 #include <hsqldb/HColumns.hxx>
21 #include <TConnection.hxx>
22
23
24 using namespace ::comphelper;
25 using namespace connectivity::hsqldb;
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;
34
OHSQLColumns(::cppu::OWeakObject & _rParent,::osl::Mutex & _rMutex,const::std::vector<OUString> & _rVector)35 OHSQLColumns::OHSQLColumns( ::cppu::OWeakObject& _rParent
36 ,::osl::Mutex& _rMutex
37 ,const ::std::vector< OUString> &_rVector
38 ) : OColumnsHelper(_rParent,true/*_bCase*/,_rMutex,_rVector,true/*_bUseHardRef*/)
39 {
40 }
41
createDescriptor()42 Reference< XPropertySet > OHSQLColumns::createDescriptor()
43 {
44 return new OHSQLColumn;
45 }
46
47
OHSQLColumn()48 OHSQLColumn::OHSQLColumn()
49 : connectivity::sdbcx::OColumn( true/*_bCase*/ )
50 {
51 construct();
52 }
53
construct()54 void OHSQLColumn::construct()
55 {
56 m_sAutoIncrement = "IDENTITY";
57 registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, cppu::UnoType<decltype(m_sAutoIncrement)>::get());
58 }
59
createArrayHelper(sal_Int32) const60 ::cppu::IPropertyArrayHelper* OHSQLColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const
61 {
62 return doCreateArrayHelper();
63 }
64
getInfoHelper()65 ::cppu::IPropertyArrayHelper & SAL_CALL OHSQLColumn::getInfoHelper()
66 {
67 return *OHSQLColumn_PROP::getArrayHelper(isNew() ? 1 : 0);
68 }
69
getSupportedServiceNames()70 Sequence< OUString > SAL_CALL OHSQLColumn::getSupportedServiceNames( )
71 {
72 return { "com.sun.star.sdbcx.Column" };
73 }
74
75
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
77