1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef _CACHED_DYNAMIC_RESULTSET_HXX
29 #define _CACHED_DYNAMIC_RESULTSET_HXX
31 #include <dynamicresultsetwrapper.hxx>
32 #include <com/sun/star/ucb/XContentIdentifierMapping.hpp>
33 #include <com/sun/star/ucb/XCachedDynamicResultSetFactory.hpp>
35 #define CACHED_DRS_SERVICE_NAME "com.sun.star.ucb.CachedDynamicResultSet"
36 #define CACHED_DRS_FACTORY_NAME "com.sun.star.ucb.CachedDynamicResultSetFactory"
38 //=========================================================================
40 class CachedDynamicResultSet
41 : public DynamicResultSetWrapper
42 , public com::sun::star::lang::XTypeProvider
43 , public com::sun::star::lang::XServiceInfo
45 com::sun::star::uno::Reference
< com::sun::star::ucb::XContentIdentifierMapping
>
46 m_xContentIdentifierMapping
;
50 impl_InitResultSetOne( const com::sun::star::uno::Reference
<
51 com::sun::star::sdbc::XResultSet
>& xResultSet
);
53 impl_InitResultSetTwo( const com::sun::star::uno::Reference
<
54 com::sun::star::sdbc::XResultSet
>& xResultSet
);
57 CachedDynamicResultSet( com::sun::star::uno::Reference
<
58 com::sun::star::ucb::XDynamicResultSet
> xOrigin
59 , const com::sun::star::uno::Reference
<
60 com::sun::star::ucb::XContentIdentifierMapping
> & xContentMapping
61 , const com::sun::star::uno::Reference
<
62 com::sun::star::lang::XMultiServiceFactory
> & xSMgr
);
64 virtual ~CachedDynamicResultSet();
67 //-----------------------------------------------------------------
68 // XInterface inherited
69 //-----------------------------------------------------------------
71 //-----------------------------------------------------------------
73 //-----------------------------------------------------------------
75 //-----------------------------------------------------------------
77 //-----------------------------------------------------------------
78 XSERVICEINFO_NOFACTORY_DECL()
80 //-----------------------------------------------------------------
81 // own methods ( inherited )
82 //-----------------------------------------------------------------
84 impl_disposing( const com::sun::star::lang::EventObject
& Source
)
85 throw( com::sun::star::uno::RuntimeException
);
88 //=========================================================================
90 class CachedDynamicResultSetFactory
91 : public cppu::OWeakObject
92 , public com::sun::star::lang::XTypeProvider
93 , public com::sun::star::lang::XServiceInfo
94 , public com::sun::star::ucb::XCachedDynamicResultSetFactory
97 com::sun::star::uno::Reference
<
98 com::sun::star::lang::XMultiServiceFactory
> m_xSMgr
;
102 CachedDynamicResultSetFactory(
103 const com::sun::star::uno::Reference
<
104 com::sun::star::lang::XMultiServiceFactory
> & rSMgr
);
106 virtual ~CachedDynamicResultSetFactory();
108 //-----------------------------------------------------------------
112 //-----------------------------------------------------------------
116 //-----------------------------------------------------------------
120 //-----------------------------------------------------------------
121 // XCachedDynamicResultSetFactory
123 virtual com::sun::star::uno::Reference
<
124 com::sun::star::ucb::XDynamicResultSet
> SAL_CALL
125 createCachedDynamicResultSet(
126 const com::sun::star::uno::Reference
<
127 com::sun::star::ucb::XDynamicResultSet
> &
129 , const com::sun::star::uno::Reference
<
130 com::sun::star::ucb::XContentIdentifierMapping
> &
131 ContentIdentifierMapping
133 throw( com::sun::star::uno::RuntimeException
);