1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cacheddynamicresultset.hxx,v $
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
;
53 impl_InitResultSetOne( const com::sun::star::uno::Reference
<
54 com::sun::star::sdbc::XResultSet
>& xResultSet
);
56 impl_InitResultSetTwo( const com::sun::star::uno::Reference
<
57 com::sun::star::sdbc::XResultSet
>& xResultSet
);
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 //-----------------------------------------------------------------
74 //-----------------------------------------------------------------
76 //-----------------------------------------------------------------
78 //-----------------------------------------------------------------
80 //-----------------------------------------------------------------
81 XSERVICEINFO_NOFACTORY_DECL()
83 //-----------------------------------------------------------------
84 // own methods ( inherited )
85 //-----------------------------------------------------------------
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
100 com::sun::star::uno::Reference
<
101 com::sun::star::lang::XMultiServiceFactory
> m_xSMgr
;
105 CachedDynamicResultSetFactory(
106 const com::sun::star::uno::Reference
<
107 com::sun::star::lang::XMultiServiceFactory
> & rSMgr
);
109 virtual ~CachedDynamicResultSetFactory();
111 //-----------------------------------------------------------------
115 //-----------------------------------------------------------------
119 //-----------------------------------------------------------------
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
> &
132 , const com::sun::star::uno::Reference
<
133 com::sun::star::ucb::XContentIdentifierMapping
> &
134 ContentIdentifierMapping
136 throw( com::sun::star::uno::RuntimeException
);