1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef CONNECTIVITY_HSQLDB_CATALOG_HXX
28 #define CONNECTIVITY_HSQLDB_CATALOG_HXX
29 
30 #include "connectivity/sdbcx/VCatalog.hxx"
31 #include "connectivity/StdTypeDefs.hxx"
32 
33 namespace connectivity
34 {
35 	namespace hsqldb
36 	{
37 		// please don't name the class the same name as in an other namespaces
38 		// some compilers have problems with this task as I noticed on windows
39 		class OHCatalog : public connectivity::sdbcx::OCatalog
40 		{
41 			::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
42 
43 			/** calls XDatabaseMetaData::getTables.
44 				@param	_sKindOfObject
45 					The type of tables to be fetched.
46 				@param	_rNames
47 					The container for the names to be filled.
48 			*/
49 			void refreshObjects(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _sKindOfObject,TStringVector& _rNames);
50 
51 		public:
52 			// implementation of the pure virtual methods
53 			virtual void refreshTables();
54 			virtual void refreshViews()	;
55 			virtual void refreshGroups();
56 			virtual void refreshUsers()	;
57 
58 		public:
59 			OHCatalog(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection);
60 
61 			inline sdbcx::OCollection*		getPrivateTables()	const { return m_pTables;}
62 			inline sdbcx::OCollection*		getPrivateViews()	const { return m_pViews; }
63 			inline ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() const { return m_xConnection; }
64 
65 			virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
66 			// ::cppu::OComponentHelper
67 			virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
68 		};
69 	}
70 }
71 #endif // CONNECTIVITY_HSQLDB_CATALOG_HXX
72 
73