Kaydet (Commit) 8256eb02 authored tarafından Matúš Kukan's avatar Matúš Kukan Kaydeden (comit) David Tardon

connectivity: remove unused adabas files

üst 5b7efe2a
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#include "adabas/BKeyColumn.hxx"
using namespace connectivity::adabas;
namespace starbeans = ::com::sun::star::beans;
// -------------------------------------------------------------------------
OKeyColumn::OKeyColumn() : OColumn()
{
construct();
}
// -------------------------------------------------------------------------
OKeyColumn::OKeyColumn( const ::rtl::OUString& _ReferencedColumn,
const ::rtl::OUString& _Name,
const ::rtl::OUString& _TypeName,
const ::rtl::OUString& _DefaultValue,
sal_Int32 _IsNullable,
sal_Int32 _Precision,
sal_Int32 _Scale,
sal_Int32 _Type,
sal_Bool _IsAutoIncrement
) : OColumn(_Name,
_TypeName,
_DefaultValue,
_IsNullable,
_Precision,
_Scale,
_Type,
_IsAutoIncrement)
, m_ReferencedColumn(_ReferencedColumn)
{
construct();
}
// -------------------------------------------------------------------------
void OKeyColumn::construct()
{
sal_Int32 nAttrib = isNew() ? 0 : starbeans::PropertyAttribute::READONLY;
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN), PROPERTY_ID_RELATEDCOLUMN, nAttrib,&m_ReferencedColumn, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#include "adabas/BKeyColumns.hxx"
#include "adabas/BKeyColumn.hxx"
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include "adabas/BTable.hxx"
using namespace connectivity::adabas;
// -------------------------------------------------------------------------
sdbcx::ObjectType OKeyColumns::createObject(const ::rtl::OUString& _rName)
{
Reference< starsdbc::XResultSet >
xResult = m_pTable->getConnection()->getMetaData()->getImportedKeys(Any(),
m_pTable->getSchema(),m_pTable->getName());
::rtl::OUString aRefColumnName;
if(xResult.is())
{
Reference< starsdbc::XRow > xRow(xResult,UNO_QUERY);
while(xResult->next())
{
if(xRow->getString(8) == _rName)
{
aRefColumnName = xRow->getString(4);
break;
}
}
}
xResult = m_pTable->getConnection()->getMetaData()->getColumns(Any(),
m_pTable->getSchema(),m_pTable->getName(),_rName);
sdbcx::ObjectType xRet = NULL;
if(xResult.is())
{
Reference< starsdbc::XRow > xRow(xResult,UNO_QUERY);
if(xResult->next())
{
if(xRow->getString(4) == _rName)
{
OKeyColumn* pRet = new OKeyColumn(aRefColumnName,
_rName,
xRow->getString(6),
xRow->getString(13),
xRow->getInt(11),
xRow->getInt(7),
xRow->getInt(9),
xRow->getInt(5),
sal_False);
xRet = pRet;
}
}
}
return xRet;
}
// -------------------------------------------------------------------------
Reference< XPropertySet > OKeyColumns::createDescriptor()
{
OKeyColumn* pNew = new OKeyColumn();
return pNew;
}
// -------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_CATALOG_HXX_
#define _CONNECTIVITY_ADABAS_CATALOG_HXX_
#include "connectivity/sdbcx/VCatalog.hxx"
#include "odbc/OFunctiondefs.hxx"
#include "connectivity/StdTypeDefs.hxx"
namespace connectivity
{
namespace adabas
{
// please don't name the class the same name as in an other namespaces
// some compilers have problems with this task as I noticed on windows
class OAdabasConnection;
class OAdabasCatalog : public connectivity::sdbcx::OCatalog
{
OAdabasConnection* m_pConnection; // used to get the metadata
SQLHANDLE m_aConnectionHdl; // used for odbc specific stuff
void fillVector(const ::rtl::OUString& _sQuery,TStringVector& _rVector);
protected:
/** builds the name which should be used to access the object later on in the collection.
Will only be called in fillNames.
@param _xRow
The cuurent row from a call of XDatabaseMetaData::getTables.
*/
virtual ::rtl::OUString buildName( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >& _xRow);
public:
// implementation of the pure virtual methods
virtual void refreshTables();
virtual void refreshViews() ;
virtual void refreshGroups();
virtual void refreshUsers() ;
public:
OAdabasCatalog(SQLHANDLE _aConnectionHdl,OAdabasConnection* _pCon);
OAdabasConnection* getConnection() const { return m_pConnection; }
sdbcx::OCollection* getPrivateTables() const { return m_pTables;}
sdbcx::OCollection* getPrivateViews() const { return m_pViews; }
static const ::rtl::OUString& getDot();
// correct the the column properties of float/real/double values
// all & parameters are IN and OUT
static void correctColumnProperties(sal_Int32 _nPrec, sal_Int32& _rnType,::rtl::OUString& _rsTypeName);
};
}
}
#endif // _CONNECTIVITY_ADABAS_CATALOG_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_COLUMN_HXX_
#define _CONNECTIVITY_ADABAS_COLUMN_HXX_
#include "connectivity/sdbcx/VColumn.hxx"
namespace connectivity
{
namespace adabas
{
class OAdabasColumn : public sdbcx::OColumn
{
public:
OAdabasColumn();
OAdabasColumn(const ::rtl::OUString& _Name,
const ::rtl::OUString& _TypeName,
const ::rtl::OUString& _DefaultValue,
sal_Int32 _IsNullable,
sal_Int32 _Precision,
sal_Int32 _Scale,
sal_Int32 _Type,
sal_Bool _IsAutoIncrement);
};
}
}
#endif // _CONNECTIVITY_ADABAS_COLUMN_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_COLUMNS_HXX_
#define _CONNECTIVITY_ADABAS_COLUMNS_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include "connectivity/sdbcx/IRefreshable.hxx"
#include "adabas/BTable.hxx"
namespace connectivity
{
namespace adabas
{
class OColumns : public sdbcx::OCollection
{
protected:
OAdabasTable* m_pTable;
virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const ::rtl::OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName);
public:
OColumns( OAdabasTable* _pTable,
::osl::Mutex& _rMutex,
const TStringVector &_rVector
) : sdbcx::OCollection(*_pTable,sal_True,_rMutex,_rVector)
,m_pTable(_pTable)
{}
};
}
}
#endif // _CONNECTIVITY_ADABAS_COLUMNS_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_BCONNECTION_HXX_
#define _CONNECTIVITY_ADABAS_BCONNECTION_HXX_
#include <cppuhelper/compbase2.hxx>
#include "odbc/OConnection.hxx"
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <cppuhelper/weakref.hxx>
#include <rtl/ref.hxx>
namespace connectivity
{
namespace odbc
{
class ODBCDriver;
}
namespace adabas
{
typedef connectivity::odbc::OConnection OConnection_BASE2;
// we must use the name "OAdabasConnection" because of a compiler bug
class OAdabasConnection : public OConnection_BASE2
{
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbcx::XTablesSupplier> m_xCatalog;
protected:
virtual SQLRETURN openConnectionWithAuth(const ::rtl::OUString& aConnectStr,sal_Int32 nTimeOut, const ::rtl::OUString& _uid,const ::rtl::OUString& _pwd);
virtual connectivity::odbc::OConnection* cloneConnection(); // creates a new connection
public:
virtual SQLRETURN Construct( const ::rtl::OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) throw(::com::sun::star::sdbc::SQLException);
OAdabasConnection(const SQLHANDLE _pDriverHandle,connectivity::odbc::ODBCDriver* _pDriver);
// OComponentHelper;
virtual void SAL_CALL disposing();
::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > createCatalog();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > SAL_CALL getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement > SAL_CALL createStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareStatement( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
//XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException);
static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
::rtl::Reference<OSQLColumns> createSelectColumns(const ::rtl::OUString& _rSql);
};
}
}
#endif // _CONNECTIVITY_ADABAS_BCONNECTION_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#include "odbc/ODatabaseMetaData.hxx"
namespace connectivity
{
namespace odbc
{
class OConnection;
}
namespace adabas
{
typedef odbc::ODatabaseMetaData OAdabasDatabaseMetaData_BASE;
class OAdabasDatabaseMetaData : public OAdabasDatabaseMetaData_BASE
{
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_getTypeInfo_throw();
public:
OAdabasDatabaseMetaData(const SQLHANDLE _pHandle,odbc::OConnection* _pCon)
: ODatabaseMetaData(_pHandle,_pCon)
{
}
// just to return our url
virtual ::rtl::OUString SAL_CALL getURL( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsIntegrityEnhancementFacility( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
};
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_GROUP_HXX_
#define _CONNECTIVITY_ADABAS_GROUP_HXX_
#include "connectivity/sdbcx/VGroup.hxx"
namespace connectivity
{
namespace adabas
{
class OAdabasConnection;
class OAdabasGroup : public sdbcx::OGroup
{
OAdabasConnection* m_pConnection;
public:
virtual void refreshUsers();
public:
OAdabasGroup( OAdabasConnection* _pConnection);
OAdabasGroup( OAdabasConnection* _pConnection,const ::rtl::OUString& _Name);
};
}
}
#endif // _CONNECTIVITY_ADABAS_GROUP_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_GROUPS_HXX_
#define _CONNECTIVITY_ADABAS_GROUPS_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
namespace connectivity
{
namespace sdbcx
{
class IRefreshableGroups;
}
namespace adabas
{
class OAdabasConnection;
class OGroups : public sdbcx::OCollection
{
protected:
OAdabasConnection* m_pConnection;
connectivity::sdbcx::IRefreshableGroups* m_pParent;
virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const ::rtl::OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName);
public:
OGroups(::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
const TStringVector &_rVector,
OAdabasConnection* _pConnection,
connectivity::sdbcx::IRefreshableGroups* _pParent) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector)
,m_pConnection(_pConnection)
,m_pParent(_pParent)
{}
};
}
}
#endif // _CONNECTIVITY_ADABAS_GROUPS_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_INDEX_HXX_
#define _CONNECTIVITY_ADABAS_INDEX_HXX_
#include "connectivity/sdbcx/VIndex.hxx"
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
namespace connectivity
{
namespace adabas
{
class OAdabasTable;
class OAdabasIndex : public sdbcx::OIndex
{
OAdabasTable* m_pTable;
public:
virtual void refreshColumns();
public:
OAdabasIndex(OAdabasTable* _pTable);
OAdabasIndex( OAdabasTable* _pTable,
const ::rtl::OUString& _Name,
const ::rtl::OUString& _Catalog,
sal_Bool _isUnique,
sal_Bool _isPrimaryKeyIndex,
sal_Bool _isClustered
);
OAdabasTable* getTable() const { return m_pTable; }
};
}
}
#endif // _CONNECTIVITY_ADABAS_INDEX_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_INDEXCOLUMN_HXX_
#define _CONNECTIVITY_ADABAS_INDEXCOLUMN_HXX_
#include "adabas/BColumn.hxx"
namespace connectivity
{
namespace adabas
{
class OIndexColumn : public OAdabasColumn
{
protected:
sal_Bool m_IsAscending;
public:
OIndexColumn();
OIndexColumn( sal_Bool _IsAscending,
const ::rtl::OUString& _Name,
const ::rtl::OUString& _TypeName,
const ::rtl::OUString& _DefaultValue,
sal_Int32 _IsNullable,
sal_Int32 _Precision,
sal_Int32 _Scale,
sal_Int32 _Type,
sal_Bool _IsAutoIncrement);
virtual void construct();
};
}
}
#endif // _CONNECTIVITY_ADABAS_INDEXCOLUMN_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_INDEXCOLUMNS_HXX_
#define _CONNECTIVITY_ADABAS_INDEXCOLUMNS_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
#include "adabas/BIndex.hxx"
namespace connectivity
{
namespace adabas
{
class OIndexColumns : public sdbcx::OCollection
{
OAdabasIndex* m_pIndex;
protected:
virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual sdbcx::ObjectType appendObject( const ::rtl::OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
public:
OIndexColumns( OAdabasIndex* _pIndex,
::osl::Mutex& _rMutex,
const TStringVector &_rVector)
: sdbcx::OCollection(*_pIndex,sal_True,_rMutex,_rVector)
,m_pIndex(_pIndex)
{
}
};
}
}
#endif // _CONNECTIVITY_ADABAS_INDEXCOLUMNS_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_INDEXES_HXX_
#define _CONNECTIVITY_ADABAS_INDEXES_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include "adabas/BTable.hxx"
namespace connectivity
{
namespace adabas
{
class OIndexes : public sdbcx::OCollection
{
OAdabasTable* m_pTable;
protected:
virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const ::rtl::OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName);
public:
OIndexes(OAdabasTable* _pTable,
::osl::Mutex& _rMutex,
const TStringVector &_rVector
) : sdbcx::OCollection(*_pTable,sal_True,_rMutex,_rVector)
,m_pTable(_pTable)
{}
};
}
}
#endif // _CONNECTIVITY_ADABAS_INDEXES_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_KEYS_HXX_
#define _CONNECTIVITY_ADABAS_KEYS_HXX_
#include "connectivity/TKeys.hxx"
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include "adabas/BTable.hxx"
namespace connectivity
{
namespace adabas
{
class OKeys : public OKeysHelper
{
protected:
virtual sdbcx::ObjectType appendObject( const ::rtl::OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual ::rtl::OUString getDropForeignKey() const;
public:
OKeys(OAdabasTable* _pTable,
::osl::Mutex& _rMutex,
const TStringVector &_rVector
) : OKeysHelper(_pTable,_rMutex,_rVector)
{}
};
}
}
#endif // _CONNECTIVITY_ADABAS_KEYS_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef CONNECTIVITY_ADABAS_PREPAREDSTATEMENT_HXX
#define CONNECTIVITY_ADABAS_PREPAREDSTATEMENT_HXX
#include "odbc/OPreparedStatement.hxx"
#include "adabas/BConnection.hxx"
namespace connectivity
{
namespace adabas
{
class OAdabasPreparedStatement : public ::connectivity::odbc::OPreparedStatement
{
::rtl::Reference<OSQLColumns> m_aSelectColumns;
protected:
virtual odbc::OResultSet* createResulSet();
virtual void setResultSetConcurrency(sal_Int32 _par0) ;
virtual void setResultSetType(sal_Int32 _par0) ;
virtual void setUsingBookmarks(sal_Bool _bUseBookmark) ;
public:
OAdabasPreparedStatement( OAdabasConnection* _pConnection,const ::rtl::OUString& sql);
};
}
}
#endif // CONNECTIVITY_ADABAS_PREPAREDSTATEMENT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef CONNECTIVITY_ADABAS_RESULTSET_HXX
#define CONNECTIVITY_ADABAS_RESULTSET_HXX
#include "odbc/OResultSet.hxx"
namespace connectivity
{
namespace adabas
{
class OAdabasResultSet : public ::connectivity::odbc::OResultSet
{
::rtl::Reference<OSQLColumns> m_aSelectColumns;
public:
OAdabasResultSet(SQLHANDLE _pStatementHandle,::connectivity::odbc::OStatement_Base* pStmt,const ::rtl::Reference<OSQLColumns>& _rSelectColumns)
: ::connectivity::odbc::OResultSet( _pStatementHandle,pStmt)
,m_aSelectColumns(_rSelectColumns)
{}
// XResultSetMetaDataSupplier
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL last( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL previous( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL refreshRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
};
}
}
#endif // CONNECTIVITY_ADABAS_RESULTSET_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef CONNECTIVITY_ADABAS_RESULTSETMETADATA_HXX
#define CONNECTIVITY_ADABAS_RESULTSETMETADATA_HXX
#include "odbc/OResultSetMetaData.hxx"
#include <rtl/ref.hxx>
namespace connectivity
{
namespace adabas
{
//**************************************************************
//************ Class: ResultSetMetaData
//**************************************************************
typedef odbc::OResultSetMetaData OAdabasResultSetMetaData_BASE;
class OAdabasResultSetMetaData : public OAdabasResultSetMetaData_BASE
{
::rtl::Reference<OSQLColumns> m_aSelectColumns;
public:
// a Constructor, that is needed for when Returning the Object is needed:
OAdabasResultSetMetaData(odbc::OConnection* _pConnection, SQLHANDLE _pStmt ,const ::rtl::Reference<OSQLColumns>& _rSelectColumns);
virtual ~OAdabasResultSetMetaData();
virtual sal_Int32 SAL_CALL getColumnType( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL isNullable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
};
}
}
#endif // CONNECTIVITY_ADABAS_RESULTSETMETADATA_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef CONNECTIVITY_ADABAS_STATEMENT_HXX
#define CONNECTIVITY_ADABAS_STATEMENT_HXX
#include "odbc/OStatement.hxx"
#include "adabas/BConnection.hxx"
#include "connectivity/CommonTools.hxx"
#include <rtl/ref.hxx>
namespace connectivity
{
namespace adabas
{
class OAdabasStatement : public ::connectivity::odbc::OStatement
{
OAdabasConnection* m_pOwnConnection;
::rtl::Reference<OSQLColumns> m_aSelectColumns;
protected:
virtual odbc::OResultSet* createResulSet();
virtual void setResultSetConcurrency(sal_Int32 _par0);
virtual void setResultSetType(sal_Int32 _par0) ;
virtual void setUsingBookmarks(sal_Bool _bUseBookmark);
public:
OAdabasStatement( OAdabasConnection* _pConnection)
: ::connectivity::odbc::OStatement( _pConnection )
,m_pOwnConnection(_pConnection)
{}
virtual sal_Bool SAL_CALL execute( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
};
}
}
#endif // CONNECTIVITY_ADABAS_STATEMENT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_TABLE_HXX_
#define _CONNECTIVITY_ADABAS_TABLE_HXX_
#include "connectivity/sdbcx/VTable.hxx"
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include "adabas/BConnection.hxx"
#include "connectivity/TTableHelper.hxx"
namespace connectivity
{
namespace adabas
{
typedef connectivity::OTableHelper OTable_TYPEDEF;
::rtl::OUString getTypeString(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xColProp);
class OAdabasTable : public OTableHelper
{
OAdabasConnection* m_pConnection;
protected:
/** creates the column collection for the table
@param _rNames
The column names.
*/
virtual sdbcx::OCollection* createColumns(const TStringVector& _rNames);
/** creates the key collection for the table
@param _rNames
The key names.
*/
virtual sdbcx::OCollection* createKeys(const TStringVector& _rNames);
/** creates the index collection for the table
@param _rNames
The index names.
*/
virtual sdbcx::OCollection* createIndexes(const TStringVector& _rNames);
public:
OAdabasTable( sdbcx::OCollection* _pTables,
OAdabasConnection* _pConnection);
OAdabasTable( sdbcx::OCollection* _pTables,
OAdabasConnection* _pConnection,
const ::rtl::OUString& _Name,
const ::rtl::OUString& _Type,
const ::rtl::OUString& _Description = ::rtl::OUString(),
const ::rtl::OUString& _SchemaName = ::rtl::OUString(),
const ::rtl::OUString& _CatalogName = ::rtl::OUString()
);
::rtl::OUString getTableName() const { return m_Name; }
::rtl::OUString getSchema() const { return m_SchemaName; }
// com::sun::star::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
// XAlterTable
virtual void SAL_CALL alterColumnByName( const ::rtl::OUString& colName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
// XNamed
virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
/**
returns the ALTER TABLE XXX COLUMN statement
*/
::rtl::OUString getAlterTableColumnPart(const ::rtl::OUString& _rsColumnName );
// starts a sql transaaction
void beginTransAction();
// rolls back a sql transaaction
void rollbackTransAction();
// ends a sql transaaction
void endTransAction();
// some methods to alter table structures
void alterColumnType(const ::rtl::OUString& _rColName,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xDescriptor);
void alterNotNullValue(sal_Int32 _nNewNullable,const ::rtl::OUString& _rColName);
void alterDefaultValue(const ::rtl::OUString& _sNewDefault,const ::rtl::OUString& _rColName);
void dropDefaultValue(const ::rtl::OUString& _sNewDefault);
void addDefaultValue(const ::rtl::OUString& _sNewDefault,const ::rtl::OUString& _rColName);
};
}
}
#endif // _CONNECTIVITY_ADABAS_TABLE_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_TABLES_HXX_
#define _CONNECTIVITY_ADABAS_TABLES_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
namespace connectivity
{
namespace adabas
{
class OTables : public sdbcx::OCollection
{
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
// OCatalog* m_pParent;
protected:
virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const ::rtl::OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName);
void setComments(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
void createTable( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual ::rtl::OUString getNameForObject(const sdbcx::ObjectType& _xObject);
public:
OTables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
const TStringVector &_rVector) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector)
,m_xMetaData(_rMetaData)
{}
// only the name is identical to ::cppu::OComponentHelper
virtual void SAL_CALL disposing(void);
// XDrop
void appendNew(const ::rtl::OUString& _rsNewTable);
// some helper functions
/**
returns a sql string which contains the column definition part for create or alter statements
*/
static ::rtl::OUString getColumnSqlType(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColProp);
/**
returns the "not null" part or the default part of the table statement
*/
static ::rtl::OUString getColumnSqlNotNullDefault(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColProp);
/**
returns the corresponding typename
can contain () which have to filled with values
*/
static ::rtl::OUString getTypeString(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColProp);
};
}
}
#endif // _CONNECTIVITY_ADABAS_TABLES_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_USER_HXX_
#define _CONNECTIVITY_ADABAS_USER_HXX_
#include "connectivity/sdbcx/VUser.hxx"
namespace connectivity
{
namespace adabas
{
class OAdabasConnection;
typedef connectivity::sdbcx::OUser OUser_TYPEDEF;
class OAdabasUser : public OUser_TYPEDEF
{
OAdabasConnection* m_pConnection;
::rtl::OUString getPrivilegeString(sal_Int32 nRights) const;
// return the privileges and additional the grant rights
void getAnyTablePrivileges(const ::rtl::OUString& objName, sal_Int32& nRights,sal_Int32& nRightsWithGrant) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
public:
virtual void refreshGroups();
public:
OAdabasUser( OAdabasConnection* _pConnection);
OAdabasUser( OAdabasConnection* _pConnection,const ::rtl::OUString& _Name);
// XUser
virtual void SAL_CALL changePassword( const ::rtl::OUString& objPassword, const ::rtl::OUString& newPassword ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// XAuthorizable
virtual sal_Int32 SAL_CALL getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getGrantablePrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
};
class OUserExtend;
typedef ::comphelper::OPropertyArrayUsageHelper<OUserExtend> OUserExtend_PROP;
class OUserExtend : public OAdabasUser,
public OUserExtend_PROP
{
protected:
::rtl::OUString m_Password;
// OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
// OPropertySetHelper
virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
public:
OUserExtend(OAdabasConnection* _pConnection);
virtual void construct();
};
}
}
#endif // _CONNECTIVITY_ADABAS_USER_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_USERS_HXX_
#define _CONNECTIVITY_ADABAS_USERS_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
namespace connectivity
{
namespace sdbcx
{
class IRefreshableUsers;
}
namespace adabas
{
class OAdabasConnection;
class OUsers : public sdbcx::OCollection
{
OAdabasConnection* m_pConnection;
connectivity::sdbcx::IRefreshableUsers* m_pParent;
public:
virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual sdbcx::ObjectType appendObject( const ::rtl::OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName);
public:
OUsers( ::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
const TStringVector &_rVector,
OAdabasConnection* _pConnection,
connectivity::sdbcx::IRefreshableUsers* _pParent) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector)
,m_pConnection(_pConnection)
,m_pParent(_pParent)
{}
};
}
}
#endif // _CONNECTIVITY_ADABAS_USERS_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_VIEWS_HXX_
#define _CONNECTIVITY_ADABAS_VIEWS_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
namespace connectivity
{
namespace adabas
{
class OViews : public sdbcx::OCollection
{
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
sal_Bool m_bInDrop;
// OCatalog* m_pParent;
protected:
virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const ::rtl::OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName);
void createView( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
public:
OViews(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
const TStringVector &_rVector) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector)
,m_xMetaData(_rMetaData)
,m_bInDrop(sal_False)
{}
// only the name is identical to ::cppu::OComponentHelper
virtual void SAL_CALL disposing(void);
void dropByNameImpl(const ::rtl::OUString& elementName);
};
}
}
#endif // _CONNECTIVITY_ADABAS_VIEWS_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _CONNECTIVITY_ADABAS_INDEXCOLUMNS_HXX_
#define _CONNECTIVITY_ADABAS_INDEXCOLUMNS_HXX_
#include "adabas/BColumns.hxx"
namespace connectivity
{
namespace adabas
{
class OIndexColumns : public OColumns
{
protected:
virtual ::com::sun::star::uno::Reference< starcontainer::XNamed > createObject(const ::rtl::OUString& _rName);
virtual ::com::sun::star::uno::Reference< starbeans::XPropertySet > createDescriptor();
public:
OIndexColumns( ::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
const TStringVector &_rVector,
OTable* _pTable,
connectivity::sdbcx::IRefreshableColumns* _pParent)
: OColumns(_rParent,_rMutex,_rVector,_pTable,_pParent)
{
}
};
}
}
#endif // _CONNECTIVITY_ADABAS_INDEXCOLUMNS_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment