1*96de5490SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*96de5490SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*96de5490SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*96de5490SAndrew Rist  * distributed with this work for additional information
6*96de5490SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*96de5490SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*96de5490SAndrew Rist  * "License"); you may not use this file except in compliance
9*96de5490SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*96de5490SAndrew Rist  *
11*96de5490SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*96de5490SAndrew Rist  *
13*96de5490SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*96de5490SAndrew Rist  * software distributed under the License is distributed on an
15*96de5490SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*96de5490SAndrew Rist  * KIND, either express or implied.  See the License for the
17*96de5490SAndrew Rist  * specific language governing permissions and limitations
18*96de5490SAndrew Rist  * under the License.
19*96de5490SAndrew Rist  *
20*96de5490SAndrew Rist  *************************************************************/
21*96de5490SAndrew Rist 
22*96de5490SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_dbaccess.hxx"
26cdf0e10cSrcweir #ifndef _DBACORE_DATACOLUMN_HXX_
27cdf0e10cSrcweir #include "datacolumn.hxx"
28cdf0e10cSrcweir #endif
29cdf0e10cSrcweir #ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
30cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp>
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
33cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
36cdf0e10cSrcweir #include <com/sun/star/sdbc/DataType.hpp>
37cdf0e10cSrcweir #endif
38cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
39cdf0e10cSrcweir #include <com/sun/star/sdbc/ColumnValue.hpp>
40cdf0e10cSrcweir #endif
41cdf0e10cSrcweir #ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
42cdf0e10cSrcweir #include <cppuhelper/typeprovider.hxx>
43cdf0e10cSrcweir #endif
44cdf0e10cSrcweir #ifndef _TOOLS_DEBUG_HXX
45cdf0e10cSrcweir #include <tools/debug.hxx>
46cdf0e10cSrcweir #endif
47cdf0e10cSrcweir #ifndef DBACCESS_SHARED_DBASTRINGS_HRC
48cdf0e10cSrcweir #include "dbastrings.hrc"
49cdf0e10cSrcweir #endif
50cdf0e10cSrcweir #ifndef _DBASHARED_APITOOLS_HXX_
51cdf0e10cSrcweir #include "apitools.hxx"
52cdf0e10cSrcweir #endif
53cdf0e10cSrcweir 
54cdf0e10cSrcweir using namespace dbaccess;
55cdf0e10cSrcweir using namespace ::com::sun::star::sdbc;
56cdf0e10cSrcweir using namespace ::com::sun::star::sdb;
57cdf0e10cSrcweir using namespace ::com::sun::star::beans;
58cdf0e10cSrcweir using namespace ::com::sun::star::uno;
59cdf0e10cSrcweir using namespace ::com::sun::star::lang;
60cdf0e10cSrcweir using namespace ::com::sun::star::container;
61cdf0e10cSrcweir using namespace ::osl;
62cdf0e10cSrcweir using namespace ::comphelper;
63cdf0e10cSrcweir using namespace ::cppu;
64cdf0e10cSrcweir 
DBG_NAME(ODataColumn)65cdf0e10cSrcweir DBG_NAME(ODataColumn)
66cdf0e10cSrcweir //--------------------------------------------------------------------------
67cdf0e10cSrcweir ODataColumn::ODataColumn(
68cdf0e10cSrcweir 						 const Reference < XResultSetMetaData >& _xMetaData,
69cdf0e10cSrcweir 						 const Reference < XRow >& _xRow,
70cdf0e10cSrcweir 						 const Reference < XRowUpdate >& _xRowUpdate,
71cdf0e10cSrcweir 						 sal_Int32 _nPos,
72cdf0e10cSrcweir                          const Reference< XDatabaseMetaData >& _rxDBMeta)
73cdf0e10cSrcweir 					 :OResultColumn(_xMetaData, _nPos, _rxDBMeta)
74cdf0e10cSrcweir 					 ,m_xRow(_xRow)
75cdf0e10cSrcweir 					 ,m_xRowUpdate(_xRowUpdate)
76cdf0e10cSrcweir {
77cdf0e10cSrcweir 	DBG_CTOR(ODataColumn,NULL);
78cdf0e10cSrcweir }
79cdf0e10cSrcweir // -----------------------------------------------------------------------------
~ODataColumn()80cdf0e10cSrcweir ODataColumn::~ODataColumn()
81cdf0e10cSrcweir {
82cdf0e10cSrcweir 	DBG_DTOR(ODataColumn,NULL);
83cdf0e10cSrcweir }
84cdf0e10cSrcweir 
85cdf0e10cSrcweir // com::sun::star::lang::XTypeProvider
86cdf0e10cSrcweir //--------------------------------------------------------------------------
getTypes()87cdf0e10cSrcweir Sequence< Type > ODataColumn::getTypes() throw (RuntimeException)
88cdf0e10cSrcweir {
89cdf0e10cSrcweir 	OTypeCollection aTypes(::getCppuType( (const Reference< XColumn > *)0 ),
90cdf0e10cSrcweir 						   ::getCppuType( (const Reference< XColumnUpdate > *)0 ),
91cdf0e10cSrcweir 						   OColumn::getTypes());
92cdf0e10cSrcweir 	return aTypes.getTypes();
93cdf0e10cSrcweir }
94cdf0e10cSrcweir 
95cdf0e10cSrcweir //--------------------------------------------------------------------------
getImplementationId()96cdf0e10cSrcweir Sequence< sal_Int8 > ODataColumn::getImplementationId() throw (RuntimeException)
97cdf0e10cSrcweir {
98cdf0e10cSrcweir 	static OImplementationId * pId = 0;
99cdf0e10cSrcweir 	if (! pId)
100cdf0e10cSrcweir 	{
101cdf0e10cSrcweir 		MutexGuard aGuard( Mutex::getGlobalMutex() );
102cdf0e10cSrcweir 		if (! pId)
103cdf0e10cSrcweir 		{
104cdf0e10cSrcweir 			static OImplementationId aId;
105cdf0e10cSrcweir 			pId = &aId;
106cdf0e10cSrcweir 		}
107cdf0e10cSrcweir 	}
108cdf0e10cSrcweir 	return pId->getImplementationId();
109cdf0e10cSrcweir }
110cdf0e10cSrcweir 
111cdf0e10cSrcweir //------------------------------------------------------------------------------
queryInterface(const Type & _rType)112cdf0e10cSrcweir Any SAL_CALL ODataColumn::queryInterface( const Type & _rType ) throw (RuntimeException)
113cdf0e10cSrcweir {
114cdf0e10cSrcweir 	Any aReturn = OResultColumn::queryInterface(_rType);
115cdf0e10cSrcweir 	if (!aReturn.hasValue())
116cdf0e10cSrcweir 		aReturn = ::cppu::queryInterface(_rType,
117cdf0e10cSrcweir 			static_cast< XColumn* >(this),
118cdf0e10cSrcweir 			static_cast< XColumnUpdate* >(this)
119cdf0e10cSrcweir 		);
120cdf0e10cSrcweir 	return aReturn;
121cdf0e10cSrcweir }
122cdf0e10cSrcweir 
123cdf0e10cSrcweir // XServiceInfo
124cdf0e10cSrcweir //------------------------------------------------------------------------------
getImplementationName()125cdf0e10cSrcweir rtl::OUString ODataColumn::getImplementationName(  ) throw(RuntimeException)
126cdf0e10cSrcweir {
127cdf0e10cSrcweir 	return rtl::OUString::createFromAscii("com.sun.star.sdb.ODataColumn");
128cdf0e10cSrcweir }
129cdf0e10cSrcweir 
130cdf0e10cSrcweir //------------------------------------------------------------------------------
getSupportedServiceNames()131cdf0e10cSrcweir Sequence< ::rtl::OUString > ODataColumn::getSupportedServiceNames(  ) throw (RuntimeException)
132cdf0e10cSrcweir {
133cdf0e10cSrcweir 	Sequence< ::rtl::OUString > aSNS( 3 );
134cdf0e10cSrcweir 	aSNS[0] = SERVICE_SDBCX_COLUMN;
135cdf0e10cSrcweir 	aSNS[1] = SERVICE_SDB_RESULTCOLUMN;
136cdf0e10cSrcweir 	aSNS[2] = SERVICE_SDB_DATACOLUMN;
137cdf0e10cSrcweir 	return aSNS;
138cdf0e10cSrcweir }
139cdf0e10cSrcweir 
140cdf0e10cSrcweir // OComponentHelper
141cdf0e10cSrcweir //------------------------------------------------------------------------------
disposing()142cdf0e10cSrcweir void ODataColumn::disposing()
143cdf0e10cSrcweir {
144cdf0e10cSrcweir 	OResultColumn::disposing();
145cdf0e10cSrcweir 
146cdf0e10cSrcweir 	m_xRow = NULL;
147cdf0e10cSrcweir 	m_xRowUpdate = NULL;
148cdf0e10cSrcweir }
149cdf0e10cSrcweir 
150cdf0e10cSrcweir // ::com::sun::star::sdb::XColumn
151cdf0e10cSrcweir //------------------------------------------------------------------------------
wasNull(void)152cdf0e10cSrcweir sal_Bool ODataColumn::wasNull(void) throw( SQLException, RuntimeException )
153cdf0e10cSrcweir {
154cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
155cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
156cdf0e10cSrcweir 
157cdf0e10cSrcweir 	return m_xRow->wasNull();
158cdf0e10cSrcweir }
159cdf0e10cSrcweir 
160cdf0e10cSrcweir //------------------------------------------------------------------------------
getString(void)161cdf0e10cSrcweir rtl::OUString ODataColumn::getString(void) throw( SQLException, RuntimeException )
162cdf0e10cSrcweir {
163cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
164cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
165cdf0e10cSrcweir 
166cdf0e10cSrcweir 	return m_xRow->getString(m_nPos);
167cdf0e10cSrcweir }
168cdf0e10cSrcweir 
169cdf0e10cSrcweir //------------------------------------------------------------------------------
getBoolean(void)170cdf0e10cSrcweir sal_Bool ODataColumn::getBoolean(void) throw( SQLException, RuntimeException )
171cdf0e10cSrcweir {
172cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
173cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
174cdf0e10cSrcweir 
175cdf0e10cSrcweir 	return m_xRow->getBoolean(m_nPos);
176cdf0e10cSrcweir }
177cdf0e10cSrcweir 
178cdf0e10cSrcweir //------------------------------------------------------------------------------
getByte(void)179cdf0e10cSrcweir sal_Int8 ODataColumn::getByte(void) throw( SQLException, RuntimeException )
180cdf0e10cSrcweir {
181cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
182cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
183cdf0e10cSrcweir 
184cdf0e10cSrcweir 	return m_xRow->getByte(m_nPos);
185cdf0e10cSrcweir }
186cdf0e10cSrcweir 
187cdf0e10cSrcweir //------------------------------------------------------------------------------
getShort(void)188cdf0e10cSrcweir sal_Int16 ODataColumn::getShort(void) throw( SQLException, RuntimeException )
189cdf0e10cSrcweir {
190cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
191cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
192cdf0e10cSrcweir 
193cdf0e10cSrcweir 	return m_xRow->getShort(m_nPos);
194cdf0e10cSrcweir }
195cdf0e10cSrcweir 
196cdf0e10cSrcweir //------------------------------------------------------------------------------
getInt(void)197cdf0e10cSrcweir sal_Int32 ODataColumn::getInt(void) throw( SQLException, RuntimeException )
198cdf0e10cSrcweir {
199cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
200cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
201cdf0e10cSrcweir 
202cdf0e10cSrcweir 	return m_xRow->getInt(m_nPos);
203cdf0e10cSrcweir }
204cdf0e10cSrcweir 
205cdf0e10cSrcweir //------------------------------------------------------------------------------
getLong(void)206cdf0e10cSrcweir sal_Int64 ODataColumn::getLong(void) throw( SQLException, RuntimeException )
207cdf0e10cSrcweir {
208cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
209cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
210cdf0e10cSrcweir 
211cdf0e10cSrcweir 	return m_xRow->getLong(m_nPos);
212cdf0e10cSrcweir }
213cdf0e10cSrcweir 
214cdf0e10cSrcweir //------------------------------------------------------------------------------
getFloat(void)215cdf0e10cSrcweir float ODataColumn::getFloat(void) throw( SQLException, RuntimeException )
216cdf0e10cSrcweir {
217cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
218cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
219cdf0e10cSrcweir 
220cdf0e10cSrcweir 	return m_xRow->getFloat(m_nPos);
221cdf0e10cSrcweir }
222cdf0e10cSrcweir //------------------------------------------------------------------------------
getDouble(void)223cdf0e10cSrcweir double ODataColumn::getDouble(void) throw( SQLException, RuntimeException )
224cdf0e10cSrcweir {
225cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
226cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
227cdf0e10cSrcweir 
228cdf0e10cSrcweir 	return m_xRow->getDouble(m_nPos);
229cdf0e10cSrcweir }
230cdf0e10cSrcweir 
231cdf0e10cSrcweir //------------------------------------------------------------------------------
getBytes(void)232cdf0e10cSrcweir Sequence< sal_Int8 > ODataColumn::getBytes(void) throw( SQLException, RuntimeException )
233cdf0e10cSrcweir {
234cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
235cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
236cdf0e10cSrcweir 
237cdf0e10cSrcweir 	return m_xRow->getBytes(m_nPos);
238cdf0e10cSrcweir }
239cdf0e10cSrcweir //------------------------------------------------------------------------------
getDate(void)240cdf0e10cSrcweir com::sun::star::util::Date ODataColumn::getDate(void) throw( SQLException, RuntimeException )
241cdf0e10cSrcweir {
242cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
243cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
244cdf0e10cSrcweir 
245cdf0e10cSrcweir 	return m_xRow->getDate(m_nPos);
246cdf0e10cSrcweir }
247cdf0e10cSrcweir 
248cdf0e10cSrcweir //------------------------------------------------------------------------------
getTime(void)249cdf0e10cSrcweir com::sun::star::util::Time ODataColumn::getTime(void) throw( SQLException, RuntimeException )
250cdf0e10cSrcweir {
251cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
252cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
253cdf0e10cSrcweir 
254cdf0e10cSrcweir 	return m_xRow->getTime(m_nPos);
255cdf0e10cSrcweir }
256cdf0e10cSrcweir //------------------------------------------------------------------------------
getTimestamp(void)257cdf0e10cSrcweir com::sun::star::util::DateTime ODataColumn::getTimestamp(void) throw( SQLException, RuntimeException )
258cdf0e10cSrcweir {
259cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
260cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
261cdf0e10cSrcweir 
262cdf0e10cSrcweir 	return m_xRow->getTimestamp(m_nPos);
263cdf0e10cSrcweir }
264cdf0e10cSrcweir 
265cdf0e10cSrcweir //------------------------------------------------------------------------------
getBinaryStream(void)266cdf0e10cSrcweir Reference< ::com::sun::star::io::XInputStream >  ODataColumn::getBinaryStream(void) throw( SQLException, RuntimeException )
267cdf0e10cSrcweir {
268cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
269cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
270cdf0e10cSrcweir 
271cdf0e10cSrcweir 	return m_xRow->getBinaryStream(m_nPos);
272cdf0e10cSrcweir }
273cdf0e10cSrcweir 
274cdf0e10cSrcweir //------------------------------------------------------------------------------
getCharacterStream(void)275cdf0e10cSrcweir Reference< ::com::sun::star::io::XInputStream >  ODataColumn::getCharacterStream(void) throw( SQLException, RuntimeException )
276cdf0e10cSrcweir {
277cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
278cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
279cdf0e10cSrcweir 
280cdf0e10cSrcweir 	return m_xRow->getCharacterStream(m_nPos);
281cdf0e10cSrcweir }
282cdf0e10cSrcweir 
283cdf0e10cSrcweir //------------------------------------------------------------------------------
getObject(const Reference<::com::sun::star::container::XNameAccess> & typeMap)284cdf0e10cSrcweir Any ODataColumn::getObject(const Reference< ::com::sun::star::container::XNameAccess > & typeMap) throw( SQLException, RuntimeException )
285cdf0e10cSrcweir {
286cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
287cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
288cdf0e10cSrcweir 
289cdf0e10cSrcweir 	return m_xRow->getObject(m_nPos, typeMap);
290cdf0e10cSrcweir }
291cdf0e10cSrcweir 
292cdf0e10cSrcweir //------------------------------------------------------------------------------
getRef(void)293cdf0e10cSrcweir Reference< XRef >  ODataColumn::getRef(void) throw( SQLException, RuntimeException )
294cdf0e10cSrcweir {
295cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
296cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
297cdf0e10cSrcweir 
298cdf0e10cSrcweir 	return m_xRow->getRef(m_nPos);
299cdf0e10cSrcweir }
300cdf0e10cSrcweir 
301cdf0e10cSrcweir //------------------------------------------------------------------------------
getBlob(void)302cdf0e10cSrcweir Reference< XBlob >  ODataColumn::getBlob(void) throw( SQLException, RuntimeException )
303cdf0e10cSrcweir {
304cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
305cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
306cdf0e10cSrcweir 
307cdf0e10cSrcweir 	return m_xRow->getBlob(m_nPos);
308cdf0e10cSrcweir }
309cdf0e10cSrcweir 
310cdf0e10cSrcweir //------------------------------------------------------------------------------
getClob(void)311cdf0e10cSrcweir Reference< XClob >  ODataColumn::getClob(void) throw( SQLException, RuntimeException )
312cdf0e10cSrcweir {
313cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
314cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
315cdf0e10cSrcweir 
316cdf0e10cSrcweir 	return m_xRow->getClob(m_nPos);
317cdf0e10cSrcweir }
318cdf0e10cSrcweir 
319cdf0e10cSrcweir //------------------------------------------------------------------------------
getArray(void)320cdf0e10cSrcweir Reference< XArray >  ODataColumn::getArray(void) throw( SQLException, RuntimeException )
321cdf0e10cSrcweir {
322cdf0e10cSrcweir 	MutexGuard aGuard(m_aMutex);
323cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRow.is());
324cdf0e10cSrcweir 
325cdf0e10cSrcweir 	return m_xRow->getArray(m_nPos);
326cdf0e10cSrcweir }
327cdf0e10cSrcweir 
328cdf0e10cSrcweir // ::com::sun::star::sdb::XColumnUpdate
329cdf0e10cSrcweir //------------------------------------------------------------------------------
updateNull(void)330cdf0e10cSrcweir void ODataColumn::updateNull(void) throw( SQLException, RuntimeException )
331cdf0e10cSrcweir {
332cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
333cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
334cdf0e10cSrcweir 
335cdf0e10cSrcweir 	m_xRowUpdate->updateNull(m_nPos);
336cdf0e10cSrcweir }
337cdf0e10cSrcweir 
338cdf0e10cSrcweir //------------------------------------------------------------------------------
updateBoolean(sal_Bool x)339cdf0e10cSrcweir void ODataColumn::updateBoolean(sal_Bool x) throw( SQLException, RuntimeException )
340cdf0e10cSrcweir {
341cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
342cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
343cdf0e10cSrcweir 
344cdf0e10cSrcweir 	m_xRowUpdate->updateBoolean(m_nPos, x);
345cdf0e10cSrcweir }
346cdf0e10cSrcweir 
347cdf0e10cSrcweir //------------------------------------------------------------------------------
updateByte(sal_Int8 x)348cdf0e10cSrcweir void ODataColumn::updateByte(sal_Int8 x) throw( SQLException, RuntimeException )
349cdf0e10cSrcweir {
350cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
351cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
352cdf0e10cSrcweir 
353cdf0e10cSrcweir 	m_xRowUpdate->updateByte(m_nPos, x);
354cdf0e10cSrcweir }
355cdf0e10cSrcweir 
356cdf0e10cSrcweir //------------------------------------------------------------------------------
updateShort(sal_Int16 x)357cdf0e10cSrcweir void ODataColumn::updateShort(sal_Int16 x) throw( SQLException, RuntimeException )
358cdf0e10cSrcweir {
359cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
360cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
361cdf0e10cSrcweir 
362cdf0e10cSrcweir 	m_xRowUpdate->updateShort(m_nPos, x);
363cdf0e10cSrcweir }
364cdf0e10cSrcweir 
365cdf0e10cSrcweir //------------------------------------------------------------------------------
updateInt(sal_Int32 x)366cdf0e10cSrcweir void ODataColumn::updateInt(sal_Int32 x) throw( SQLException, RuntimeException )
367cdf0e10cSrcweir {
368cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
369cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
370cdf0e10cSrcweir 
371cdf0e10cSrcweir 	m_xRowUpdate->updateInt(m_nPos, x);
372cdf0e10cSrcweir }
373cdf0e10cSrcweir 
374cdf0e10cSrcweir //------------------------------------------------------------------------------
updateLong(sal_Int64 x)375cdf0e10cSrcweir void ODataColumn::updateLong(sal_Int64 x) throw( SQLException, RuntimeException )
376cdf0e10cSrcweir {
377cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
378cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
379cdf0e10cSrcweir 
380cdf0e10cSrcweir 	m_xRowUpdate->updateLong(m_nPos, x);
381cdf0e10cSrcweir }
382cdf0e10cSrcweir 
383cdf0e10cSrcweir //------------------------------------------------------------------------------
updateFloat(float x)384cdf0e10cSrcweir void ODataColumn::updateFloat(float x) throw( SQLException, RuntimeException )
385cdf0e10cSrcweir {
386cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
387cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
388cdf0e10cSrcweir 
389cdf0e10cSrcweir 	m_xRowUpdate->updateFloat(m_nPos, x);
390cdf0e10cSrcweir }
391cdf0e10cSrcweir 
392cdf0e10cSrcweir //------------------------------------------------------------------------------
updateDouble(double x)393cdf0e10cSrcweir void ODataColumn::updateDouble(double x) throw( SQLException, RuntimeException )
394cdf0e10cSrcweir {
395cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
396cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
397cdf0e10cSrcweir 
398cdf0e10cSrcweir 	m_xRowUpdate->updateDouble(m_nPos, x);
399cdf0e10cSrcweir }
400cdf0e10cSrcweir 
401cdf0e10cSrcweir //------------------------------------------------------------------------------
updateString(const rtl::OUString & x)402cdf0e10cSrcweir void ODataColumn::updateString(const rtl::OUString& x) throw( SQLException, RuntimeException )
403cdf0e10cSrcweir {
404cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
405cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
406cdf0e10cSrcweir 
407cdf0e10cSrcweir 	m_xRowUpdate->updateString(m_nPos, x);
408cdf0e10cSrcweir }
409cdf0e10cSrcweir 
410cdf0e10cSrcweir //------------------------------------------------------------------------------
updateBytes(const Sequence<sal_Int8> & x)411cdf0e10cSrcweir void ODataColumn::updateBytes(const Sequence< sal_Int8 >& x) throw( SQLException, RuntimeException )
412cdf0e10cSrcweir {
413cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
414cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
415cdf0e10cSrcweir 
416cdf0e10cSrcweir 	m_xRowUpdate->updateBytes(m_nPos, x);
417cdf0e10cSrcweir }
418cdf0e10cSrcweir 
419cdf0e10cSrcweir //------------------------------------------------------------------------------
updateDate(const com::sun::star::util::Date & x)420cdf0e10cSrcweir void ODataColumn::updateDate(const com::sun::star::util::Date& x) throw( SQLException, RuntimeException )
421cdf0e10cSrcweir {
422cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
423cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
424cdf0e10cSrcweir 
425cdf0e10cSrcweir 	m_xRowUpdate->updateDate(m_nPos, x);
426cdf0e10cSrcweir }
427cdf0e10cSrcweir 
428cdf0e10cSrcweir //------------------------------------------------------------------------------
updateTime(const::com::sun::star::util::Time & x)429cdf0e10cSrcweir void ODataColumn::updateTime(const ::com::sun::star::util::Time& x) throw( SQLException, RuntimeException )
430cdf0e10cSrcweir {
431cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
432cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
433cdf0e10cSrcweir 
434cdf0e10cSrcweir 	m_xRowUpdate->updateTime(m_nPos, x);
435cdf0e10cSrcweir }
436cdf0e10cSrcweir 
437cdf0e10cSrcweir //------------------------------------------------------------------------------
updateTimestamp(const::com::sun::star::util::DateTime & x)438cdf0e10cSrcweir void ODataColumn::updateTimestamp(const ::com::sun::star::util::DateTime& x) throw( SQLException, RuntimeException )
439cdf0e10cSrcweir {
440cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
441cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
442cdf0e10cSrcweir 
443cdf0e10cSrcweir 	m_xRowUpdate->updateTimestamp(m_nPos, x);
444cdf0e10cSrcweir }
445cdf0e10cSrcweir 
446cdf0e10cSrcweir //------------------------------------------------------------------------------
updateCharacterStream(const Reference<::com::sun::star::io::XInputStream> & x,sal_Int32 length)447cdf0e10cSrcweir void ODataColumn::updateCharacterStream(const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException )
448cdf0e10cSrcweir {
449cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
450cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
451cdf0e10cSrcweir 
452cdf0e10cSrcweir 	m_xRowUpdate->updateCharacterStream(m_nPos, x, length);
453cdf0e10cSrcweir }
454cdf0e10cSrcweir 
455cdf0e10cSrcweir //------------------------------------------------------------------------------
updateBinaryStream(const Reference<::com::sun::star::io::XInputStream> & x,sal_Int32 length)456cdf0e10cSrcweir void ODataColumn::updateBinaryStream(const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException )
457cdf0e10cSrcweir {
458cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
459cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
460cdf0e10cSrcweir 
461cdf0e10cSrcweir 	m_xRowUpdate->updateBinaryStream(m_nPos, x, length);
462cdf0e10cSrcweir }
463cdf0e10cSrcweir 
464cdf0e10cSrcweir //------------------------------------------------------------------------------
updateNumericObject(const Any & x,sal_Int32 scale)465cdf0e10cSrcweir void ODataColumn::updateNumericObject(const Any& x, sal_Int32 scale) throw( SQLException, RuntimeException )
466cdf0e10cSrcweir {
467cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
468cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
469cdf0e10cSrcweir 
470cdf0e10cSrcweir 	m_xRowUpdate->updateNumericObject(m_nPos, x, scale);
471cdf0e10cSrcweir }
472cdf0e10cSrcweir 
473cdf0e10cSrcweir //------------------------------------------------------------------------------
updateObject(const Any & x)474cdf0e10cSrcweir void ODataColumn::updateObject(const Any& x) throw( SQLException, RuntimeException )
475cdf0e10cSrcweir {
476cdf0e10cSrcweir 	MutexGuard aGuard( m_aMutex );
477cdf0e10cSrcweir 	::connectivity::checkDisposed(!m_xRowUpdate.is());
478cdf0e10cSrcweir 
479cdf0e10cSrcweir 	m_xRowUpdate->updateObject(m_nPos, x);
480cdf0e10cSrcweir }
481cdf0e10cSrcweir 
482