xref: /aoo4110/main/dbaccess/source/core/inc/View.hxx (revision b1cdbd2c)
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 #ifndef DBACCESS_VIEW_HXX
25 #define DBACCESS_VIEW_HXX
26 
27 #include "connectivity/sdbcx/VView.hxx"
28 
29 /** === begin UNO includes === **/
30 #include <com/sun/star/sdbcx/XAlterView.hpp>
31 #include <com/sun/star/sdb/tools/XViewAccess.hpp>
32 /** === end UNO includes === **/
33 
34 #include <comphelper/uno3.hxx>
35 #include <cppuhelper/implbase1.hxx>
36 
37 //........................................................................
38 namespace dbaccess
39 {
40 //........................................................................
41 
42 	//====================================================================
43 	//= View
44 	//====================================================================
45     typedef ::connectivity::sdbcx::OView                                View_Base;
46     typedef ::cppu::ImplHelper1< ::com::sun::star::sdbcx::XAlterView >  View_IBASE;
47     class View :public View_Base
48                 ,public View_IBASE
49 	{
50     public:
51         View(
52             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
53             sal_Bool _bCaseSensitive,
54             const ::rtl::OUString& _rCatalogName,
55             const ::rtl::OUString& _rSchemaName,
56             const ::rtl::OUString& _rName
57         );
58 
59         // UNO
60         DECLARE_XINTERFACE()
61         DECLARE_XTYPEPROVIDER()
62 
63         // XAlterView
64         virtual void SAL_CALL alterCommand( const ::rtl::OUString& NewCommand ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
65 
66     protected:
67         virtual ~View();
68 
69     protected:
70         // OPropertyContainer
71         virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& _rValue, sal_Int32 _nHandle ) const;
72 
73     private:
74          ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XViewAccess>     m_xViewAccess;
75         sal_Int32       m_nCommandHandle;
76     private:
77         using View_Base::getFastPropertyValue;
78 	};
79 
80 //........................................................................
81 } // namespace dbaccess
82 //........................................................................
83 
84 #endif // DBACCESS_VIEW_HXX
85