1*caf5cd79SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*caf5cd79SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*caf5cd79SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*caf5cd79SAndrew Rist  * distributed with this work for additional information
6*caf5cd79SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*caf5cd79SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*caf5cd79SAndrew Rist  * "License"); you may not use this file except in compliance
9*caf5cd79SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*caf5cd79SAndrew Rist  *
11*caf5cd79SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*caf5cd79SAndrew Rist  *
13*caf5cd79SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*caf5cd79SAndrew Rist  * software distributed under the License is distributed on an
15*caf5cd79SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*caf5cd79SAndrew Rist  * KIND, either express or implied.  See the License for the
17*caf5cd79SAndrew Rist  * specific language governing permissions and limitations
18*caf5cd79SAndrew Rist  * under the License.
19*caf5cd79SAndrew Rist  *
20*caf5cd79SAndrew Rist  *************************************************************/
21*caf5cd79SAndrew Rist 
22*caf5cd79SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef CONNECTIVITY_HVIEW_HXX
25cdf0e10cSrcweir #define CONNECTIVITY_HVIEW_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "connectivity/sdbcx/VView.hxx"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir /** === begin UNO includes === **/
30cdf0e10cSrcweir #include <com/sun/star/sdbcx/XAlterView.hpp>
31cdf0e10cSrcweir /** === end UNO includes === **/
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #include <comphelper/uno3.hxx>
34cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir //........................................................................
37cdf0e10cSrcweir namespace connectivity { namespace hsqldb
38cdf0e10cSrcweir {
39cdf0e10cSrcweir //........................................................................
40cdf0e10cSrcweir 
41cdf0e10cSrcweir 	//====================================================================
42cdf0e10cSrcweir 	//= HView
43cdf0e10cSrcweir 	//====================================================================
44cdf0e10cSrcweir     typedef ::connectivity::sdbcx::OView                                HView_Base;
45cdf0e10cSrcweir     typedef ::cppu::ImplHelper1< ::com::sun::star::sdbcx::XAlterView >  HView_IBASE;
46cdf0e10cSrcweir     class HView :public HView_Base
47cdf0e10cSrcweir                 ,public HView_IBASE
48cdf0e10cSrcweir 	{
49cdf0e10cSrcweir     public:
50cdf0e10cSrcweir         HView(
51cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
52cdf0e10cSrcweir             sal_Bool _bCaseSensitive,
53cdf0e10cSrcweir             const ::rtl::OUString& _rSchemaName,
54cdf0e10cSrcweir             const ::rtl::OUString& _rName
55cdf0e10cSrcweir         );
56cdf0e10cSrcweir 
57cdf0e10cSrcweir         // UNO
58cdf0e10cSrcweir         DECLARE_XINTERFACE()
59cdf0e10cSrcweir         DECLARE_XTYPEPROVIDER()
60cdf0e10cSrcweir 
61cdf0e10cSrcweir         // XAlterView
62cdf0e10cSrcweir         virtual void SAL_CALL alterCommand( const ::rtl::OUString& NewCommand ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
63cdf0e10cSrcweir 
64cdf0e10cSrcweir     protected:
65cdf0e10cSrcweir         virtual ~HView();
66cdf0e10cSrcweir 
67cdf0e10cSrcweir     protected:
68cdf0e10cSrcweir         // OPropertyContainer
69cdf0e10cSrcweir         virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& _rValue, sal_Int32 _nHandle ) const;
70cdf0e10cSrcweir 
71cdf0e10cSrcweir     private:
72cdf0e10cSrcweir         /** retrieves the current command of the View
73cdf0e10cSrcweir 
74cdf0e10cSrcweir             @throws ::com::sun::star::lang::WrappedTargetException
75cdf0e10cSrcweir                 if an error occurs while retrieving the command from the database and
76cdf0e10cSrcweir                 <arg>_bAllowSQLExceptin</arg> is <FALSE/>
77cdf0e10cSrcweir             @throws ::com::sun::star::sdbc::SQLException
78cdf0e10cSrcweir                 if an error occurs while retrieving the command from the database and
79cdf0e10cSrcweir                 <arg>_bAllowSQLException</arg> is <TRUE/>
80cdf0e10cSrcweir         */
81cdf0e10cSrcweir         ::rtl::OUString impl_getCommand_throw( bool _bAllowSQLException ) const;
82cdf0e10cSrcweir 
83cdf0e10cSrcweir     private:
84cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
85cdf0e10cSrcweir     private:
86cdf0e10cSrcweir         using HView_Base::getFastPropertyValue;
87cdf0e10cSrcweir 	};
88cdf0e10cSrcweir 
89cdf0e10cSrcweir //........................................................................
90cdf0e10cSrcweir } } // namespace connectivity::hsqldb
91cdf0e10cSrcweir //........................................................................
92cdf0e10cSrcweir 
93cdf0e10cSrcweir #endif // CONNECTIVITY_HVIEW_HXX
94