blob: 06c2047ea33da2fd8cac02c9d034cdbf74bf59cf [file] [log] [blame]
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_connectivity.hxx"
#include "file/FTables.hxx"
#include "file/FTable.hxx"
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/KeyRule.hpp>
#include <com/sun/star/sdbcx/KeyType.hpp>
#include "file/FCatalog.hxx"
#ifndef _CONNECTIVITY_FILE_BCONNECTION_HXX_
#include "file/FConnection.hxx"
#endif
//#ifndef _CONNECTIVITY_FILE_OEMPTYCOLLECTION_HXX_
//#include "file/FEmptyCollection.hxx"
//#endif
using namespace connectivity;
using namespace connectivity::file;
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;
namespace starutil = ::com::sun::star::util;
typedef connectivity::sdbcx::OCollection OCollection_TYPE;
sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& /*_rName*/)
{
return sdbcx::ObjectType();
}
// -------------------------------------------------------------------------
void OTables::impl_refresh( ) throw(RuntimeException)
{
static_cast<OFileCatalog&>(m_rParent).refreshTables();
}
// -------------------------------------------------------------------------
void OTables::disposing(void)
{
m_xMetaData.clear();
OCollection::disposing();
}
//------------------------------------------------------------------
Any SAL_CALL OTables::queryInterface( const Type & rType ) throw(RuntimeException)
{
if( rType == ::getCppuType((const Reference<XColumnLocate>*)0) ||
rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0) ||
rType == ::getCppuType((const Reference<XAppend>*)0) ||
rType == ::getCppuType((const Reference<XDrop>*)0))
return Any();
typedef sdbcx::OCollection OTables_BASE;
return OTables_BASE::queryInterface(rType);
}
// -----------------------------------------------------------------------------