2004-08-02 11:07:21 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 04:22:56 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-08-02 11:07:21 -05:00
|
|
|
*
|
2008-04-10 04:22:56 -05:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2004-08-02 11:07:21 -05:00
|
|
|
*
|
2008-04-10 04:22:56 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-08-02 11:07:21 -05:00
|
|
|
*
|
2008-04-10 04:22:56 -05:00
|
|
|
* $RCSfile: YColumns.cxx,v $
|
|
|
|
* $Revision: 1.7 $
|
2004-08-02 11:07:21 -05:00
|
|
|
*
|
2008-04-10 04:22:56 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-08-02 11:07:21 -05:00
|
|
|
*
|
2008-04-10 04:22:56 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2004-08-02 11:07:21 -05:00
|
|
|
*
|
2008-04-10 04:22:56 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2004-08-02 11:07:21 -05:00
|
|
|
*
|
2008-04-10 04:22:56 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2004-08-02 11:07:21 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
2006-09-16 21:03:14 -05:00
|
|
|
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_connectivity.hxx"
|
2004-08-02 11:07:21 -05:00
|
|
|
#include "mysql/YColumns.hxx"
|
|
|
|
#include "TConnection.hxx"
|
|
|
|
|
|
|
|
|
|
|
|
using namespace ::comphelper;
|
|
|
|
using namespace connectivity::mysql;
|
|
|
|
using namespace connectivity::sdbcx;
|
|
|
|
using namespace connectivity;
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::beans;
|
|
|
|
using namespace ::com::sun::star::sdbcx;
|
|
|
|
using namespace ::com::sun::star::sdbc;
|
|
|
|
using namespace ::com::sun::star::container;
|
|
|
|
using namespace ::com::sun::star::lang;
|
|
|
|
|
|
|
|
OMySQLColumns::OMySQLColumns( ::cppu::OWeakObject& _rParent
|
|
|
|
,sal_Bool _bCase
|
|
|
|
,::osl::Mutex& _rMutex
|
|
|
|
,const TStringVector &_rVector
|
|
|
|
,sal_Bool _bUseHardRef
|
|
|
|
) : OColumnsHelper(_rParent,_bCase,_rMutex,_rVector,_bUseHardRef)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
2006-07-10 08:30:32 -05:00
|
|
|
Reference< XPropertySet > OMySQLColumns::createDescriptor()
|
2004-08-02 11:07:21 -05:00
|
|
|
{
|
|
|
|
return new OMySQLColumn(sal_True);
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
OMySQLColumn::OMySQLColumn( sal_Bool _bCase)
|
|
|
|
: connectivity::sdbcx::OColumn( _bCase )
|
|
|
|
{
|
|
|
|
construct();
|
|
|
|
}
|
|
|
|
// -------------------------------------------------------------------------
|
|
|
|
void OMySQLColumn::construct()
|
|
|
|
{
|
|
|
|
m_sAutoIncrement = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("auto_increment"));
|
|
|
|
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement));
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
2006-06-19 19:52:53 -05:00
|
|
|
::cppu::IPropertyArrayHelper* OMySQLColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const
|
2004-08-02 11:07:21 -05:00
|
|
|
{
|
2006-06-19 19:52:53 -05:00
|
|
|
return doCreateArrayHelper();
|
2004-08-02 11:07:21 -05:00
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
::cppu::IPropertyArrayHelper & SAL_CALL OMySQLColumn::getInfoHelper()
|
|
|
|
{
|
|
|
|
return *OMySQLColumn_PROP::getArrayHelper(isNew() ? 1 : 0);
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
Sequence< ::rtl::OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
Sequence< ::rtl::OUString > aSupported(1);
|
|
|
|
aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Column");
|
|
|
|
|
|
|
|
return aSupported;
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|