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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_ftp.hxx"
26 #include <com/sun/star/sdbc/XResultSet.hpp>
27 #ifndef _FTP_FTPDYNRESULTSET_HXX_
28 #include "ftpdynresultset.hxx"
29 #endif
30 #include "ftpresultsetfactory.hxx"
31 
32 using namespace com::sun::star::lang;
33 using namespace com::sun::star::sdbc;
34 using namespace com::sun::star::ucb;
35 using namespace com::sun::star::uno;
36 
37 
38 using namespace ftp;
39 
40 //=========================================================================
41 //=========================================================================
42 //
43 // DynamicResultSet Implementation.
44 //
45 //=========================================================================
46 //=========================================================================
47 
DynamicResultSet(const Reference<XMultiServiceFactory> & rxSMgr,const rtl::Reference<FTPContent> & rxContent,const OpenCommandArgument2 & rCommand,const Reference<XCommandEnvironment> & rxEnv,ResultSetFactory * pFactory)48 DynamicResultSet::DynamicResultSet(
49 	const Reference< XMultiServiceFactory >& rxSMgr,
50 	const rtl::Reference< FTPContent >& rxContent,
51 	const OpenCommandArgument2& rCommand,
52 	const Reference< XCommandEnvironment >& rxEnv,
53 	ResultSetFactory* pFactory )
54 	: ResultSetImplHelper( rxSMgr, rCommand ),
55 	  m_xContent( rxContent ),
56 	  m_xEnv( rxEnv ),
57 	  m_pFactory( pFactory )
58 {
59 }
60 
~DynamicResultSet()61 DynamicResultSet::~DynamicResultSet()
62 {
63 	delete m_pFactory;
64 }
65 
66 //=========================================================================
67 //
68 // Non-interface methods.
69 //
70 //=========================================================================
71 
initStatic()72 void DynamicResultSet::initStatic()
73 {
74 	m_xResultSet1 = Reference< XResultSet >( m_pFactory->createResultSet() );
75 }
76 
77 //=========================================================================
initDynamic()78 void DynamicResultSet::initDynamic()
79 {
80 	m_xResultSet1 = Reference< XResultSet >( m_pFactory->createResultSet() );
81 
82 	m_xResultSet2 = m_xResultSet1;
83 }
84 
85 
86 
87 
88