1*34dd1e25SAndrew Rist /**************************************************************
2*34dd1e25SAndrew Rist  *
3*34dd1e25SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*34dd1e25SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*34dd1e25SAndrew Rist  * distributed with this work for additional information
6*34dd1e25SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*34dd1e25SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*34dd1e25SAndrew Rist  * "License"); you may not use this file except in compliance
9*34dd1e25SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*34dd1e25SAndrew Rist  *
11*34dd1e25SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*34dd1e25SAndrew Rist  *
13*34dd1e25SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*34dd1e25SAndrew Rist  * software distributed under the License is distributed on an
15*34dd1e25SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*34dd1e25SAndrew Rist  * KIND, either express or implied.  See the License for the
17*34dd1e25SAndrew Rist  * specific language governing permissions and limitations
18*34dd1e25SAndrew Rist  * under the License.
19*34dd1e25SAndrew Rist  *
20*34dd1e25SAndrew Rist  *************************************************************/
21*34dd1e25SAndrew Rist 
22*34dd1e25SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #include <stdio.h>
25cdf0e10cSrcweir #include <osl/diagnose.h>
26cdf0e10cSrcweir #include "SPreparedStatement.hxx"
27cdf0e10cSrcweir #include <com/sun/star/sdbc/DataType.hpp>
28cdf0e10cSrcweir #include "SResultSetMetaData.hxx"
29cdf0e10cSrcweir #include <cppuhelper/typeprovider.hxx>
30cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp>
31cdf0e10cSrcweir #include "propertyids.hxx"
32cdf0e10cSrcweir 
33cdf0e10cSrcweir using namespace connectivity::skeleton;
34cdf0e10cSrcweir using namespace com::sun::star::uno;
35cdf0e10cSrcweir using namespace com::sun::star::lang;
36cdf0e10cSrcweir using namespace com::sun::star::beans;
37cdf0e10cSrcweir using namespace com::sun::star::sdbc;
38cdf0e10cSrcweir using namespace com::sun::star::container;
39cdf0e10cSrcweir using namespace com::sun::star::io;
40cdf0e10cSrcweir using namespace com::sun::star::util;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbcx.skeleton.PreparedStatement","com.sun.star.sdbc.PreparedStatement");
43cdf0e10cSrcweir 
44cdf0e10cSrcweir 
OPreparedStatement(OConnection * _pConnection,const TTypeInfoVector & _TypeInfo,const::rtl::OUString & sql)45cdf0e10cSrcweir OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const TTypeInfoVector& _TypeInfo,const ::rtl::OUString& sql)
46cdf0e10cSrcweir 	:OStatement_BASE2(_pConnection)
47cdf0e10cSrcweir 	,m_aTypeInfo(_TypeInfo)
48cdf0e10cSrcweir 	,m_bPrepared(sal_False)
49cdf0e10cSrcweir 	,m_sSqlStatement(sql)
50cdf0e10cSrcweir 	,m_nNumParams(0)
51cdf0e10cSrcweir {
52cdf0e10cSrcweir }
53cdf0e10cSrcweir // -----------------------------------------------------------------------------
~OPreparedStatement()54cdf0e10cSrcweir OPreparedStatement::~OPreparedStatement()
55cdf0e10cSrcweir {
56cdf0e10cSrcweir }
57cdf0e10cSrcweir // -----------------------------------------------------------------------------
acquire()58cdf0e10cSrcweir void SAL_CALL OPreparedStatement::acquire() throw()
59cdf0e10cSrcweir {
60cdf0e10cSrcweir 	OStatement_BASE2::acquire();
61cdf0e10cSrcweir }
62cdf0e10cSrcweir // -----------------------------------------------------------------------------
release()63cdf0e10cSrcweir void SAL_CALL OPreparedStatement::release() throw()
64cdf0e10cSrcweir {
65cdf0e10cSrcweir 	OStatement_BASE2::release();
66cdf0e10cSrcweir }
67cdf0e10cSrcweir // -----------------------------------------------------------------------------
queryInterface(const Type & rType)68cdf0e10cSrcweir Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(RuntimeException)
69cdf0e10cSrcweir {
70cdf0e10cSrcweir 	Any aRet = OStatement_BASE2::queryInterface(rType);
71cdf0e10cSrcweir 	if(!aRet.hasValue())
72cdf0e10cSrcweir 		aRet = OPreparedStatement_BASE::queryInterface(rType);
73cdf0e10cSrcweir 	return aRet;
74cdf0e10cSrcweir }
75cdf0e10cSrcweir // -------------------------------------------------------------------------
getTypes()76cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OPreparedStatement::getTypes(  ) throw(::com::sun::star::uno::RuntimeException)
77cdf0e10cSrcweir {
78cdf0e10cSrcweir 	return concatSequences(OPreparedStatement_BASE::getTypes(),OStatement_BASE2::getTypes());
79cdf0e10cSrcweir }
80cdf0e10cSrcweir // -------------------------------------------------------------------------
81cdf0e10cSrcweir 
getMetaData()82cdf0e10cSrcweir Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData(  ) throw(SQLException, RuntimeException)
83cdf0e10cSrcweir {
84cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
85cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
86cdf0e10cSrcweir 
87cdf0e10cSrcweir 	if(!m_xMetaData.is())
88cdf0e10cSrcweir 		m_xMetaData = new OResultSetMetaData(getOwnConnection());
89cdf0e10cSrcweir 	return m_xMetaData;
90cdf0e10cSrcweir }
91cdf0e10cSrcweir // -------------------------------------------------------------------------
92cdf0e10cSrcweir 
close()93cdf0e10cSrcweir void SAL_CALL OPreparedStatement::close(  ) throw(SQLException, RuntimeException)
94cdf0e10cSrcweir {
95cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
96cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 
99cdf0e10cSrcweir 	// Reset last warning message
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 	try {
102cdf0e10cSrcweir 		clearWarnings ();
103cdf0e10cSrcweir 		OStatement_BASE2::close();
104cdf0e10cSrcweir 	}
105cdf0e10cSrcweir 	catch (SQLException &) {
106cdf0e10cSrcweir 		// If we get an error, ignore
107cdf0e10cSrcweir 	}
108cdf0e10cSrcweir 
109cdf0e10cSrcweir 	// Remove this Statement object from the Connection object's
110cdf0e10cSrcweir 	// list
111cdf0e10cSrcweir }
112cdf0e10cSrcweir // -------------------------------------------------------------------------
113cdf0e10cSrcweir 
execute()114cdf0e10cSrcweir sal_Bool SAL_CALL OPreparedStatement::execute(  ) throw(SQLException, RuntimeException)
115cdf0e10cSrcweir {
116cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
117cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
118cdf0e10cSrcweir 
119cdf0e10cSrcweir 
120cdf0e10cSrcweir 	// same as in statement with the difference that this statement also can contain parameter
121cdf0e10cSrcweir 	return sal_False;
122cdf0e10cSrcweir }
123cdf0e10cSrcweir // -------------------------------------------------------------------------
124cdf0e10cSrcweir 
executeUpdate()125cdf0e10cSrcweir sal_Int32 SAL_CALL OPreparedStatement::executeUpdate(  ) throw(SQLException, RuntimeException)
126cdf0e10cSrcweir {
127cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
128cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
129cdf0e10cSrcweir 
130cdf0e10cSrcweir 	// same as in statement with the difference that this statement also can contain parameter
131cdf0e10cSrcweir 	return 0;
132cdf0e10cSrcweir }
133cdf0e10cSrcweir // -------------------------------------------------------------------------
134cdf0e10cSrcweir 
setString(sal_Int32 parameterIndex,const::rtl::OUString & x)135cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
136cdf0e10cSrcweir {
137cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
138cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
139cdf0e10cSrcweir }
140cdf0e10cSrcweir // -------------------------------------------------------------------------
141cdf0e10cSrcweir 
getConnection()142cdf0e10cSrcweir Reference< XConnection > SAL_CALL OPreparedStatement::getConnection(  ) throw(SQLException, RuntimeException)
143cdf0e10cSrcweir {
144cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
145cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
146cdf0e10cSrcweir 
147cdf0e10cSrcweir 	return (Reference< XConnection >)m_pConnection;
148cdf0e10cSrcweir }
149cdf0e10cSrcweir // -------------------------------------------------------------------------
150cdf0e10cSrcweir 
executeQuery()151cdf0e10cSrcweir Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery(  ) throw(SQLException, RuntimeException)
152cdf0e10cSrcweir {
153cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
154cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
155cdf0e10cSrcweir 
156cdf0e10cSrcweir 	Reference< XResultSet > rs = NULL;
157cdf0e10cSrcweir 
158cdf0e10cSrcweir 
159cdf0e10cSrcweir 	return rs;
160cdf0e10cSrcweir }
161cdf0e10cSrcweir // -------------------------------------------------------------------------
162cdf0e10cSrcweir 
setBoolean(sal_Int32 parameterIndex,sal_Bool x)163cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException)
164cdf0e10cSrcweir {
165cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
166cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
167cdf0e10cSrcweir 
168cdf0e10cSrcweir }
169cdf0e10cSrcweir // -------------------------------------------------------------------------
setByte(sal_Int32 parameterIndex,sal_Int8 x)170cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
171cdf0e10cSrcweir {
172cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
173cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
174cdf0e10cSrcweir 
175cdf0e10cSrcweir 
176cdf0e10cSrcweir }
177cdf0e10cSrcweir // -------------------------------------------------------------------------
178cdf0e10cSrcweir 
setDate(sal_Int32 parameterIndex,const Date & aData)179cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& aData ) throw(SQLException, RuntimeException)
180cdf0e10cSrcweir {
181cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
182cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
183cdf0e10cSrcweir 
184cdf0e10cSrcweir }
185cdf0e10cSrcweir // -------------------------------------------------------------------------
186cdf0e10cSrcweir 
187cdf0e10cSrcweir 
setTime(sal_Int32 parameterIndex,const Time & aVal)188cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException)
189cdf0e10cSrcweir {
190cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
191cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
192cdf0e10cSrcweir 
193cdf0e10cSrcweir }
194cdf0e10cSrcweir // -------------------------------------------------------------------------
195cdf0e10cSrcweir 
setTimestamp(sal_Int32 parameterIndex,const DateTime & aVal)196cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const DateTime& aVal ) throw(SQLException, RuntimeException)
197cdf0e10cSrcweir {
198cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
199cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
200cdf0e10cSrcweir 
201cdf0e10cSrcweir }
202cdf0e10cSrcweir // -------------------------------------------------------------------------
203cdf0e10cSrcweir 
setDouble(sal_Int32 parameterIndex,double x)204cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException)
205cdf0e10cSrcweir {
206cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
207cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
208cdf0e10cSrcweir 
209cdf0e10cSrcweir }
210cdf0e10cSrcweir 
211cdf0e10cSrcweir // -------------------------------------------------------------------------
212cdf0e10cSrcweir 
setFloat(sal_Int32 parameterIndex,float x)213cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
214cdf0e10cSrcweir {
215cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
216cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
217cdf0e10cSrcweir 
218cdf0e10cSrcweir }
219cdf0e10cSrcweir // -------------------------------------------------------------------------
220cdf0e10cSrcweir 
setInt(sal_Int32 parameterIndex,sal_Int32 x)221cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
222cdf0e10cSrcweir {
223cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
224cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
225cdf0e10cSrcweir 
226cdf0e10cSrcweir }
227cdf0e10cSrcweir // -------------------------------------------------------------------------
228cdf0e10cSrcweir 
setLong(sal_Int32 parameterIndex,sal_Int64 aVal)229cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 aVal ) throw(SQLException, RuntimeException)
230cdf0e10cSrcweir {
231cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
232cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
233cdf0e10cSrcweir 
234cdf0e10cSrcweir }
235cdf0e10cSrcweir // -------------------------------------------------------------------------
236cdf0e10cSrcweir 
setNull(sal_Int32 parameterIndex,sal_Int32 sqlType)237cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw(SQLException, RuntimeException)
238cdf0e10cSrcweir {
239cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
240cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
241cdf0e10cSrcweir 
242cdf0e10cSrcweir }
243cdf0e10cSrcweir // -------------------------------------------------------------------------
244cdf0e10cSrcweir 
setClob(sal_Int32 parameterIndex,const Reference<XClob> & x)245cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Reference< XClob >& x ) throw(SQLException, RuntimeException)
246cdf0e10cSrcweir {
247cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
248cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
249cdf0e10cSrcweir 
250cdf0e10cSrcweir }
251cdf0e10cSrcweir // -------------------------------------------------------------------------
252cdf0e10cSrcweir 
setBlob(sal_Int32 parameterIndex,const Reference<XBlob> & x)253cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Reference< XBlob >& x ) throw(SQLException, RuntimeException)
254cdf0e10cSrcweir {
255cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
256cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
257cdf0e10cSrcweir 
258cdf0e10cSrcweir }
259cdf0e10cSrcweir // -------------------------------------------------------------------------
260cdf0e10cSrcweir 
setArray(sal_Int32 parameterIndex,const Reference<XArray> & x)261cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Reference< XArray >& x ) throw(SQLException, RuntimeException)
262cdf0e10cSrcweir {
263cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
264cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
265cdf0e10cSrcweir 
266cdf0e10cSrcweir }
267cdf0e10cSrcweir // -------------------------------------------------------------------------
268cdf0e10cSrcweir 
setRef(sal_Int32 parameterIndex,const Reference<XRef> & x)269cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Reference< XRef >& x ) throw(SQLException, RuntimeException)
270cdf0e10cSrcweir {
271cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
272cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
273cdf0e10cSrcweir 
274cdf0e10cSrcweir }
275cdf0e10cSrcweir // -------------------------------------------------------------------------
276cdf0e10cSrcweir 
setObjectWithInfo(sal_Int32 parameterIndex,const Any & x,sal_Int32 sqlType,sal_Int32 scale)277cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
278cdf0e10cSrcweir {
279cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
280cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
281cdf0e10cSrcweir 
282cdf0e10cSrcweir }
283cdf0e10cSrcweir // -------------------------------------------------------------------------
284cdf0e10cSrcweir 
setObjectNull(sal_Int32 parameterIndex,sal_Int32 sqlType,const::rtl::OUString & typeName)285cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException)
286cdf0e10cSrcweir {
287cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
288cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
289cdf0e10cSrcweir 
290cdf0e10cSrcweir }
291cdf0e10cSrcweir // -------------------------------------------------------------------------
292cdf0e10cSrcweir 
setObject(sal_Int32 parameterIndex,const Any & x)293cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException)
294cdf0e10cSrcweir {
295cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
296cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
297cdf0e10cSrcweir 
298cdf0e10cSrcweir }
299cdf0e10cSrcweir // -------------------------------------------------------------------------
300cdf0e10cSrcweir 
setShort(sal_Int32 parameterIndex,sal_Int16 x)301cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
302cdf0e10cSrcweir {
303cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
304cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
305cdf0e10cSrcweir 
306cdf0e10cSrcweir }
307cdf0e10cSrcweir // -------------------------------------------------------------------------
308cdf0e10cSrcweir 
setBytes(sal_Int32 parameterIndex,const Sequence<sal_Int8> & x)309cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
310cdf0e10cSrcweir {
311cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
312cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
313cdf0e10cSrcweir 
314cdf0e10cSrcweir }
315cdf0e10cSrcweir // -------------------------------------------------------------------------
316cdf0e10cSrcweir 
317cdf0e10cSrcweir 
setCharacterStream(sal_Int32 parameterIndex,const Reference<::com::sun::star::io::XInputStream> & x,sal_Int32 length)318cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
319cdf0e10cSrcweir {
320cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
321cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
322cdf0e10cSrcweir 
323cdf0e10cSrcweir }
324cdf0e10cSrcweir // -------------------------------------------------------------------------
325cdf0e10cSrcweir 
setBinaryStream(sal_Int32 parameterIndex,const Reference<::com::sun::star::io::XInputStream> & x,sal_Int32 length)326cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
327cdf0e10cSrcweir {
328cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
329cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
330cdf0e10cSrcweir 
331cdf0e10cSrcweir }
332cdf0e10cSrcweir // -------------------------------------------------------------------------
333cdf0e10cSrcweir 
clearParameters()334cdf0e10cSrcweir void SAL_CALL OPreparedStatement::clearParameters(  ) throw(SQLException, RuntimeException)
335cdf0e10cSrcweir {
336cdf0e10cSrcweir }
337cdf0e10cSrcweir // -------------------------------------------------------------------------
clearBatch()338cdf0e10cSrcweir void SAL_CALL OPreparedStatement::clearBatch(  ) throw(SQLException, RuntimeException)
339cdf0e10cSrcweir {
340cdf0e10cSrcweir }
341cdf0e10cSrcweir // -------------------------------------------------------------------------
342cdf0e10cSrcweir 
addBatch()343cdf0e10cSrcweir void SAL_CALL OPreparedStatement::addBatch( ) throw(SQLException, RuntimeException)
344cdf0e10cSrcweir {
345cdf0e10cSrcweir }
346cdf0e10cSrcweir // -------------------------------------------------------------------------
347cdf0e10cSrcweir 
executeBatch()348cdf0e10cSrcweir Sequence< sal_Int32 > SAL_CALL OPreparedStatement::executeBatch(  ) throw(SQLException, RuntimeException)
349cdf0e10cSrcweir {
350cdf0e10cSrcweir 	return Sequence< sal_Int32 > ();
351cdf0e10cSrcweir }
352cdf0e10cSrcweir // -------------------------------------------------------------------------
setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any & rValue)353cdf0e10cSrcweir void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
354cdf0e10cSrcweir {
355cdf0e10cSrcweir 	switch(nHandle)
356cdf0e10cSrcweir 	{
357cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETCONCURRENCY:
358cdf0e10cSrcweir 			break;
359cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETTYPE:
360cdf0e10cSrcweir 			break;
361cdf0e10cSrcweir 		case PROPERTY_ID_FETCHDIRECTION:
362cdf0e10cSrcweir 			break;
363cdf0e10cSrcweir 		case PROPERTY_ID_USEBOOKMARKS:
364cdf0e10cSrcweir 			break;
365cdf0e10cSrcweir 		default:
366cdf0e10cSrcweir 			OStatement_Base::setFastPropertyValue_NoBroadcast(nHandle,rValue);
367cdf0e10cSrcweir 	}
368cdf0e10cSrcweir }
369cdf0e10cSrcweir // -----------------------------------------------------------------------------
checkParameterIndex(sal_Int32 _parameterIndex)370cdf0e10cSrcweir void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex)
371cdf0e10cSrcweir {
372cdf0e10cSrcweir 	if(	!_parameterIndex || _parameterIndex > m_nNumParams)
373cdf0e10cSrcweir 		throw SQLException();
374cdf0e10cSrcweir }
375cdf0e10cSrcweir // -----------------------------------------------------------------------------
376cdf0e10cSrcweir 
377cdf0e10cSrcweir 
378