xref: /AOO41X/main/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  *  The Contents of this file are made available subject to the terms of
4*cdf0e10cSrcweir  *  the BSD license.
5*cdf0e10cSrcweir  *
6*cdf0e10cSrcweir  *  Copyright 2000, 2010 Oracle and/or its affiliates.
7*cdf0e10cSrcweir  *  All rights reserved.
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  *  Redistribution and use in source and binary forms, with or without
10*cdf0e10cSrcweir  *  modification, are permitted provided that the following conditions
11*cdf0e10cSrcweir  *  are met:
12*cdf0e10cSrcweir  *  1. Redistributions of source code must retain the above copyright
13*cdf0e10cSrcweir  *     notice, this list of conditions and the following disclaimer.
14*cdf0e10cSrcweir  *  2. Redistributions in binary form must reproduce the above copyright
15*cdf0e10cSrcweir  *     notice, this list of conditions and the following disclaimer in the
16*cdf0e10cSrcweir  *     documentation and/or other materials provided with the distribution.
17*cdf0e10cSrcweir  *  3. Neither the name of Sun Microsystems, Inc. nor the names of its
18*cdf0e10cSrcweir  *     contributors may be used to endorse or promote products derived
19*cdf0e10cSrcweir  *     from this software without specific prior written permission.
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22*cdf0e10cSrcweir  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23*cdf0e10cSrcweir  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24*cdf0e10cSrcweir  *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25*cdf0e10cSrcweir  *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26*cdf0e10cSrcweir  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27*cdf0e10cSrcweir  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28*cdf0e10cSrcweir  *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29*cdf0e10cSrcweir  *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
30*cdf0e10cSrcweir  *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
31*cdf0e10cSrcweir  *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32*cdf0e10cSrcweir  *
33*cdf0e10cSrcweir  *************************************************************************/
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir #include "SResultSet.hxx"
36*cdf0e10cSrcweir #include "SResultSetMetaData.hxx"
37*cdf0e10cSrcweir #include <com/sun/star/sdbc/DataType.hpp>
38*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
39*cdf0e10cSrcweir #include <com/sun/star/sdbcx/CompareBookmark.hpp>
40*cdf0e10cSrcweir #include <cppuhelper/typeprovider.hxx>
41*cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp>
42*cdf0e10cSrcweir #include "propertyids.hxx"
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir using namespace connectivity::skeleton;
45*cdf0e10cSrcweir using namespace cppu;
46*cdf0e10cSrcweir using namespace com::sun::star::uno;
47*cdf0e10cSrcweir using namespace com::sun::star::lang;
48*cdf0e10cSrcweir using namespace com::sun::star::beans;
49*cdf0e10cSrcweir using namespace com::sun::star::sdbc;
50*cdf0e10cSrcweir using namespace com::sun::star::sdbcx;
51*cdf0e10cSrcweir using namespace com::sun::star::container;
52*cdf0e10cSrcweir using namespace com::sun::star::io;
53*cdf0e10cSrcweir using namespace com::sun::star::util;
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir //------------------------------------------------------------------------------
56*cdf0e10cSrcweir //	IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet");
57*cdf0e10cSrcweir ::rtl::OUString SAL_CALL OResultSet::getImplementationName(  ) throw ( RuntimeException)	\
58*cdf0e10cSrcweir {
59*cdf0e10cSrcweir 	return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.skeleton.ResultSet");
60*cdf0e10cSrcweir }
61*cdf0e10cSrcweir // -------------------------------------------------------------------------
62*cdf0e10cSrcweir  Sequence< ::rtl::OUString > SAL_CALL OResultSet::getSupportedServiceNames(  ) throw( RuntimeException)
63*cdf0e10cSrcweir {
64*cdf0e10cSrcweir 	 Sequence< ::rtl::OUString > aSupported(2);
65*cdf0e10cSrcweir 	aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet");
66*cdf0e10cSrcweir 	aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.ResultSet");
67*cdf0e10cSrcweir 	return aSupported;
68*cdf0e10cSrcweir }
69*cdf0e10cSrcweir // -------------------------------------------------------------------------
70*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::supportsService( const ::rtl::OUString& _rServiceName ) throw( RuntimeException)
71*cdf0e10cSrcweir {
72*cdf0e10cSrcweir 	Sequence< ::rtl::OUString > aSupported(getSupportedServiceNames());
73*cdf0e10cSrcweir 	const ::rtl::OUString* pSupported = aSupported.getConstArray();
74*cdf0e10cSrcweir 	const ::rtl::OUString* pEnd = pSupported + aSupported.getLength();
75*cdf0e10cSrcweir 	for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
76*cdf0e10cSrcweir 		;
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir 	return pSupported != pEnd;
79*cdf0e10cSrcweir }
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir // -------------------------------------------------------------------------
82*cdf0e10cSrcweir OResultSet::OResultSet(OStatement_Base* pStmt)
83*cdf0e10cSrcweir 	: OResultSet_BASE(m_aMutex)
84*cdf0e10cSrcweir 	,OPropertySetHelper(OResultSet_BASE::rBHelper)
85*cdf0e10cSrcweir 	,m_aStatement((OWeakObject*)pStmt)
86*cdf0e10cSrcweir 	,m_xMetaData(NULL)
87*cdf0e10cSrcweir 	,m_nTextEncoding(pStmt->getOwnConnection()->getTextEncoding())
88*cdf0e10cSrcweir 	,m_pStatement(pStmt)
89*cdf0e10cSrcweir 	,m_bWasNull(sal_True)
90*cdf0e10cSrcweir {
91*cdf0e10cSrcweir }
92*cdf0e10cSrcweir // -------------------------------------------------------------------------
93*cdf0e10cSrcweir OResultSet::~OResultSet()
94*cdf0e10cSrcweir {
95*cdf0e10cSrcweir }
96*cdf0e10cSrcweir // -------------------------------------------------------------------------
97*cdf0e10cSrcweir void OResultSet::disposing(void)
98*cdf0e10cSrcweir {
99*cdf0e10cSrcweir 	OPropertySetHelper::disposing();
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir 	::osl::MutexGuard aGuard(m_aMutex);
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir 	m_aStatement	= NULL;
104*cdf0e10cSrcweir 	m_xMetaData		= NULL;
105*cdf0e10cSrcweir }
106*cdf0e10cSrcweir // -------------------------------------------------------------------------
107*cdf0e10cSrcweir Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeException)
108*cdf0e10cSrcweir {
109*cdf0e10cSrcweir 	Any aRet = OPropertySetHelper::queryInterface(rType);
110*cdf0e10cSrcweir 	if(!aRet.hasValue())
111*cdf0e10cSrcweir 		aRet = OResultSet_BASE::queryInterface(rType);
112*cdf0e10cSrcweir 	return aRet;
113*cdf0e10cSrcweir }
114*cdf0e10cSrcweir // -------------------------------------------------------------------------
115*cdf0e10cSrcweir  Sequence<  Type > SAL_CALL OResultSet::getTypes(  ) throw( RuntimeException)
116*cdf0e10cSrcweir {
117*cdf0e10cSrcweir 	OTypeCollection aTypes(
118*cdf0e10cSrcweir         ::cppu::UnoType< Reference< ::com::sun::star::beans::XMultiPropertySet > >::get(),
119*cdf0e10cSrcweir         ::cppu::UnoType< Reference< ::com::sun::star::beans::XFastPropertySet > >::get(),
120*cdf0e10cSrcweir         ::cppu::UnoType< Reference< ::com::sun::star::beans::XPropertySet > >::get());
121*cdf0e10cSrcweir 
122*cdf0e10cSrcweir 	return concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes());
123*cdf0e10cSrcweir }
124*cdf0e10cSrcweir // -------------------------------------------------------------------------
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir sal_Int32 SAL_CALL OResultSet::findColumn( const ::rtl::OUString& columnName ) throw(SQLException, RuntimeException)
127*cdf0e10cSrcweir {
128*cdf0e10cSrcweir 
129*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir 	// find the first column with the name columnName
132*cdf0e10cSrcweir 
133*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir 	Reference< XResultSetMetaData > xMeta = getMetaData();
136*cdf0e10cSrcweir 	sal_Int32 nLen = xMeta->getColumnCount();
137*cdf0e10cSrcweir 	sal_Int32 i = 1;
138*cdf0e10cSrcweir 	for(;i<=nLen;++i)
139*cdf0e10cSrcweir 		if(xMeta->isCaseSensitive(i) ? columnName == xMeta->getColumnName(i) :
140*cdf0e10cSrcweir 				columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(i)))
141*cdf0e10cSrcweir 			break;
142*cdf0e10cSrcweir 	return i;
143*cdf0e10cSrcweir }
144*cdf0e10cSrcweir // -------------------------------------------------------------------------
145*cdf0e10cSrcweir Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
146*cdf0e10cSrcweir {
147*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
148*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir 
151*cdf0e10cSrcweir 	return NULL;
152*cdf0e10cSrcweir }
153*cdf0e10cSrcweir // -------------------------------------------------------------------------
154*cdf0e10cSrcweir Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
155*cdf0e10cSrcweir {
156*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
157*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir 
160*cdf0e10cSrcweir 	return NULL;
161*cdf0e10cSrcweir }
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir // -------------------------------------------------------------------------
164*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
165*cdf0e10cSrcweir {
166*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
167*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir 	return sal_False;
170*cdf0e10cSrcweir }
171*cdf0e10cSrcweir // -------------------------------------------------------------------------
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
174*cdf0e10cSrcweir {
175*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
176*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir 	sal_Int8 nRet = 0;
180*cdf0e10cSrcweir 	return nRet;
181*cdf0e10cSrcweir }
182*cdf0e10cSrcweir // -------------------------------------------------------------------------
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
185*cdf0e10cSrcweir {
186*cdf0e10cSrcweir 
187*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
188*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir 	return Sequence< sal_Int8 >();
191*cdf0e10cSrcweir }
192*cdf0e10cSrcweir // -------------------------------------------------------------------------
193*cdf0e10cSrcweir 
194*cdf0e10cSrcweir Date SAL_CALL OResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
195*cdf0e10cSrcweir {
196*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
197*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir 
200*cdf0e10cSrcweir 	Date nRet;
201*cdf0e10cSrcweir 	return nRet;
202*cdf0e10cSrcweir }
203*cdf0e10cSrcweir // -------------------------------------------------------------------------
204*cdf0e10cSrcweir 
205*cdf0e10cSrcweir double SAL_CALL OResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
206*cdf0e10cSrcweir {
207*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
208*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 
211*cdf0e10cSrcweir 	double nRet = 0;
212*cdf0e10cSrcweir 	return nRet;
213*cdf0e10cSrcweir }
214*cdf0e10cSrcweir // -------------------------------------------------------------------------
215*cdf0e10cSrcweir 
216*cdf0e10cSrcweir float SAL_CALL OResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
217*cdf0e10cSrcweir {
218*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
219*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
220*cdf0e10cSrcweir 
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir 	float nVal(0);
223*cdf0e10cSrcweir 	return nVal;
224*cdf0e10cSrcweir }
225*cdf0e10cSrcweir // -------------------------------------------------------------------------
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
228*cdf0e10cSrcweir {
229*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
230*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir 	sal_Int32 nRet=0;
233*cdf0e10cSrcweir 	return nRet;
234*cdf0e10cSrcweir }
235*cdf0e10cSrcweir // -------------------------------------------------------------------------
236*cdf0e10cSrcweir 
237*cdf0e10cSrcweir sal_Int32 SAL_CALL OResultSet::getRow(  ) throw(SQLException, RuntimeException)
238*cdf0e10cSrcweir {
239*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
240*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir 	sal_Int32 nValue = 0;
243*cdf0e10cSrcweir 	return nValue;
244*cdf0e10cSrcweir }
245*cdf0e10cSrcweir // -------------------------------------------------------------------------
246*cdf0e10cSrcweir 
247*cdf0e10cSrcweir sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
248*cdf0e10cSrcweir {
249*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
250*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
251*cdf0e10cSrcweir 
252*cdf0e10cSrcweir 	return sal_Int64();
253*cdf0e10cSrcweir }
254*cdf0e10cSrcweir // -------------------------------------------------------------------------
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData(  ) throw(SQLException, RuntimeException)
257*cdf0e10cSrcweir {
258*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
259*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
260*cdf0e10cSrcweir 
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir 	if(!m_xMetaData.is())
263*cdf0e10cSrcweir 		m_xMetaData = new OResultSetMetaData(m_pStatement->getOwnConnection());
264*cdf0e10cSrcweir 	return m_xMetaData;
265*cdf0e10cSrcweir }
266*cdf0e10cSrcweir // -------------------------------------------------------------------------
267*cdf0e10cSrcweir Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
268*cdf0e10cSrcweir {
269*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
270*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir 	return NULL;
273*cdf0e10cSrcweir }
274*cdf0e10cSrcweir 
275*cdf0e10cSrcweir // -------------------------------------------------------------------------
276*cdf0e10cSrcweir 
277*cdf0e10cSrcweir Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
278*cdf0e10cSrcweir {
279*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
280*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
281*cdf0e10cSrcweir 
282*cdf0e10cSrcweir 	return NULL;
283*cdf0e10cSrcweir }
284*cdf0e10cSrcweir // -------------------------------------------------------------------------
285*cdf0e10cSrcweir Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
286*cdf0e10cSrcweir {
287*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
288*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
289*cdf0e10cSrcweir 
290*cdf0e10cSrcweir 	return NULL;
291*cdf0e10cSrcweir }
292*cdf0e10cSrcweir // -------------------------------------------------------------------------
293*cdf0e10cSrcweir 
294*cdf0e10cSrcweir Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
295*cdf0e10cSrcweir {
296*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
297*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
298*cdf0e10cSrcweir 
299*cdf0e10cSrcweir 	return NULL;
300*cdf0e10cSrcweir }
301*cdf0e10cSrcweir // -------------------------------------------------------------------------
302*cdf0e10cSrcweir 
303*cdf0e10cSrcweir Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
304*cdf0e10cSrcweir {
305*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
306*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir 	return Any();
309*cdf0e10cSrcweir }
310*cdf0e10cSrcweir // -------------------------------------------------------------------------
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
313*cdf0e10cSrcweir {
314*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
315*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
316*cdf0e10cSrcweir 
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir 	sal_Int16 nRet=0;
319*cdf0e10cSrcweir 	return nRet;
320*cdf0e10cSrcweir }
321*cdf0e10cSrcweir // -------------------------------------------------------------------------
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir ::rtl::OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
325*cdf0e10cSrcweir {
326*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
327*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
328*cdf0e10cSrcweir 
329*cdf0e10cSrcweir 
330*cdf0e10cSrcweir 	::rtl::OUString nRet;
331*cdf0e10cSrcweir 	return nRet;
332*cdf0e10cSrcweir }
333*cdf0e10cSrcweir // -------------------------------------------------------------------------
334*cdf0e10cSrcweir 
335*cdf0e10cSrcweir Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
336*cdf0e10cSrcweir {
337*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
338*cdf0e10cSrcweir 
339*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
340*cdf0e10cSrcweir 
341*cdf0e10cSrcweir 	Time nRet;
342*cdf0e10cSrcweir 	return nRet;
343*cdf0e10cSrcweir }
344*cdf0e10cSrcweir // -------------------------------------------------------------------------
345*cdf0e10cSrcweir 
346*cdf0e10cSrcweir 
347*cdf0e10cSrcweir DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
348*cdf0e10cSrcweir {
349*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir 
352*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
353*cdf0e10cSrcweir 
354*cdf0e10cSrcweir 	DateTime nRet;
355*cdf0e10cSrcweir 	return nRet;
356*cdf0e10cSrcweir }
357*cdf0e10cSrcweir // -------------------------------------------------------------------------
358*cdf0e10cSrcweir 
359*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::isBeforeFirst(  ) throw(SQLException, RuntimeException)
360*cdf0e10cSrcweir {
361*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
362*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
363*cdf0e10cSrcweir 
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir 	// here you have to implement your movements
366*cdf0e10cSrcweir 	// return true means there is no data
367*cdf0e10cSrcweir 	return sal_True;
368*cdf0e10cSrcweir }
369*cdf0e10cSrcweir // -------------------------------------------------------------------------
370*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::isAfterLast(  ) throw(SQLException, RuntimeException)
371*cdf0e10cSrcweir {
372*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
373*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
374*cdf0e10cSrcweir 
375*cdf0e10cSrcweir 	return sal_True;
376*cdf0e10cSrcweir }
377*cdf0e10cSrcweir // -------------------------------------------------------------------------
378*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::isFirst(  ) throw(SQLException, RuntimeException)
379*cdf0e10cSrcweir {
380*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
381*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
382*cdf0e10cSrcweir 
383*cdf0e10cSrcweir 
384*cdf0e10cSrcweir 	return sal_False;
385*cdf0e10cSrcweir }
386*cdf0e10cSrcweir // -------------------------------------------------------------------------
387*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::isLast(  ) throw(SQLException, RuntimeException)
388*cdf0e10cSrcweir {
389*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
390*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
391*cdf0e10cSrcweir 
392*cdf0e10cSrcweir 
393*cdf0e10cSrcweir 	return sal_False;
394*cdf0e10cSrcweir }
395*cdf0e10cSrcweir // -------------------------------------------------------------------------
396*cdf0e10cSrcweir void SAL_CALL OResultSet::beforeFirst(  ) throw(SQLException, RuntimeException)
397*cdf0e10cSrcweir {
398*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
399*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
400*cdf0e10cSrcweir 
401*cdf0e10cSrcweir 	// move before the first row so that isBeforeFirst returns false
402*cdf0e10cSrcweir 	// the smae for other movement methods
403*cdf0e10cSrcweir }
404*cdf0e10cSrcweir // -------------------------------------------------------------------------
405*cdf0e10cSrcweir void SAL_CALL OResultSet::afterLast(  ) throw(SQLException, RuntimeException)
406*cdf0e10cSrcweir {
407*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
408*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
409*cdf0e10cSrcweir }
410*cdf0e10cSrcweir // -------------------------------------------------------------------------
411*cdf0e10cSrcweir 
412*cdf0e10cSrcweir void SAL_CALL OResultSet::close(  ) throw(SQLException, RuntimeException)
413*cdf0e10cSrcweir {
414*cdf0e10cSrcweir 	{
415*cdf0e10cSrcweir 		::osl::MutexGuard aGuard( m_aMutex );
416*cdf0e10cSrcweir 		checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
417*cdf0e10cSrcweir 
418*cdf0e10cSrcweir 	}
419*cdf0e10cSrcweir 	dispose();
420*cdf0e10cSrcweir }
421*cdf0e10cSrcweir // -------------------------------------------------------------------------
422*cdf0e10cSrcweir 
423*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::first(  ) throw(SQLException, RuntimeException)
424*cdf0e10cSrcweir {
425*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
426*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
427*cdf0e10cSrcweir 
428*cdf0e10cSrcweir 	return sal_False;
429*cdf0e10cSrcweir }
430*cdf0e10cSrcweir // -------------------------------------------------------------------------
431*cdf0e10cSrcweir 
432*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::last(  ) throw(SQLException, RuntimeException)
433*cdf0e10cSrcweir {
434*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
435*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
436*cdf0e10cSrcweir 
437*cdf0e10cSrcweir 	return sal_False;
438*cdf0e10cSrcweir }
439*cdf0e10cSrcweir // -------------------------------------------------------------------------
440*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
441*cdf0e10cSrcweir {
442*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
443*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
444*cdf0e10cSrcweir 
445*cdf0e10cSrcweir 	return sal_False;
446*cdf0e10cSrcweir }
447*cdf0e10cSrcweir // -------------------------------------------------------------------------
448*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException)
449*cdf0e10cSrcweir {
450*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
451*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
452*cdf0e10cSrcweir 
453*cdf0e10cSrcweir 	return sal_False;
454*cdf0e10cSrcweir }
455*cdf0e10cSrcweir // -------------------------------------------------------------------------
456*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::previous(  ) throw(SQLException, RuntimeException)
457*cdf0e10cSrcweir {
458*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
459*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
460*cdf0e10cSrcweir 
461*cdf0e10cSrcweir 	return sal_False;
462*cdf0e10cSrcweir }
463*cdf0e10cSrcweir // -------------------------------------------------------------------------
464*cdf0e10cSrcweir Reference< XInterface > SAL_CALL OResultSet::getStatement(  ) throw(SQLException, RuntimeException)
465*cdf0e10cSrcweir {
466*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
467*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
468*cdf0e10cSrcweir 
469*cdf0e10cSrcweir 
470*cdf0e10cSrcweir 	return m_aStatement.get();
471*cdf0e10cSrcweir }
472*cdf0e10cSrcweir // -------------------------------------------------------------------------
473*cdf0e10cSrcweir 
474*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::rowDeleted(  ) throw(SQLException, RuntimeException)
475*cdf0e10cSrcweir {
476*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
477*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
478*cdf0e10cSrcweir 
479*cdf0e10cSrcweir 
480*cdf0e10cSrcweir 	return sal_False;
481*cdf0e10cSrcweir }
482*cdf0e10cSrcweir // -------------------------------------------------------------------------
483*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::rowInserted(  ) throw(SQLException, RuntimeException)
484*cdf0e10cSrcweir {
485*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
486*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
487*cdf0e10cSrcweir 
488*cdf0e10cSrcweir 
489*cdf0e10cSrcweir 	return sal_False;
490*cdf0e10cSrcweir }
491*cdf0e10cSrcweir // -------------------------------------------------------------------------
492*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::rowUpdated(  ) throw(SQLException, RuntimeException)
493*cdf0e10cSrcweir {
494*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
495*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
496*cdf0e10cSrcweir 
497*cdf0e10cSrcweir 
498*cdf0e10cSrcweir 	return sal_False;
499*cdf0e10cSrcweir }
500*cdf0e10cSrcweir // -------------------------------------------------------------------------
501*cdf0e10cSrcweir 
502*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::next(  ) throw(SQLException, RuntimeException)
503*cdf0e10cSrcweir {
504*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
505*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
506*cdf0e10cSrcweir 
507*cdf0e10cSrcweir 
508*cdf0e10cSrcweir 	return sal_False;
509*cdf0e10cSrcweir }
510*cdf0e10cSrcweir // -------------------------------------------------------------------------
511*cdf0e10cSrcweir 
512*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::wasNull(  ) throw(SQLException, RuntimeException)
513*cdf0e10cSrcweir {
514*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
515*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
516*cdf0e10cSrcweir 
517*cdf0e10cSrcweir 
518*cdf0e10cSrcweir 	return m_bWasNull;
519*cdf0e10cSrcweir }
520*cdf0e10cSrcweir // -------------------------------------------------------------------------
521*cdf0e10cSrcweir 
522*cdf0e10cSrcweir void SAL_CALL OResultSet::cancel(  ) throw(RuntimeException)
523*cdf0e10cSrcweir {
524*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
525*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
526*cdf0e10cSrcweir 
527*cdf0e10cSrcweir }
528*cdf0e10cSrcweir // -------------------------------------------------------------------------
529*cdf0e10cSrcweir void SAL_CALL OResultSet::clearWarnings(  ) throw(SQLException, RuntimeException)
530*cdf0e10cSrcweir {
531*cdf0e10cSrcweir }
532*cdf0e10cSrcweir // -------------------------------------------------------------------------
533*cdf0e10cSrcweir Any SAL_CALL OResultSet::getWarnings(  ) throw(SQLException, RuntimeException)
534*cdf0e10cSrcweir {
535*cdf0e10cSrcweir 	return Any();
536*cdf0e10cSrcweir }
537*cdf0e10cSrcweir // -------------------------------------------------------------------------
538*cdf0e10cSrcweir void SAL_CALL OResultSet::insertRow(  ) throw(SQLException, RuntimeException)
539*cdf0e10cSrcweir {
540*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
541*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
542*cdf0e10cSrcweir 
543*cdf0e10cSrcweir 	// you only have to implement this if you want to insert new rows
544*cdf0e10cSrcweir }
545*cdf0e10cSrcweir // -------------------------------------------------------------------------
546*cdf0e10cSrcweir void SAL_CALL OResultSet::updateRow(  ) throw(SQLException, RuntimeException)
547*cdf0e10cSrcweir {
548*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
549*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
550*cdf0e10cSrcweir 
551*cdf0e10cSrcweir 
552*cdf0e10cSrcweir 	// only when you allow updates
553*cdf0e10cSrcweir }
554*cdf0e10cSrcweir // -------------------------------------------------------------------------
555*cdf0e10cSrcweir void SAL_CALL OResultSet::deleteRow(  ) throw(SQLException, RuntimeException)
556*cdf0e10cSrcweir {
557*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
558*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
559*cdf0e10cSrcweir }
560*cdf0e10cSrcweir // -------------------------------------------------------------------------
561*cdf0e10cSrcweir 
562*cdf0e10cSrcweir void SAL_CALL OResultSet::cancelRowUpdates(  ) throw(SQLException, RuntimeException)
563*cdf0e10cSrcweir {
564*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
565*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
566*cdf0e10cSrcweir }
567*cdf0e10cSrcweir // -------------------------------------------------------------------------
568*cdf0e10cSrcweir 
569*cdf0e10cSrcweir void SAL_CALL OResultSet::moveToInsertRow(  ) throw(SQLException, RuntimeException)
570*cdf0e10cSrcweir {
571*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
572*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
573*cdf0e10cSrcweir 
574*cdf0e10cSrcweir 
575*cdf0e10cSrcweir 	// only when you allow insert's
576*cdf0e10cSrcweir }
577*cdf0e10cSrcweir // -------------------------------------------------------------------------
578*cdf0e10cSrcweir 
579*cdf0e10cSrcweir void SAL_CALL OResultSet::moveToCurrentRow(  ) throw(SQLException, RuntimeException)
580*cdf0e10cSrcweir {
581*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
582*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
583*cdf0e10cSrcweir }
584*cdf0e10cSrcweir // -------------------------------------------------------------------------
585*cdf0e10cSrcweir 
586*cdf0e10cSrcweir void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
587*cdf0e10cSrcweir {
588*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
589*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
590*cdf0e10cSrcweir }
591*cdf0e10cSrcweir // -------------------------------------------------------------------------
592*cdf0e10cSrcweir 
593*cdf0e10cSrcweir void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException)
594*cdf0e10cSrcweir {
595*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
596*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
597*cdf0e10cSrcweir 
598*cdf0e10cSrcweir }
599*cdf0e10cSrcweir // -------------------------------------------------------------------------
600*cdf0e10cSrcweir void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
601*cdf0e10cSrcweir {
602*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
603*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
604*cdf0e10cSrcweir 
605*cdf0e10cSrcweir }
606*cdf0e10cSrcweir // -------------------------------------------------------------------------
607*cdf0e10cSrcweir 
608*cdf0e10cSrcweir void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
609*cdf0e10cSrcweir {
610*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
611*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
612*cdf0e10cSrcweir 
613*cdf0e10cSrcweir }
614*cdf0e10cSrcweir // -------------------------------------------------------------------------
615*cdf0e10cSrcweir void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
616*cdf0e10cSrcweir {
617*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
618*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
619*cdf0e10cSrcweir 
620*cdf0e10cSrcweir }
621*cdf0e10cSrcweir // -------------------------------------------------------------------------
622*cdf0e10cSrcweir void SAL_CALL OResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
623*cdf0e10cSrcweir {
624*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
625*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
626*cdf0e10cSrcweir 
627*cdf0e10cSrcweir }
628*cdf0e10cSrcweir // -----------------------------------------------------------------------
629*cdf0e10cSrcweir void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException)
630*cdf0e10cSrcweir {
631*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
632*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
633*cdf0e10cSrcweir 
634*cdf0e10cSrcweir }
635*cdf0e10cSrcweir // -------------------------------------------------------------------------
636*cdf0e10cSrcweir 
637*cdf0e10cSrcweir void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException)
638*cdf0e10cSrcweir {
639*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
640*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
641*cdf0e10cSrcweir 
642*cdf0e10cSrcweir }
643*cdf0e10cSrcweir // -------------------------------------------------------------------------
644*cdf0e10cSrcweir void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
645*cdf0e10cSrcweir {
646*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
647*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
648*cdf0e10cSrcweir 
649*cdf0e10cSrcweir }
650*cdf0e10cSrcweir // -------------------------------------------------------------------------
651*cdf0e10cSrcweir void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
652*cdf0e10cSrcweir {
653*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
654*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
655*cdf0e10cSrcweir 
656*cdf0e10cSrcweir }
657*cdf0e10cSrcweir // -------------------------------------------------------------------------
658*cdf0e10cSrcweir void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) throw(SQLException, RuntimeException)
659*cdf0e10cSrcweir {
660*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
661*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
662*cdf0e10cSrcweir 
663*cdf0e10cSrcweir }
664*cdf0e10cSrcweir // -------------------------------------------------------------------------
665*cdf0e10cSrcweir 
666*cdf0e10cSrcweir void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const Time& x ) throw(SQLException, RuntimeException)
667*cdf0e10cSrcweir {
668*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
669*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
670*cdf0e10cSrcweir 
671*cdf0e10cSrcweir }
672*cdf0e10cSrcweir // -------------------------------------------------------------------------
673*cdf0e10cSrcweir 
674*cdf0e10cSrcweir void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const DateTime& x ) throw(SQLException, RuntimeException)
675*cdf0e10cSrcweir {
676*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
677*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
678*cdf0e10cSrcweir 
679*cdf0e10cSrcweir }
680*cdf0e10cSrcweir // -------------------------------------------------------------------------
681*cdf0e10cSrcweir 
682*cdf0e10cSrcweir void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
683*cdf0e10cSrcweir {
684*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
685*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
686*cdf0e10cSrcweir 
687*cdf0e10cSrcweir }
688*cdf0e10cSrcweir // -------------------------------------------------------------------------
689*cdf0e10cSrcweir void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
690*cdf0e10cSrcweir {
691*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
692*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
693*cdf0e10cSrcweir 
694*cdf0e10cSrcweir }
695*cdf0e10cSrcweir // -------------------------------------------------------------------------
696*cdf0e10cSrcweir void SAL_CALL OResultSet::refreshRow(  ) throw(SQLException, RuntimeException)
697*cdf0e10cSrcweir {
698*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
699*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
700*cdf0e10cSrcweir 
701*cdf0e10cSrcweir }
702*cdf0e10cSrcweir // -------------------------------------------------------------------------
703*cdf0e10cSrcweir void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException)
704*cdf0e10cSrcweir {
705*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
706*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
707*cdf0e10cSrcweir 
708*cdf0e10cSrcweir }
709*cdf0e10cSrcweir // -------------------------------------------------------------------------
710*cdf0e10cSrcweir 
711*cdf0e10cSrcweir void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 scale ) throw(SQLException, RuntimeException)
712*cdf0e10cSrcweir {
713*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
714*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
715*cdf0e10cSrcweir 
716*cdf0e10cSrcweir }
717*cdf0e10cSrcweir // -------------------------------------------------------------------------
718*cdf0e10cSrcweir // XRowLocate
719*cdf0e10cSrcweir Any SAL_CALL OResultSet::getBookmark(  ) throw( SQLException,  RuntimeException)
720*cdf0e10cSrcweir {
721*cdf0e10cSrcweir 	 ::osl::MutexGuard aGuard( m_aMutex );
722*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
723*cdf0e10cSrcweir 
724*cdf0e10cSrcweir 	// if you don't want to support bookmark you must remove the XRowLocate interface
725*cdf0e10cSrcweir 
726*cdf0e10cSrcweir 	 return Any();
727*cdf0e10cSrcweir }
728*cdf0e10cSrcweir // -------------------------------------------------------------------------
729*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::moveToBookmark( const  Any& bookmark ) throw( SQLException,  RuntimeException)
730*cdf0e10cSrcweir {
731*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
732*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
733*cdf0e10cSrcweir 
734*cdf0e10cSrcweir 	return sal_False;
735*cdf0e10cSrcweir }
736*cdf0e10cSrcweir // -------------------------------------------------------------------------
737*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark( const  Any& bookmark, sal_Int32 rows ) throw( SQLException,  RuntimeException)
738*cdf0e10cSrcweir {
739*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
740*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
741*cdf0e10cSrcweir 
742*cdf0e10cSrcweir 	return sal_False;
743*cdf0e10cSrcweir }
744*cdf0e10cSrcweir // -------------------------------------------------------------------------
745*cdf0e10cSrcweir sal_Int32 SAL_CALL OResultSet::compareBookmarks( const  Any& first, const  Any& second ) throw( SQLException,  RuntimeException)
746*cdf0e10cSrcweir {
747*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
748*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
749*cdf0e10cSrcweir 
750*cdf0e10cSrcweir 
751*cdf0e10cSrcweir 	return CompareBookmark::NOT_EQUAL;
752*cdf0e10cSrcweir }
753*cdf0e10cSrcweir // -------------------------------------------------------------------------
754*cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks(  ) throw( SQLException,  RuntimeException)
755*cdf0e10cSrcweir {
756*cdf0e10cSrcweir 	return sal_False;
757*cdf0e10cSrcweir }
758*cdf0e10cSrcweir // -------------------------------------------------------------------------
759*cdf0e10cSrcweir sal_Int32 SAL_CALL OResultSet::hashBookmark( const  Any& bookmark ) throw( SQLException,  RuntimeException)
760*cdf0e10cSrcweir {
761*cdf0e10cSrcweir 	throw SQLException();
762*cdf0e10cSrcweir }
763*cdf0e10cSrcweir // -------------------------------------------------------------------------
764*cdf0e10cSrcweir // XDeleteRows
765*cdf0e10cSrcweir Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows( const  Sequence<  Any >& rows ) throw( SQLException,  RuntimeException)
766*cdf0e10cSrcweir {
767*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
768*cdf0e10cSrcweir 	checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
769*cdf0e10cSrcweir 
770*cdf0e10cSrcweir 	return Sequence< sal_Int32 >();
771*cdf0e10cSrcweir }
772*cdf0e10cSrcweir // -------------------------------------------------------------------------
773*cdf0e10cSrcweir IPropertyArrayHelper* OResultSet::createArrayHelper( ) const
774*cdf0e10cSrcweir {
775*cdf0e10cSrcweir 	Sequence< Property > aProps(6);
776*cdf0e10cSrcweir 	Property* pProperties = aProps.getArray();
777*cdf0e10cSrcweir 	sal_Int32 nPos = 0;
778*cdf0e10cSrcweir 	DECL_PROP1IMPL(CURSORNAME,			::rtl::OUString) PropertyAttribute::READONLY);
779*cdf0e10cSrcweir 	DECL_PROP0(FETCHDIRECTION,			sal_Int32);
780*cdf0e10cSrcweir 	DECL_PROP0(FETCHSIZE,				sal_Int32);
781*cdf0e10cSrcweir 	DECL_BOOL_PROP1IMPL(ISBOOKMARKABLE) PropertyAttribute::READONLY);
782*cdf0e10cSrcweir 	DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) PropertyAttribute::READONLY);
783*cdf0e10cSrcweir 	DECL_PROP1IMPL(RESULTSETTYPE,		sal_Int32) PropertyAttribute::READONLY);
784*cdf0e10cSrcweir 
785*cdf0e10cSrcweir 	return new OPropertyArrayHelper(aProps);
786*cdf0e10cSrcweir }
787*cdf0e10cSrcweir // -------------------------------------------------------------------------
788*cdf0e10cSrcweir IPropertyArrayHelper & OResultSet::getInfoHelper()
789*cdf0e10cSrcweir {
790*cdf0e10cSrcweir 	return *const_cast<OResultSet*>(this)->getArrayHelper();
791*cdf0e10cSrcweir }
792*cdf0e10cSrcweir // -------------------------------------------------------------------------
793*cdf0e10cSrcweir sal_Bool OResultSet::convertFastPropertyValue(
794*cdf0e10cSrcweir 							Any & rConvertedValue,
795*cdf0e10cSrcweir 							Any & rOldValue,
796*cdf0e10cSrcweir 							sal_Int32 nHandle,
797*cdf0e10cSrcweir 							const Any& rValue )
798*cdf0e10cSrcweir 								throw (::com::sun::star::lang::IllegalArgumentException)
799*cdf0e10cSrcweir {
800*cdf0e10cSrcweir 	switch(nHandle)
801*cdf0e10cSrcweir 	{
802*cdf0e10cSrcweir 		case PROPERTY_ID_ISBOOKMARKABLE:
803*cdf0e10cSrcweir 		case PROPERTY_ID_CURSORNAME:
804*cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETCONCURRENCY:
805*cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETTYPE:
806*cdf0e10cSrcweir 			throw ::com::sun::star::lang::IllegalArgumentException();
807*cdf0e10cSrcweir 			break;
808*cdf0e10cSrcweir 		case PROPERTY_ID_FETCHDIRECTION:
809*cdf0e10cSrcweir 		case PROPERTY_ID_FETCHSIZE:
810*cdf0e10cSrcweir 		default:
811*cdf0e10cSrcweir 			;
812*cdf0e10cSrcweir 	}
813*cdf0e10cSrcweir 	return sal_False;
814*cdf0e10cSrcweir }
815*cdf0e10cSrcweir // -------------------------------------------------------------------------
816*cdf0e10cSrcweir void OResultSet::setFastPropertyValue_NoBroadcast(
817*cdf0e10cSrcweir 								sal_Int32 nHandle,
818*cdf0e10cSrcweir 								const Any& rValue
819*cdf0e10cSrcweir 												 )
820*cdf0e10cSrcweir 												 throw (Exception)
821*cdf0e10cSrcweir {
822*cdf0e10cSrcweir 	switch(nHandle)
823*cdf0e10cSrcweir 	{
824*cdf0e10cSrcweir 		case PROPERTY_ID_ISBOOKMARKABLE:
825*cdf0e10cSrcweir 		case PROPERTY_ID_CURSORNAME:
826*cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETCONCURRENCY:
827*cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETTYPE:
828*cdf0e10cSrcweir 			throw Exception();
829*cdf0e10cSrcweir 			break;
830*cdf0e10cSrcweir 		case PROPERTY_ID_FETCHDIRECTION:
831*cdf0e10cSrcweir 			break;
832*cdf0e10cSrcweir 		case PROPERTY_ID_FETCHSIZE:
833*cdf0e10cSrcweir 			break;
834*cdf0e10cSrcweir 		default:
835*cdf0e10cSrcweir 			;
836*cdf0e10cSrcweir 	}
837*cdf0e10cSrcweir }
838*cdf0e10cSrcweir // -------------------------------------------------------------------------
839*cdf0e10cSrcweir void OResultSet::getFastPropertyValue(
840*cdf0e10cSrcweir 								Any& rValue,
841*cdf0e10cSrcweir 								sal_Int32 nHandle
842*cdf0e10cSrcweir 									 ) const
843*cdf0e10cSrcweir {
844*cdf0e10cSrcweir 	switch(nHandle)
845*cdf0e10cSrcweir 	{
846*cdf0e10cSrcweir 		case PROPERTY_ID_ISBOOKMARKABLE:
847*cdf0e10cSrcweir 		case PROPERTY_ID_CURSORNAME:
848*cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETCONCURRENCY:
849*cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETTYPE:
850*cdf0e10cSrcweir 		case PROPERTY_ID_FETCHDIRECTION:
851*cdf0e10cSrcweir 		case PROPERTY_ID_FETCHSIZE:
852*cdf0e10cSrcweir 			;
853*cdf0e10cSrcweir 	}
854*cdf0e10cSrcweir }
855*cdf0e10cSrcweir // -----------------------------------------------------------------------------
856*cdf0e10cSrcweir void SAL_CALL OResultSet::acquire() throw()
857*cdf0e10cSrcweir {
858*cdf0e10cSrcweir 	OResultSet_BASE::acquire();
859*cdf0e10cSrcweir }
860*cdf0e10cSrcweir // -----------------------------------------------------------------------------
861*cdf0e10cSrcweir void SAL_CALL OResultSet::release() throw()
862*cdf0e10cSrcweir {
863*cdf0e10cSrcweir 	OResultSet_BASE::release();
864*cdf0e10cSrcweir }
865*cdf0e10cSrcweir // -----------------------------------------------------------------------------
866*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException)
867*cdf0e10cSrcweir {
868*cdf0e10cSrcweir 	return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
869*cdf0e10cSrcweir }
870*cdf0e10cSrcweir // -----------------------------------------------------------------------------
871*cdf0e10cSrcweir 
872*cdf0e10cSrcweir 
873*cdf0e10cSrcweir 
874