merge the formfield patch from ooo-build
[ooovba.git] / ucb / source / cacher / cacheddynamicresultset.hxx
blob3a99962e9141997acdeeda1927346e1cf5d87745
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cacheddynamicresultset.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CACHED_DYNAMIC_RESULTSET_HXX
32 #define _CACHED_DYNAMIC_RESULTSET_HXX
34 #include <dynamicresultsetwrapper.hxx>
35 #include <com/sun/star/ucb/XContentIdentifierMapping.hpp>
36 #include <com/sun/star/ucb/XCachedDynamicResultSetFactory.hpp>
38 #define CACHED_DRS_SERVICE_NAME "com.sun.star.ucb.CachedDynamicResultSet"
39 #define CACHED_DRS_FACTORY_NAME "com.sun.star.ucb.CachedDynamicResultSetFactory"
41 //=========================================================================
43 class CachedDynamicResultSet
44 : public DynamicResultSetWrapper
45 , public com::sun::star::lang::XTypeProvider
46 , public com::sun::star::lang::XServiceInfo
48 com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifierMapping >
49 m_xContentIdentifierMapping;
51 protected:
52 virtual void SAL_CALL
53 impl_InitResultSetOne( const com::sun::star::uno::Reference<
54 com::sun::star::sdbc::XResultSet >& xResultSet );
55 virtual void SAL_CALL
56 impl_InitResultSetTwo( const com::sun::star::uno::Reference<
57 com::sun::star::sdbc::XResultSet >& xResultSet );
59 public:
60 CachedDynamicResultSet( com::sun::star::uno::Reference<
61 com::sun::star::ucb::XDynamicResultSet > xOrigin
62 , const com::sun::star::uno::Reference<
63 com::sun::star::ucb::XContentIdentifierMapping > & xContentMapping
64 , const com::sun::star::uno::Reference<
65 com::sun::star::lang::XMultiServiceFactory > & xSMgr );
67 virtual ~CachedDynamicResultSet();
70 //-----------------------------------------------------------------
71 // XInterface inherited
72 //-----------------------------------------------------------------
73 XINTERFACE_DECL()
74 //-----------------------------------------------------------------
75 // XTypeProvider
76 //-----------------------------------------------------------------
77 XTYPEPROVIDER_DECL()
78 //-----------------------------------------------------------------
79 // XServiceInfo
80 //-----------------------------------------------------------------
81 XSERVICEINFO_NOFACTORY_DECL()
83 //-----------------------------------------------------------------
84 // own methods ( inherited )
85 //-----------------------------------------------------------------
86 virtual void SAL_CALL
87 impl_disposing( const com::sun::star::lang::EventObject& Source )
88 throw( com::sun::star::uno::RuntimeException );
91 //=========================================================================
93 class CachedDynamicResultSetFactory
94 : public cppu::OWeakObject
95 , public com::sun::star::lang::XTypeProvider
96 , public com::sun::star::lang::XServiceInfo
97 , public com::sun::star::ucb::XCachedDynamicResultSetFactory
99 protected:
100 com::sun::star::uno::Reference<
101 com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
103 public:
105 CachedDynamicResultSetFactory(
106 const com::sun::star::uno::Reference<
107 com::sun::star::lang::XMultiServiceFactory > & rSMgr);
109 virtual ~CachedDynamicResultSetFactory();
111 //-----------------------------------------------------------------
112 // XInterface
113 XINTERFACE_DECL()
115 //-----------------------------------------------------------------
116 // XTypeProvider
117 XTYPEPROVIDER_DECL()
119 //-----------------------------------------------------------------
120 // XServiceInfo
121 XSERVICEINFO_DECL()
123 //-----------------------------------------------------------------
124 // XCachedDynamicResultSetFactory
126 virtual com::sun::star::uno::Reference<
127 com::sun::star::ucb::XDynamicResultSet > SAL_CALL
128 createCachedDynamicResultSet(
129 const com::sun::star::uno::Reference<
130 com::sun::star::ucb::XDynamicResultSet > &
131 SourceStub
132 , const com::sun::star::uno::Reference<
133 com::sun::star::ucb::XContentIdentifierMapping > &
134 ContentIdentifierMapping
136 throw( com::sun::star::uno::RuntimeException );
139 #endif