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: cacheddynamicresultsetstub.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_STUB_HXX
32 #define _CACHED_DYNAMIC_RESULTSET_STUB_HXX
34 #include <dynamicresultsetwrapper.hxx>
35 #include <com/sun/star/ucb/XCachedDynamicResultSetStubFactory.hpp>
37 #define CACHED_DRS_STUB_SERVICE_NAME "com.sun.star.ucb.CachedDynamicResultSetStub"
38 #define CACHED_DRS_STUB_FACTORY_NAME "com.sun.star.ucb.CachedDynamicResultSetStubFactory"
40 //=========================================================================
42 class CachedDynamicResultSetStub
43 : public DynamicResultSetWrapper
44 , public com::sun::star::lang::XTypeProvider
45 , public com::sun::star::lang::XServiceInfo
49 impl_InitResultSetOne( const com::sun::star::uno::Reference
<
50 com::sun::star::sdbc::XResultSet
>& xResultSet
);
52 impl_InitResultSetTwo( const com::sun::star::uno::Reference
<
53 com::sun::star::sdbc::XResultSet
>& xResultSet
);
56 CachedDynamicResultSetStub( com::sun::star::uno::Reference
<
57 com::sun::star::ucb::XDynamicResultSet
> xOrigin
58 , const com::sun::star::uno::Reference
<
59 com::sun::star::lang::XMultiServiceFactory
> & xSMgr
);
61 virtual ~CachedDynamicResultSetStub();
64 //-----------------------------------------------------------------
65 // XInterface inherited
66 //-----------------------------------------------------------------
68 //-----------------------------------------------------------------
70 //-----------------------------------------------------------------
72 //-----------------------------------------------------------------
74 //-----------------------------------------------------------------
75 XSERVICEINFO_NOFACTORY_DECL()
78 //=========================================================================
80 class CachedDynamicResultSetStubFactory
81 : public cppu::OWeakObject
82 , public com::sun::star::lang::XTypeProvider
83 , public com::sun::star::lang::XServiceInfo
84 , public com::sun::star::ucb::XCachedDynamicResultSetStubFactory
87 com::sun::star::uno::Reference
<
88 com::sun::star::lang::XMultiServiceFactory
> m_xSMgr
;
92 CachedDynamicResultSetStubFactory(
93 const com::sun::star::uno::Reference
<
94 com::sun::star::lang::XMultiServiceFactory
> & rSMgr
);
96 virtual ~CachedDynamicResultSetStubFactory();
98 //-----------------------------------------------------------------
102 //-----------------------------------------------------------------
106 //-----------------------------------------------------------------
110 //-----------------------------------------------------------------
111 // XCachedDynamicResultSetStubFactory
113 virtual com::sun::star::uno::Reference
<
114 com::sun::star::ucb::XDynamicResultSet
> SAL_CALL
115 createCachedDynamicResultSetStub(
116 const com::sun::star::uno::Reference
<
117 com::sun::star::ucb::XDynamicResultSet
> & Source
)
118 throw( com::sun::star::uno::RuntimeException
);
121 virtual void SAL_CALL
connectToCache(
122 const com::sun::star::uno::Reference
<
123 com::sun::star::ucb::XDynamicResultSet
> & Source
124 , const com::sun::star::uno::Reference
<
125 com::sun::star::ucb::XDynamicResultSet
> & TargetCache
126 , const com::sun::star::uno::Sequence
<
127 com::sun::star::ucb::NumberedSortingInfo
> & SortingInfo
128 , const com::sun::star::uno::Reference
<
129 com::sun::star::ucb::XAnyCompareFactory
> & CompareFactory
132 com::sun::star::ucb::ListenerAlreadySetException
133 , com::sun::star::ucb::AlreadyInitializedException
134 , com::sun::star::uno::RuntimeException