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 #ifndef CONNECTIVITY_HSQLDB_CATALOG_HXX
24 #define CONNECTIVITY_HSQLDB_CATALOG_HXX
25 
26 #include "connectivity/sdbcx/VCatalog.hxx"
27 #include "connectivity/StdTypeDefs.hxx"
28 
29 namespace connectivity
30 {
31 	namespace hsqldb
32 	{
33 		// please don't name the class the same name as in an other namespaces
34 		// some compilers have problems with this task as I noticed on windows
35 		class OHCatalog : public connectivity::sdbcx::OCatalog
36 		{
37 			::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
38 
39 			/** calls XDatabaseMetaData::getTables.
40 				@param	_sKindOfObject
41 					The type of tables to be fetched.
42 				@param	_rNames
43 					The container for the names to be filled.
44 			*/
45 			void refreshObjects(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _sKindOfObject,TStringVector& _rNames);
46 
47 		public:
48 			// implementation of the pure virtual methods
49 			virtual void refreshTables();
50 			virtual void refreshViews()	;
51 			virtual void refreshGroups();
52 			virtual void refreshUsers()	;
53 
54 		public:
55 			OHCatalog(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection);
56 
getPrivateTables() const57 			inline sdbcx::OCollection*		getPrivateTables()	const { return m_pTables;}
getPrivateViews() const58 			inline sdbcx::OCollection*		getPrivateViews()	const { return m_pViews; }
getConnection() const59 			inline ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() const { return m_xConnection; }
60 
61 			virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
62 			// ::cppu::OComponentHelper
63 			virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
64 		};
65 	}
66 }
67 #endif // CONNECTIVITY_HSQLDB_CATALOG_HXX
68 
69