xref: /aoo41x/main/ucb/source/ucp/file/filrow.cxx (revision 2f86921c)
1*2f86921cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2f86921cSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2f86921cSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2f86921cSAndrew Rist  * distributed with this work for additional information
6*2f86921cSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2f86921cSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2f86921cSAndrew Rist  * "License"); you may not use this file except in compliance
9*2f86921cSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*2f86921cSAndrew Rist  *
11*2f86921cSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*2f86921cSAndrew Rist  *
13*2f86921cSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2f86921cSAndrew Rist  * software distributed under the License is distributed on an
15*2f86921cSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2f86921cSAndrew Rist  * KIND, either express or implied.  See the License for the
17*2f86921cSAndrew Rist  * specific language governing permissions and limitations
18*2f86921cSAndrew Rist  * under the License.
19*2f86921cSAndrew Rist  *
20*2f86921cSAndrew Rist  *************************************************************/
21*2f86921cSAndrew Rist 
22*2f86921cSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_ucb.hxx"
26cdf0e10cSrcweir #include "filrow.hxx"
27cdf0e10cSrcweir #include "shell.hxx"
28cdf0e10cSrcweir #include "prov.hxx"
29cdf0e10cSrcweir 
30cdf0e10cSrcweir using namespace fileaccess;
31cdf0e10cSrcweir using namespace com::sun::star;
32cdf0e10cSrcweir using namespace com::sun::star::uno;
33cdf0e10cSrcweir //using namespace com::sun::star::ucb;
34cdf0e10cSrcweir 
35cdf0e10cSrcweir 
36cdf0e10cSrcweir // Funktion for TypeConverting
37cdf0e10cSrcweir 
38cdf0e10cSrcweir 
39cdf0e10cSrcweir template< class _type_ >
convert(shell * pShell,uno::Reference<script::XTypeConverter> & xConverter,uno::Any & rValue,_type_ & aReturn)40cdf0e10cSrcweir sal_Bool convert( shell* pShell,
41cdf0e10cSrcweir 				  uno::Reference< script::XTypeConverter >& xConverter,
42cdf0e10cSrcweir 				  uno::Any& rValue,
43cdf0e10cSrcweir 				  _type_& aReturn  )
44cdf0e10cSrcweir {
45cdf0e10cSrcweir 	// Try first without converting
46cdf0e10cSrcweir 	sal_Bool no_success = ! ( rValue >>= aReturn );
47cdf0e10cSrcweir 
48cdf0e10cSrcweir 	if ( no_success )
49cdf0e10cSrcweir 	{
50cdf0e10cSrcweir 		if( ! xConverter.is() )
51cdf0e10cSrcweir 		{
52cdf0e10cSrcweir 			xConverter = uno::Reference< script::XTypeConverter >(
53cdf0e10cSrcweir 				pShell->m_xMultiServiceFactory->createInstance(
54cdf0e10cSrcweir 					rtl::OUString::createFromAscii( "com.sun.star.script.Converter" ) ),uno::UNO_QUERY );
55cdf0e10cSrcweir 
56cdf0e10cSrcweir /*			DBG_ASSERT( m_xTypeConverter.is(),
57cdf0e10cSrcweir 						"PropertyValueSet::getTypeConverter() - "
58cdf0e10cSrcweir 						"Service 'com.sun.star.script.Converter' n/a!" );*/
59cdf0e10cSrcweir 		}
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 		try
62cdf0e10cSrcweir 		{
63cdf0e10cSrcweir 			if( rValue.hasValue() )
64cdf0e10cSrcweir 			{
65cdf0e10cSrcweir 				uno::Any aConvertedValue
66cdf0e10cSrcweir 					= xConverter->convertTo( rValue,getCppuType( static_cast< const _type_* >(0) ) );
67cdf0e10cSrcweir 				no_success = ! ( aConvertedValue >>= aReturn );
68cdf0e10cSrcweir 			}
69cdf0e10cSrcweir 			else
70cdf0e10cSrcweir 				no_success = sal_True;
71cdf0e10cSrcweir 		}
72cdf0e10cSrcweir 		catch ( lang::IllegalArgumentException )
73cdf0e10cSrcweir 		{
74cdf0e10cSrcweir 			no_success = sal_True;
75cdf0e10cSrcweir 		}
76cdf0e10cSrcweir 		catch ( script::CannotConvertException )
77cdf0e10cSrcweir 		{
78cdf0e10cSrcweir 			no_success = sal_True;
79cdf0e10cSrcweir 		}
80cdf0e10cSrcweir 	}
81cdf0e10cSrcweir 	return no_success;
82cdf0e10cSrcweir }
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 
XRow_impl(shell * pMyShell,const uno::Sequence<uno::Any> & seq)85cdf0e10cSrcweir XRow_impl::XRow_impl( shell* pMyShell,const uno::Sequence< uno::Any >& seq )
86cdf0e10cSrcweir 	: m_aValueMap( seq ),
87cdf0e10cSrcweir 	  m_pMyShell( pMyShell ),
88cdf0e10cSrcweir 	  m_xProvider( pMyShell->m_pProvider ),
89cdf0e10cSrcweir 	  m_xTypeConverter( 0 )
90cdf0e10cSrcweir {
91cdf0e10cSrcweir }
92cdf0e10cSrcweir 
~XRow_impl()93cdf0e10cSrcweir XRow_impl::~XRow_impl()
94cdf0e10cSrcweir {
95cdf0e10cSrcweir }
96cdf0e10cSrcweir 
97cdf0e10cSrcweir 
98cdf0e10cSrcweir void SAL_CALL
acquire(void)99cdf0e10cSrcweir XRow_impl::acquire(
100cdf0e10cSrcweir 		   void )
101cdf0e10cSrcweir   throw()
102cdf0e10cSrcweir {
103cdf0e10cSrcweir   OWeakObject::acquire();
104cdf0e10cSrcweir }
105cdf0e10cSrcweir 
106cdf0e10cSrcweir void SAL_CALL
release(void)107cdf0e10cSrcweir XRow_impl::release(
108cdf0e10cSrcweir 		   void )
109cdf0e10cSrcweir   throw()
110cdf0e10cSrcweir {
111cdf0e10cSrcweir   OWeakObject::release();
112cdf0e10cSrcweir }
113cdf0e10cSrcweir 
114cdf0e10cSrcweir 
115cdf0e10cSrcweir uno::Any SAL_CALL
queryInterface(const uno::Type & rType)116cdf0e10cSrcweir XRow_impl::queryInterface(
117cdf0e10cSrcweir 			  const uno::Type& rType )
118cdf0e10cSrcweir   throw( uno::RuntimeException )
119cdf0e10cSrcweir {
120cdf0e10cSrcweir   uno::Any aRet = cppu::queryInterface( rType,
121cdf0e10cSrcweir                     SAL_STATIC_CAST( lang::XTypeProvider*,this),
122cdf0e10cSrcweir 					SAL_STATIC_CAST( sdbc::XRow*,this) );
123cdf0e10cSrcweir   return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
124cdf0e10cSrcweir }
125cdf0e10cSrcweir 
126cdf0e10cSrcweir 
XTYPEPROVIDER_IMPL_2(XRow_impl,lang::XTypeProvider,sdbc::XRow)127cdf0e10cSrcweir XTYPEPROVIDER_IMPL_2( XRow_impl,
128cdf0e10cSrcweir 				   	  lang::XTypeProvider,
129cdf0e10cSrcweir 					  sdbc::XRow )
130cdf0e10cSrcweir 
131cdf0e10cSrcweir 
132cdf0e10cSrcweir sal_Bool SAL_CALL
133cdf0e10cSrcweir XRow_impl::wasNull(
134cdf0e10cSrcweir 		   void )
135cdf0e10cSrcweir   throw( sdbc::SQLException,
136cdf0e10cSrcweir 	 uno::RuntimeException)
137cdf0e10cSrcweir {
138cdf0e10cSrcweir   return m_nWasNull;
139cdf0e10cSrcweir }
140cdf0e10cSrcweir 
141cdf0e10cSrcweir 
142cdf0e10cSrcweir rtl::OUString SAL_CALL
getString(sal_Int32 columnIndex)143cdf0e10cSrcweir XRow_impl::getString(
144cdf0e10cSrcweir 		     sal_Int32 columnIndex )
145cdf0e10cSrcweir   throw( sdbc::SQLException,
146cdf0e10cSrcweir 	 uno::RuntimeException)
147cdf0e10cSrcweir {
148cdf0e10cSrcweir   if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
149cdf0e10cSrcweir     throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
150cdf0e10cSrcweir   rtl::OUString  Value;
151cdf0e10cSrcweir   osl::MutexGuard aGuard( m_aMutex );
152cdf0e10cSrcweir   m_nWasNull = ::convert<rtl::OUString>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
153cdf0e10cSrcweir   return Value;
154cdf0e10cSrcweir }
155cdf0e10cSrcweir 
156cdf0e10cSrcweir sal_Bool SAL_CALL
getBoolean(sal_Int32 columnIndex)157cdf0e10cSrcweir XRow_impl::getBoolean(
158cdf0e10cSrcweir 	sal_Int32 columnIndex )
159cdf0e10cSrcweir 	throw( sdbc::SQLException,
160cdf0e10cSrcweir 		   uno::RuntimeException)
161cdf0e10cSrcweir {
162cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
163cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
164cdf0e10cSrcweir 	sal_Bool  Value( false );
165cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
166cdf0e10cSrcweir 	m_nWasNull = ::convert<sal_Bool>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
167cdf0e10cSrcweir 	return Value;
168cdf0e10cSrcweir }
169cdf0e10cSrcweir 
170cdf0e10cSrcweir 
171cdf0e10cSrcweir sal_Int8 SAL_CALL
getByte(sal_Int32 columnIndex)172cdf0e10cSrcweir XRow_impl::getByte(
173cdf0e10cSrcweir 	sal_Int32 columnIndex )
174cdf0e10cSrcweir 	throw( sdbc::SQLException,
175cdf0e10cSrcweir 		   uno::RuntimeException)
176cdf0e10cSrcweir {
177cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
178cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
179cdf0e10cSrcweir 	sal_Int8  Value( 0 );
180cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
181cdf0e10cSrcweir 	m_nWasNull = ::convert<sal_Int8>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
182cdf0e10cSrcweir 	return Value;
183cdf0e10cSrcweir }
184cdf0e10cSrcweir 
185cdf0e10cSrcweir sal_Int16 SAL_CALL
getShort(sal_Int32 columnIndex)186cdf0e10cSrcweir XRow_impl::getShort(
187cdf0e10cSrcweir 	sal_Int32 columnIndex )
188cdf0e10cSrcweir 	throw( sdbc::SQLException,
189cdf0e10cSrcweir 		   uno::RuntimeException)
190cdf0e10cSrcweir {
191cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
192cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
193cdf0e10cSrcweir 	sal_Int16  Value( 0 );
194cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
195cdf0e10cSrcweir 	m_nWasNull = ::convert<sal_Int16>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
196cdf0e10cSrcweir 	return Value;
197cdf0e10cSrcweir }
198cdf0e10cSrcweir 
199cdf0e10cSrcweir 
200cdf0e10cSrcweir sal_Int32 SAL_CALL
getInt(sal_Int32 columnIndex)201cdf0e10cSrcweir XRow_impl::getInt(
202cdf0e10cSrcweir 		  sal_Int32 columnIndex )
203cdf0e10cSrcweir 	throw( sdbc::SQLException,
204cdf0e10cSrcweir 		   uno::RuntimeException)
205cdf0e10cSrcweir {
206cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
207cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
208cdf0e10cSrcweir 	sal_Int32  Value( 0 );
209cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
210cdf0e10cSrcweir 	m_nWasNull = ::convert<sal_Int32>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
211cdf0e10cSrcweir 	return Value;
212cdf0e10cSrcweir }
213cdf0e10cSrcweir 
214cdf0e10cSrcweir sal_Int64 SAL_CALL
getLong(sal_Int32 columnIndex)215cdf0e10cSrcweir XRow_impl::getLong(
216cdf0e10cSrcweir 		   sal_Int32 columnIndex )
217cdf0e10cSrcweir   throw( sdbc::SQLException,
218cdf0e10cSrcweir 	 uno::RuntimeException)
219cdf0e10cSrcweir {
220cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
221cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
222cdf0e10cSrcweir 	sal_Int64  Value( 0 );
223cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
224cdf0e10cSrcweir 	m_nWasNull = ::convert<sal_Int64>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
225cdf0e10cSrcweir 	return Value;
226cdf0e10cSrcweir }
227cdf0e10cSrcweir 
228cdf0e10cSrcweir float SAL_CALL
getFloat(sal_Int32 columnIndex)229cdf0e10cSrcweir XRow_impl::getFloat(
230cdf0e10cSrcweir 	sal_Int32 columnIndex )
231cdf0e10cSrcweir 	throw( sdbc::SQLException,
232cdf0e10cSrcweir 		   uno::RuntimeException)
233cdf0e10cSrcweir {
234cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
235cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
236cdf0e10cSrcweir 	float  Value( 0 );
237cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
238cdf0e10cSrcweir 	m_nWasNull = ::convert<float>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
239cdf0e10cSrcweir 	return Value;
240cdf0e10cSrcweir }
241cdf0e10cSrcweir 
242cdf0e10cSrcweir double SAL_CALL
getDouble(sal_Int32 columnIndex)243cdf0e10cSrcweir XRow_impl::getDouble(
244cdf0e10cSrcweir 	sal_Int32 columnIndex )
245cdf0e10cSrcweir 	throw( sdbc::SQLException,
246cdf0e10cSrcweir 		   uno::RuntimeException)
247cdf0e10cSrcweir {
248cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
249cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
250cdf0e10cSrcweir 	double  Value( 0 );
251cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
252cdf0e10cSrcweir 	m_nWasNull = ::convert<double>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
253cdf0e10cSrcweir 	return Value;
254cdf0e10cSrcweir }
255cdf0e10cSrcweir 
256cdf0e10cSrcweir uno::Sequence< sal_Int8 > SAL_CALL
getBytes(sal_Int32 columnIndex)257cdf0e10cSrcweir XRow_impl::getBytes(
258cdf0e10cSrcweir 	sal_Int32 columnIndex )
259cdf0e10cSrcweir 	throw( sdbc::SQLException,
260cdf0e10cSrcweir 		   uno::RuntimeException)
261cdf0e10cSrcweir {
262cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
263cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
264cdf0e10cSrcweir 	uno::Sequence< sal_Int8 >  Value(0);
265cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
266cdf0e10cSrcweir 	m_nWasNull = ::convert<uno::Sequence< sal_Int8 > >( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
267cdf0e10cSrcweir 	return Value;
268cdf0e10cSrcweir }
269cdf0e10cSrcweir 
270cdf0e10cSrcweir util::Date SAL_CALL
getDate(sal_Int32 columnIndex)271cdf0e10cSrcweir XRow_impl::getDate(
272cdf0e10cSrcweir 	sal_Int32 columnIndex )
273cdf0e10cSrcweir 	throw( sdbc::SQLException,
274cdf0e10cSrcweir 		   uno::RuntimeException)
275cdf0e10cSrcweir {
276cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
277cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
278cdf0e10cSrcweir 	util::Date  Value;
279cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
280cdf0e10cSrcweir 	m_nWasNull = ::convert<util::Date>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
281cdf0e10cSrcweir 	return Value;
282cdf0e10cSrcweir }
283cdf0e10cSrcweir 
284cdf0e10cSrcweir util::Time SAL_CALL
getTime(sal_Int32 columnIndex)285cdf0e10cSrcweir XRow_impl::getTime(
286cdf0e10cSrcweir 	sal_Int32 columnIndex )
287cdf0e10cSrcweir   throw( sdbc::SQLException,
288cdf0e10cSrcweir 		 uno::RuntimeException)
289cdf0e10cSrcweir {
290cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
291cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
292cdf0e10cSrcweir 	util::Time  Value;
293cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
294cdf0e10cSrcweir 	m_nWasNull = ::convert<util::Time>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
295cdf0e10cSrcweir 	return Value;
296cdf0e10cSrcweir }
297cdf0e10cSrcweir 
298cdf0e10cSrcweir util::DateTime SAL_CALL
getTimestamp(sal_Int32 columnIndex)299cdf0e10cSrcweir XRow_impl::getTimestamp(
300cdf0e10cSrcweir 			sal_Int32 columnIndex )
301cdf0e10cSrcweir   throw( sdbc::SQLException,
302cdf0e10cSrcweir 	 uno::RuntimeException)
303cdf0e10cSrcweir {
304cdf0e10cSrcweir   if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
305cdf0e10cSrcweir     throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
306cdf0e10cSrcweir   util::DateTime  Value;
307cdf0e10cSrcweir   osl::MutexGuard aGuard( m_aMutex );
308cdf0e10cSrcweir   m_nWasNull = ::convert<util::DateTime>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
309cdf0e10cSrcweir   return Value;
310cdf0e10cSrcweir }
311cdf0e10cSrcweir 
312cdf0e10cSrcweir 
313cdf0e10cSrcweir uno::Reference< io::XInputStream > SAL_CALL
getBinaryStream(sal_Int32 columnIndex)314cdf0e10cSrcweir XRow_impl::getBinaryStream(
315cdf0e10cSrcweir 			   sal_Int32 columnIndex )
316cdf0e10cSrcweir   throw( sdbc::SQLException,
317cdf0e10cSrcweir 	 uno::RuntimeException)
318cdf0e10cSrcweir {
319cdf0e10cSrcweir   if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
320cdf0e10cSrcweir     throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
321cdf0e10cSrcweir   uno::Reference< io::XInputStream >  Value;
322cdf0e10cSrcweir   osl::MutexGuard aGuard( m_aMutex );
323cdf0e10cSrcweir   m_nWasNull = ::convert<uno::Reference< io::XInputStream > >( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
324cdf0e10cSrcweir   return Value;
325cdf0e10cSrcweir }
326cdf0e10cSrcweir 
327cdf0e10cSrcweir 
328cdf0e10cSrcweir uno::Reference< io::XInputStream > SAL_CALL
getCharacterStream(sal_Int32 columnIndex)329cdf0e10cSrcweir XRow_impl::getCharacterStream(
330cdf0e10cSrcweir 			      sal_Int32 columnIndex )
331cdf0e10cSrcweir 	throw( sdbc::SQLException,
332cdf0e10cSrcweir 		   uno::RuntimeException)
333cdf0e10cSrcweir {
334cdf0e10cSrcweir   if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
335cdf0e10cSrcweir 	  throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
336cdf0e10cSrcweir   uno::Reference< io::XInputStream > Value;
337cdf0e10cSrcweir   osl::MutexGuard aGuard( m_aMutex );
338cdf0e10cSrcweir   m_nWasNull = ::convert< uno::Reference< io::XInputStream> >( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
339cdf0e10cSrcweir   return Value;
340cdf0e10cSrcweir }
341cdf0e10cSrcweir 
342cdf0e10cSrcweir 
343cdf0e10cSrcweir uno::Any SAL_CALL
getObject(sal_Int32 columnIndex,const uno::Reference<container::XNameAccess> &)344cdf0e10cSrcweir XRow_impl::getObject(
345cdf0e10cSrcweir 	sal_Int32 columnIndex,
346cdf0e10cSrcweir 	const uno::Reference< container::XNameAccess >& )
347cdf0e10cSrcweir 	throw( sdbc::SQLException,
348cdf0e10cSrcweir 		   uno::RuntimeException)
349cdf0e10cSrcweir {
350cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
351cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
352cdf0e10cSrcweir 	uno::Any  Value;
353cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
354cdf0e10cSrcweir 	m_nWasNull = ::convert<uno::Any>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
355cdf0e10cSrcweir 	return Value;
356cdf0e10cSrcweir }
357cdf0e10cSrcweir 
358cdf0e10cSrcweir uno::Reference< sdbc::XRef > SAL_CALL
getRef(sal_Int32 columnIndex)359cdf0e10cSrcweir XRow_impl::getRef(
360cdf0e10cSrcweir 	sal_Int32 columnIndex )
361cdf0e10cSrcweir 	throw( sdbc::SQLException,
362cdf0e10cSrcweir 		   uno::RuntimeException)
363cdf0e10cSrcweir {
364cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
365cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
366cdf0e10cSrcweir 	uno::Reference< sdbc::XRef > Value;
367cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
368cdf0e10cSrcweir 	m_nWasNull = ::convert<uno::Reference< sdbc::XRef> >( m_pMyShell,
369cdf0e10cSrcweir 														  m_xTypeConverter,
370cdf0e10cSrcweir 														  m_aValueMap[ --columnIndex ],
371cdf0e10cSrcweir 														  Value );
372cdf0e10cSrcweir 	return Value;
373cdf0e10cSrcweir }
374cdf0e10cSrcweir 
375cdf0e10cSrcweir uno::Reference< sdbc::XBlob > SAL_CALL
getBlob(sal_Int32 columnIndex)376cdf0e10cSrcweir XRow_impl::getBlob(
377cdf0e10cSrcweir 		   sal_Int32 columnIndex )
378cdf0e10cSrcweir   throw( sdbc::SQLException,
379cdf0e10cSrcweir 	 uno::RuntimeException)
380cdf0e10cSrcweir {
381cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
382cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
383cdf0e10cSrcweir 	uno::Reference< sdbc::XBlob > Value;
384cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
385cdf0e10cSrcweir 	m_nWasNull = ::convert<uno::Reference< sdbc::XBlob> >( m_pMyShell,
386cdf0e10cSrcweir 														   m_xTypeConverter,
387cdf0e10cSrcweir 														   m_aValueMap[ --columnIndex ],
388cdf0e10cSrcweir 														   Value );
389cdf0e10cSrcweir 	return Value;
390cdf0e10cSrcweir }
391cdf0e10cSrcweir 
392cdf0e10cSrcweir uno::Reference< sdbc::XClob > SAL_CALL
getClob(sal_Int32 columnIndex)393cdf0e10cSrcweir XRow_impl::getClob(
394cdf0e10cSrcweir 		   sal_Int32 columnIndex )
395cdf0e10cSrcweir   throw( sdbc::SQLException,
396cdf0e10cSrcweir 	 uno::RuntimeException)
397cdf0e10cSrcweir {
398cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
399cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
400cdf0e10cSrcweir 	uno::Reference< sdbc::XClob > Value;
401cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
402cdf0e10cSrcweir 	m_nWasNull = ::convert<uno::Reference< sdbc::XClob> >( m_pMyShell,
403cdf0e10cSrcweir 														   m_xTypeConverter,
404cdf0e10cSrcweir 														   m_aValueMap[ --columnIndex ],
405cdf0e10cSrcweir 														   Value );
406cdf0e10cSrcweir 	return Value;
407cdf0e10cSrcweir }
408cdf0e10cSrcweir 
409cdf0e10cSrcweir 
410cdf0e10cSrcweir uno::Reference< sdbc::XArray > SAL_CALL
getArray(sal_Int32 columnIndex)411cdf0e10cSrcweir XRow_impl::getArray(
412cdf0e10cSrcweir 	sal_Int32 columnIndex )
413cdf0e10cSrcweir 	throw( sdbc::SQLException,
414cdf0e10cSrcweir 		   uno::RuntimeException)
415cdf0e10cSrcweir {
416cdf0e10cSrcweir 	if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
417cdf0e10cSrcweir 		throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() );
418cdf0e10cSrcweir 	uno::Reference< sdbc::XArray > Value;
419cdf0e10cSrcweir 	osl::MutexGuard aGuard( m_aMutex );
420cdf0e10cSrcweir 	m_nWasNull = ::convert<uno::Reference< sdbc::XArray> >( m_pMyShell,
421cdf0e10cSrcweir 															m_xTypeConverter,
422cdf0e10cSrcweir 															m_aValueMap[ --columnIndex ],
423cdf0e10cSrcweir 															Value );
424cdf0e10cSrcweir 	return Value;
425cdf0e10cSrcweir }
426