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