1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_connectivity.hxx" 26 #include "file/FTables.hxx" 27 #include "file/FTable.hxx" 28 #include <com/sun/star/sdbc/XRow.hpp> 29 #include <com/sun/star/sdbc/XResultSet.hpp> 30 #include <com/sun/star/sdbc/ColumnValue.hpp> 31 #include <com/sun/star/sdbc/KeyRule.hpp> 32 #include <com/sun/star/sdbcx/KeyType.hpp> 33 #include "file/FCatalog.hxx" 34 #ifndef _CONNECTIVITY_FILE_BCONNECTION_HXX_ 35 #include "file/FConnection.hxx" 36 #endif 37 //#ifndef _CONNECTIVITY_FILE_OEMPTYCOLLECTION_HXX_ 38 //#include "file/FEmptyCollection.hxx" 39 //#endif 40 41 using namespace connectivity; 42 using namespace connectivity::file; 43 using namespace ::com::sun::star::uno; 44 using namespace ::com::sun::star::beans; 45 using namespace ::com::sun::star::sdbcx; 46 using namespace ::com::sun::star::sdbc; 47 using namespace ::com::sun::star::container; 48 49 namespace starutil = ::com::sun::star::util; 50 typedef connectivity::sdbcx::OCollection OCollection_TYPE; 51 createObject(const::rtl::OUString &)52sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& /*_rName*/) 53 { 54 return sdbcx::ObjectType(); 55 } 56 // ------------------------------------------------------------------------- impl_refresh()57void OTables::impl_refresh( ) throw(RuntimeException) 58 { 59 static_cast<OFileCatalog&>(m_rParent).refreshTables(); 60 } 61 // ------------------------------------------------------------------------- disposing(void)62void OTables::disposing(void) 63 { 64 m_xMetaData.clear(); 65 OCollection::disposing(); 66 } 67 //------------------------------------------------------------------ queryInterface(const Type & rType)68Any SAL_CALL OTables::queryInterface( const Type & rType ) throw(RuntimeException) 69 { 70 if( rType == ::getCppuType((const Reference<XColumnLocate>*)0) || 71 rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0) || 72 rType == ::getCppuType((const Reference<XAppend>*)0) || 73 rType == ::getCppuType((const Reference<XDrop>*)0)) 74 return Any(); 75 76 typedef sdbcx::OCollection OTables_BASE; 77 return OTables_BASE::queryInterface(rType); 78 } 79 // ----------------------------------------------------------------------------- 80