1*079eb577SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*079eb577SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*079eb577SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*079eb577SAndrew Rist * distributed with this work for additional information 6*079eb577SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*079eb577SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*079eb577SAndrew Rist * "License"); you may not use this file except in compliance 9*079eb577SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*079eb577SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*079eb577SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*079eb577SAndrew Rist * software distributed under the License is distributed on an 15*079eb577SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*079eb577SAndrew Rist * KIND, either express or implied. See the License for the 17*079eb577SAndrew Rist * specific language governing permissions and limitations 18*079eb577SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*079eb577SAndrew Rist *************************************************************/ 21cdf0e10cSrcweir 22cdf0e10cSrcweir #include "mysqlc_propertyids.hxx" 23cdf0e10cSrcweir #include "mysqlc_general.hxx" 24cdf0e10cSrcweir #include "mysqlc_resultset.hxx" 25cdf0e10cSrcweir #include "mysqlc_resultsetmetadata.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <com/sun/star/sdbc/DataType.hpp> 28cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp> 29cdf0e10cSrcweir #include <com/sun/star/sdbcx/CompareBookmark.hpp> 30cdf0e10cSrcweir #include <com/sun/star/sdbc/ResultSetConcurrency.hpp> 31cdf0e10cSrcweir #include <com/sun/star/sdbc/ResultSetType.hpp> 32cdf0e10cSrcweir #include <com/sun/star/sdbc/FetchDirection.hpp> 33cdf0e10cSrcweir #include <cppuhelper/typeprovider.hxx> 34cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp> 35cdf0e10cSrcweir 36cdf0e10cSrcweir using namespace connectivity::mysqlc; 37cdf0e10cSrcweir using namespace cppu; 38cdf0e10cSrcweir using namespace com::sun::star::uno; 39cdf0e10cSrcweir using namespace com::sun::star::lang; 40cdf0e10cSrcweir using namespace com::sun::star::beans; 41cdf0e10cSrcweir using namespace com::sun::star::sdbc; 42cdf0e10cSrcweir using namespace com::sun::star::sdbcx; 43cdf0e10cSrcweir using namespace com::sun::star::container; 44cdf0e10cSrcweir using namespace com::sun::star::io; 45cdf0e10cSrcweir using namespace com::sun::star::util; 46cdf0e10cSrcweir using ::osl::MutexGuard; 47cdf0e10cSrcweir using ::rtl::OUString; 48cdf0e10cSrcweir 49cdf0e10cSrcweir #include <cppconn/resultset.h> 50cdf0e10cSrcweir #include <cppconn/resultset_metadata.h> 51cdf0e10cSrcweir 52cdf0e10cSrcweir #include <stdio.h> 53cdf0e10cSrcweir 54cdf0e10cSrcweir 55cdf0e10cSrcweir // IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); 56cdf0e10cSrcweir /* {{{ OResultSet::getImplementationName() -I- */ 57cdf0e10cSrcweir OUString SAL_CALL OResultSet::getImplementationName() 58cdf0e10cSrcweir throw (RuntimeException) 59cdf0e10cSrcweir { 60cdf0e10cSrcweir OSL_TRACE("OResultSet::getImplementationName"); 61cdf0e10cSrcweir return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdbcx.mysqlc.ResultSet" ) ); 62cdf0e10cSrcweir } 63cdf0e10cSrcweir /* }}} */ 64cdf0e10cSrcweir 65cdf0e10cSrcweir 66cdf0e10cSrcweir /* {{{ OResultSet::getSupportedServiceNames() -I- */ 67cdf0e10cSrcweir Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames() 68cdf0e10cSrcweir throw(RuntimeException) 69cdf0e10cSrcweir { 70cdf0e10cSrcweir OSL_TRACE("OResultSet::getSupportedServiceNames"); 71cdf0e10cSrcweir Sequence< OUString > aSupported(2); 72cdf0e10cSrcweir aSupported[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdbc.ResultSet" ) ); 73cdf0e10cSrcweir aSupported[1] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdbcx.ResultSet" ) ); 74cdf0e10cSrcweir return (aSupported); 75cdf0e10cSrcweir } 76cdf0e10cSrcweir /* }}} */ 77cdf0e10cSrcweir 78cdf0e10cSrcweir 79cdf0e10cSrcweir /* {{{ OResultSet::supportsService() -I- */ 80cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::supportsService(const OUString& _rServiceName) 81cdf0e10cSrcweir throw(RuntimeException) 82cdf0e10cSrcweir { 83cdf0e10cSrcweir OSL_TRACE("OResultSet::supportsService"); 84cdf0e10cSrcweir Sequence< OUString > aSupported(getSupportedServiceNames()); 85cdf0e10cSrcweir const OUString* pSupported = aSupported.getConstArray(); 86cdf0e10cSrcweir const OUString* pEnd = pSupported + aSupported.getLength(); 87cdf0e10cSrcweir for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported) {} 88cdf0e10cSrcweir 89cdf0e10cSrcweir return (pSupported != pEnd); 90cdf0e10cSrcweir } 91cdf0e10cSrcweir /* }}} */ 92cdf0e10cSrcweir 93cdf0e10cSrcweir 94cdf0e10cSrcweir /* {{{ OResultSet::OResultSet() -I- */ 95cdf0e10cSrcweir OResultSet::OResultSet(OCommonStatement * pStmt, sql::ResultSet * result, rtl_TextEncoding _encoding ) 96cdf0e10cSrcweir : OResultSet_BASE(m_aMutex) 97cdf0e10cSrcweir ,OPropertySetHelper(OResultSet_BASE::rBHelper) 98cdf0e10cSrcweir ,m_aStatement((OWeakObject*)pStmt) 99cdf0e10cSrcweir ,m_xMetaData(NULL) 100cdf0e10cSrcweir ,m_result(result) 101cdf0e10cSrcweir ,fieldCount( 0 ) 102cdf0e10cSrcweir ,m_encoding( _encoding ) 103cdf0e10cSrcweir { 104cdf0e10cSrcweir OSL_TRACE("OResultSet::OResultSet"); 105cdf0e10cSrcweir try { 106cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = m_result->getMetaData(); 107cdf0e10cSrcweir fieldCount = rs_meta->getColumnCount(); 108cdf0e10cSrcweir } catch (sql::SQLException &e) { 109cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 110cdf0e10cSrcweir } 111cdf0e10cSrcweir } 112cdf0e10cSrcweir /* }}} */ 113cdf0e10cSrcweir 114cdf0e10cSrcweir 115cdf0e10cSrcweir /* {{{ OResultSet::~OResultSet() -I- */ 116cdf0e10cSrcweir OResultSet::~OResultSet() 117cdf0e10cSrcweir { 118cdf0e10cSrcweir OSL_TRACE("OResultSet::~OResultSet"); 119cdf0e10cSrcweir } 120cdf0e10cSrcweir /* }}} */ 121cdf0e10cSrcweir 122cdf0e10cSrcweir 123cdf0e10cSrcweir /* {{{ OResultSet::disposing() -I- */ 124cdf0e10cSrcweir void OResultSet::disposing() 125cdf0e10cSrcweir { 126cdf0e10cSrcweir OSL_TRACE("OResultSet::disposing"); 127cdf0e10cSrcweir OPropertySetHelper::disposing(); 128cdf0e10cSrcweir 129cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 130cdf0e10cSrcweir 131cdf0e10cSrcweir m_aStatement = NULL; 132cdf0e10cSrcweir m_xMetaData = NULL; 133cdf0e10cSrcweir } 134cdf0e10cSrcweir /* }}} */ 135cdf0e10cSrcweir 136cdf0e10cSrcweir 137cdf0e10cSrcweir /* {{{ OResultSet::queryInterface() -I- */ 138cdf0e10cSrcweir Any SAL_CALL OResultSet::queryInterface(const Type & rType) 139cdf0e10cSrcweir throw(RuntimeException) 140cdf0e10cSrcweir { 141cdf0e10cSrcweir OSL_TRACE("OResultSet::queryInterface"); 142cdf0e10cSrcweir Any aRet = OPropertySetHelper::queryInterface(rType); 143cdf0e10cSrcweir if (!aRet.hasValue()) { 144cdf0e10cSrcweir aRet = OResultSet_BASE::queryInterface(rType); 145cdf0e10cSrcweir } 146cdf0e10cSrcweir return aRet; 147cdf0e10cSrcweir } 148cdf0e10cSrcweir /* }}} */ 149cdf0e10cSrcweir 150cdf0e10cSrcweir 151cdf0e10cSrcweir /* {{{ OResultSet::getTypes() -I- */ 152cdf0e10cSrcweir Sequence< Type > SAL_CALL OResultSet::getTypes() 153cdf0e10cSrcweir throw(RuntimeException) 154cdf0e10cSrcweir { 155cdf0e10cSrcweir OSL_TRACE("OResultSet::getTypes"); 156cdf0e10cSrcweir OTypeCollection aTypes( ::getCppuType((const Reference< XMultiPropertySet > *) NULL), 157cdf0e10cSrcweir ::getCppuType((const Reference< XFastPropertySet > *) NULL), 158cdf0e10cSrcweir ::getCppuType((const Reference< XPropertySet > *) NULL)); 159cdf0e10cSrcweir 160cdf0e10cSrcweir return concatSequences(aTypes.getTypes(), OResultSet_BASE::getTypes()); 161cdf0e10cSrcweir } 162cdf0e10cSrcweir /* }}} */ 163cdf0e10cSrcweir 164cdf0e10cSrcweir 165cdf0e10cSrcweir /* {{{ OResultSet::findColumn() -I- */ 166cdf0e10cSrcweir sal_Int32 SAL_CALL OResultSet::findColumn(const OUString& columnName) 167cdf0e10cSrcweir throw(SQLException, RuntimeException) 168cdf0e10cSrcweir { 169cdf0e10cSrcweir OSL_TRACE("OResultSet::findColumn"); 170cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 171cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 172cdf0e10cSrcweir 173cdf0e10cSrcweir try { 174cdf0e10cSrcweir // find the first column with the name columnName 175cdf0e10cSrcweir sql::ResultSetMetaData * meta = m_result->getMetaData(); 176cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= fieldCount; i++) { 177cdf0e10cSrcweir if (columnName.equalsIgnoreAsciiCaseAscii(meta->getColumnName(i).c_str())) { 178cdf0e10cSrcweir /* SDBC knows them indexed from 1 */ 179cdf0e10cSrcweir return i; 180cdf0e10cSrcweir } 181cdf0e10cSrcweir } 182cdf0e10cSrcweir } catch (sql::SQLException &e) { 183cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 184cdf0e10cSrcweir } 185cdf0e10cSrcweir return 0; 186cdf0e10cSrcweir } 187cdf0e10cSrcweir /* }}} */ 188cdf0e10cSrcweir 189cdf0e10cSrcweir 190cdf0e10cSrcweir /* {{{ OResultSet::getBinaryStream() -U- */ 191cdf0e10cSrcweir Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream(sal_Int32 column) 192cdf0e10cSrcweir throw(SQLException, RuntimeException) 193cdf0e10cSrcweir { 194cdf0e10cSrcweir OSL_TRACE("OResultSet::getBinaryStream"); 195cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 196cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 197cdf0e10cSrcweir checkColumnIndex(column); 198cdf0e10cSrcweir 199cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBinaryStream", *this); 200cdf0e10cSrcweir return NULL; 201cdf0e10cSrcweir } 202cdf0e10cSrcweir /* }}} */ 203cdf0e10cSrcweir 204cdf0e10cSrcweir 205cdf0e10cSrcweir /* {{{ OResultSet::getCharacterStream() -U- */ 206cdf0e10cSrcweir Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 column) 207cdf0e10cSrcweir throw(SQLException, RuntimeException) 208cdf0e10cSrcweir { 209cdf0e10cSrcweir OSL_TRACE("OResultSet::getCharacterStream"); 210cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 211cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 212cdf0e10cSrcweir checkColumnIndex(column); 213cdf0e10cSrcweir 214cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getCharacterStream", *this); 215cdf0e10cSrcweir return NULL; 216cdf0e10cSrcweir } 217cdf0e10cSrcweir /* }}} */ 218cdf0e10cSrcweir 219cdf0e10cSrcweir 220cdf0e10cSrcweir /* {{{ OResultSet::getBoolean() -I- */ 221cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::getBoolean(sal_Int32 column) 222cdf0e10cSrcweir throw(SQLException, RuntimeException) 223cdf0e10cSrcweir { 224cdf0e10cSrcweir OSL_TRACE("OResultSet::getBoolean"); 225cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 226cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 227cdf0e10cSrcweir 228cdf0e10cSrcweir checkColumnIndex(column); 229cdf0e10cSrcweir try { 230cdf0e10cSrcweir return m_result->getBoolean(column)? sal_True:sal_False; 231cdf0e10cSrcweir } catch (sql::SQLException &e) { 232cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 233cdf0e10cSrcweir } 234cdf0e10cSrcweir return sal_False; 235cdf0e10cSrcweir #if 0 236cdf0e10cSrcweir OUString str = getString(column); 237cdf0e10cSrcweir switch (str[0]) { 238cdf0e10cSrcweir case '1': 239cdf0e10cSrcweir case 't': 240cdf0e10cSrcweir case 'T': 241cdf0e10cSrcweir case 'y': 242cdf0e10cSrcweir case 'Y': 243cdf0e10cSrcweir return sal_True; 244cdf0e10cSrcweir } 245cdf0e10cSrcweir return sal_False; 246cdf0e10cSrcweir #endif 247cdf0e10cSrcweir } 248cdf0e10cSrcweir /* }}} */ 249cdf0e10cSrcweir 250cdf0e10cSrcweir 251cdf0e10cSrcweir /* {{{ OResultSet::getByte() -I- */ 252cdf0e10cSrcweir sal_Int8 SAL_CALL OResultSet::getByte(sal_Int32 column) 253cdf0e10cSrcweir throw(SQLException, RuntimeException) 254cdf0e10cSrcweir { 255cdf0e10cSrcweir OSL_TRACE("OResultSet::getByte"); 256cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 257cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 258cdf0e10cSrcweir 259cdf0e10cSrcweir checkColumnIndex(column); 260cdf0e10cSrcweir try { 261cdf0e10cSrcweir return m_result->getInt(column); 262cdf0e10cSrcweir } catch (sql::SQLException &e) { 263cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 264cdf0e10cSrcweir } 265cdf0e10cSrcweir return 0; // fool compiler 266cdf0e10cSrcweir } 267cdf0e10cSrcweir /* }}} */ 268cdf0e10cSrcweir 269cdf0e10cSrcweir 270cdf0e10cSrcweir /* {{{ OResultSet::getBytes() -I- */ 271cdf0e10cSrcweir Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column) 272cdf0e10cSrcweir throw(SQLException, RuntimeException) 273cdf0e10cSrcweir { 274cdf0e10cSrcweir OSL_TRACE("OResultSet::getBytes"); 275cdf0e10cSrcweir 276cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 277cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 278cdf0e10cSrcweir 279cdf0e10cSrcweir 280cdf0e10cSrcweir sql::SQLString val = m_result->getString(column); 281cdf0e10cSrcweir if (!val.length()) { 282cdf0e10cSrcweir return Sequence< sal_Int8>(); 283cdf0e10cSrcweir } else { 284cdf0e10cSrcweir return Sequence< sal_Int8 > ((sal_Int8*)val.c_str(), val.length()); 285cdf0e10cSrcweir } 286cdf0e10cSrcweir } 287cdf0e10cSrcweir /* }}} */ 288cdf0e10cSrcweir 289cdf0e10cSrcweir 290cdf0e10cSrcweir /* {{{ OResultSet::getDate() -I- */ 291cdf0e10cSrcweir Date SAL_CALL OResultSet::getDate(sal_Int32 column) 292cdf0e10cSrcweir throw(SQLException, RuntimeException) 293cdf0e10cSrcweir { 294cdf0e10cSrcweir OSL_TRACE("OResultSet::getDate"); 295cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 296cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 297cdf0e10cSrcweir checkColumnIndex(column); 298cdf0e10cSrcweir 299cdf0e10cSrcweir Date d; 300cdf0e10cSrcweir try { 301cdf0e10cSrcweir OUString dateString = getString(column); 302cdf0e10cSrcweir OUString token; 303cdf0e10cSrcweir sal_Int32 nIndex = 0, i=0; 304cdf0e10cSrcweir 305cdf0e10cSrcweir do { 306cdf0e10cSrcweir token = dateString.getToken (0, '-', nIndex); 307cdf0e10cSrcweir switch (i) { 308cdf0e10cSrcweir case 0: 309cdf0e10cSrcweir d.Year = static_cast<sal_uInt16>(token.toInt32(10)); 310cdf0e10cSrcweir break; 311cdf0e10cSrcweir case 1: 312cdf0e10cSrcweir d.Month = static_cast<sal_uInt16>(token.toInt32(10)); 313cdf0e10cSrcweir break; 314cdf0e10cSrcweir case 2: 315cdf0e10cSrcweir d.Day = static_cast<sal_uInt16>(token.toInt32(10)); 316cdf0e10cSrcweir break; 317cdf0e10cSrcweir default:; 318cdf0e10cSrcweir } 319cdf0e10cSrcweir i++; 320cdf0e10cSrcweir } while (nIndex >= 0); 321cdf0e10cSrcweir } catch (sql::SQLException &e) { 322cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 323cdf0e10cSrcweir } 324cdf0e10cSrcweir return d; 325cdf0e10cSrcweir } 326cdf0e10cSrcweir /* }}} */ 327cdf0e10cSrcweir 328cdf0e10cSrcweir 329cdf0e10cSrcweir /* {{{ OResultSet::getDouble() -I- */ 330cdf0e10cSrcweir double SAL_CALL OResultSet::getDouble(sal_Int32 column) 331cdf0e10cSrcweir throw(SQLException, RuntimeException) 332cdf0e10cSrcweir { 333cdf0e10cSrcweir OSL_TRACE("OResultSet::getDouble"); 334cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 335cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 336cdf0e10cSrcweir 337cdf0e10cSrcweir checkColumnIndex(column); 338cdf0e10cSrcweir try { 339cdf0e10cSrcweir return m_result->getDouble(column); 340cdf0e10cSrcweir } catch (sql::SQLException &e) { 341cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 342cdf0e10cSrcweir } 343cdf0e10cSrcweir return 0.0; // fool compiler 344cdf0e10cSrcweir } 345cdf0e10cSrcweir /* }}} */ 346cdf0e10cSrcweir 347cdf0e10cSrcweir 348cdf0e10cSrcweir /* {{{ OResultSet::getFloat() -I- */ 349cdf0e10cSrcweir float SAL_CALL OResultSet::getFloat(sal_Int32 column) 350cdf0e10cSrcweir throw(SQLException, RuntimeException) 351cdf0e10cSrcweir { 352cdf0e10cSrcweir OSL_TRACE("OResultSet::getFloat"); 353cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 354cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 355cdf0e10cSrcweir 356cdf0e10cSrcweir checkColumnIndex(column); 357cdf0e10cSrcweir try { 358cdf0e10cSrcweir return m_result->getDouble(column); 359cdf0e10cSrcweir } catch (sql::SQLException &e) { 360cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 361cdf0e10cSrcweir } 362cdf0e10cSrcweir return 0.0; // fool compiler 363cdf0e10cSrcweir } 364cdf0e10cSrcweir /* }}} */ 365cdf0e10cSrcweir 366cdf0e10cSrcweir 367cdf0e10cSrcweir /* {{{ OResultSet::getInt() -I- */ 368cdf0e10cSrcweir sal_Int32 SAL_CALL OResultSet::getInt(sal_Int32 column) 369cdf0e10cSrcweir throw(SQLException, RuntimeException) 370cdf0e10cSrcweir { 371cdf0e10cSrcweir OSL_TRACE("OResultSet::getInt"); 372cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 373cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 374cdf0e10cSrcweir 375cdf0e10cSrcweir checkColumnIndex(column); 376cdf0e10cSrcweir try { 377cdf0e10cSrcweir return m_result->getInt(column); 378cdf0e10cSrcweir } catch (sql::SQLException &e) { 379cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 380cdf0e10cSrcweir } 381cdf0e10cSrcweir return 0; // fool compiler 382cdf0e10cSrcweir } 383cdf0e10cSrcweir /* }}} */ 384cdf0e10cSrcweir 385cdf0e10cSrcweir 386cdf0e10cSrcweir /* {{{ OResultSet::getRow() -I- */ 387cdf0e10cSrcweir sal_Int32 SAL_CALL OResultSet::getRow() 388cdf0e10cSrcweir throw(SQLException, RuntimeException) 389cdf0e10cSrcweir { 390cdf0e10cSrcweir OSL_TRACE("OResultSet::getRow"); 391cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 392cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 393cdf0e10cSrcweir 394cdf0e10cSrcweir try { 395cdf0e10cSrcweir return m_result->getRow(); 396cdf0e10cSrcweir } catch (sql::SQLException &e) { 397cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 398cdf0e10cSrcweir } 399cdf0e10cSrcweir return 0; // fool compiler 400cdf0e10cSrcweir } 401cdf0e10cSrcweir /* }}} */ 402cdf0e10cSrcweir 403cdf0e10cSrcweir 404cdf0e10cSrcweir /* {{{ OResultSet::getLong() -I- */ 405cdf0e10cSrcweir sal_Int64 SAL_CALL OResultSet::getLong(sal_Int32 column) 406cdf0e10cSrcweir throw(SQLException, RuntimeException) 407cdf0e10cSrcweir { 408cdf0e10cSrcweir OSL_TRACE("OResultSet::getLong"); 409cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 410cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 411cdf0e10cSrcweir 412cdf0e10cSrcweir checkColumnIndex(column); 413cdf0e10cSrcweir try { 414cdf0e10cSrcweir return m_result->getInt64(column); 415cdf0e10cSrcweir } catch (sql::SQLException &e) { 416cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 417cdf0e10cSrcweir } 418cdf0e10cSrcweir return 0; // fool compiler 419cdf0e10cSrcweir } 420cdf0e10cSrcweir /* }}} */ 421cdf0e10cSrcweir 422cdf0e10cSrcweir 423cdf0e10cSrcweir /* {{{ OResultSet::getMetaData() -I- */ 424cdf0e10cSrcweir Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData() 425cdf0e10cSrcweir throw(SQLException, RuntimeException) 426cdf0e10cSrcweir { 427cdf0e10cSrcweir OSL_TRACE("OResultSet::getMetaData"); 428cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 429cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 430cdf0e10cSrcweir try { 431cdf0e10cSrcweir if (!m_xMetaData.is()) { 432cdf0e10cSrcweir m_xMetaData = new OResultSetMetaData(m_result->getMetaData(), m_encoding); 433cdf0e10cSrcweir } 434cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 435cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getMetaData", *this); 436cdf0e10cSrcweir } catch (sql::SQLException &e) { 437cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 438cdf0e10cSrcweir } 439cdf0e10cSrcweir return m_xMetaData; 440cdf0e10cSrcweir } 441cdf0e10cSrcweir /* }}} */ 442cdf0e10cSrcweir 443cdf0e10cSrcweir 444cdf0e10cSrcweir /* {{{ OResultSet::getArray() -U- */ 445cdf0e10cSrcweir Reference< XArray > SAL_CALL OResultSet::getArray(sal_Int32 column) 446cdf0e10cSrcweir throw(SQLException, RuntimeException) 447cdf0e10cSrcweir { 448cdf0e10cSrcweir OSL_TRACE("OResultSet::getArray"); 449cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 450cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 451cdf0e10cSrcweir checkColumnIndex(column); 452cdf0e10cSrcweir 453cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getArray", *this); 454cdf0e10cSrcweir return NULL; 455cdf0e10cSrcweir } 456cdf0e10cSrcweir /* }}} */ 457cdf0e10cSrcweir 458cdf0e10cSrcweir 459cdf0e10cSrcweir /* {{{ OResultSet::getClob() -U- */ 460cdf0e10cSrcweir Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column) 461cdf0e10cSrcweir throw(SQLException, RuntimeException) 462cdf0e10cSrcweir { 463cdf0e10cSrcweir OSL_TRACE("OResultSet::getClob"); 464cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 465cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 466cdf0e10cSrcweir checkColumnIndex(column); 467cdf0e10cSrcweir 468cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getClob", *this); 469cdf0e10cSrcweir return NULL; 470cdf0e10cSrcweir } 471cdf0e10cSrcweir /* }}} */ 472cdf0e10cSrcweir 473cdf0e10cSrcweir 474cdf0e10cSrcweir /* {{{ OResultSet::getBlob() -U- */ 475cdf0e10cSrcweir Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column) 476cdf0e10cSrcweir throw(SQLException, RuntimeException) 477cdf0e10cSrcweir { 478cdf0e10cSrcweir OSL_TRACE("OResultSet::getBlob"); 479cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 480cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 481cdf0e10cSrcweir checkColumnIndex(column); 482cdf0e10cSrcweir 483cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBlob", *this); 484cdf0e10cSrcweir return NULL; 485cdf0e10cSrcweir } 486cdf0e10cSrcweir /* }}} */ 487cdf0e10cSrcweir 488cdf0e10cSrcweir 489cdf0e10cSrcweir /* {{{ OResultSet::getRef() -U- */ 490cdf0e10cSrcweir Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column) 491cdf0e10cSrcweir throw(SQLException, RuntimeException) 492cdf0e10cSrcweir { 493cdf0e10cSrcweir OSL_TRACE("OResultSet::getRef"); 494cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 495cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 496cdf0e10cSrcweir checkColumnIndex(column); 497cdf0e10cSrcweir 498cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getRef", *this); 499cdf0e10cSrcweir return NULL; 500cdf0e10cSrcweir } 501cdf0e10cSrcweir /* }}} */ 502cdf0e10cSrcweir 503cdf0e10cSrcweir 504cdf0e10cSrcweir /* {{{ OResultSet::getObject() -U- */ 505cdf0e10cSrcweir Any SAL_CALL OResultSet::getObject(sal_Int32 column, const Reference< XNameAccess >& /* typeMap */) 506cdf0e10cSrcweir throw(SQLException, RuntimeException) 507cdf0e10cSrcweir { 508cdf0e10cSrcweir OSL_TRACE("OResultSet::getObject"); 509cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 510cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 511cdf0e10cSrcweir checkColumnIndex(column); 512cdf0e10cSrcweir 513cdf0e10cSrcweir Any aRet= Any(); 514cdf0e10cSrcweir 515cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getObject", *this); 516cdf0e10cSrcweir return aRet; 517cdf0e10cSrcweir } 518cdf0e10cSrcweir /* }}} */ 519cdf0e10cSrcweir 520cdf0e10cSrcweir 521cdf0e10cSrcweir /* {{{ OResultSet::getShort() -I- */ 522cdf0e10cSrcweir sal_Int16 SAL_CALL OResultSet::getShort(sal_Int32 column) 523cdf0e10cSrcweir throw(SQLException, RuntimeException) 524cdf0e10cSrcweir { 525cdf0e10cSrcweir OSL_TRACE("OResultSet::getShort"); 526cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 527cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 528cdf0e10cSrcweir 529cdf0e10cSrcweir try { 530cdf0e10cSrcweir return (sal_Int16) m_result->getInt(column); 531cdf0e10cSrcweir } catch (sql::SQLException &e) { 532cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 533cdf0e10cSrcweir } 534cdf0e10cSrcweir return 0; // fool compiler 535cdf0e10cSrcweir } 536cdf0e10cSrcweir /* }}} */ 537cdf0e10cSrcweir 538cdf0e10cSrcweir 539cdf0e10cSrcweir /* {{{ OResultSet::getString() -I- */ 540cdf0e10cSrcweir OUString SAL_CALL OResultSet::getString(sal_Int32 column) 541cdf0e10cSrcweir throw(SQLException, RuntimeException) 542cdf0e10cSrcweir { 543cdf0e10cSrcweir OSL_TRACE("OResultSet::getString"); 544cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 545cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 546cdf0e10cSrcweir 547cdf0e10cSrcweir checkColumnIndex(column); 548cdf0e10cSrcweir 549cdf0e10cSrcweir try { 550cdf0e10cSrcweir sql::SQLString val = m_result->getString(column); 551cdf0e10cSrcweir if (!m_result->wasNull()) { 552cdf0e10cSrcweir return OUString( val.c_str(), val.length(), m_encoding ); 553cdf0e10cSrcweir } else { 554cdf0e10cSrcweir return OUString(); 555cdf0e10cSrcweir } 556cdf0e10cSrcweir } catch (sql::SQLException &e) { 557cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 558cdf0e10cSrcweir } 559cdf0e10cSrcweir return OUString(); // fool compiler 560cdf0e10cSrcweir } 561cdf0e10cSrcweir /* }}} */ 562cdf0e10cSrcweir 563cdf0e10cSrcweir 564cdf0e10cSrcweir /* {{{ OResultSet::getTime() -I- */ 565cdf0e10cSrcweir Time SAL_CALL OResultSet::getTime(sal_Int32 column) 566cdf0e10cSrcweir throw(SQLException, RuntimeException) 567cdf0e10cSrcweir { 568cdf0e10cSrcweir OSL_TRACE("OResultSet::getTime"); 569cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 570cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 571cdf0e10cSrcweir 572cdf0e10cSrcweir checkColumnIndex(column); 573cdf0e10cSrcweir Time t; 574cdf0e10cSrcweir OUString timeString = getString(column); 575cdf0e10cSrcweir OUString token; 576cdf0e10cSrcweir sal_Int32 nIndex, i=0; 577cdf0e10cSrcweir 578cdf0e10cSrcweir nIndex = timeString.indexOf(' ') + 1; 579cdf0e10cSrcweir 580cdf0e10cSrcweir do { 581cdf0e10cSrcweir token = timeString.getToken (0, ':', nIndex); 582cdf0e10cSrcweir switch (i) { 583cdf0e10cSrcweir case 0: 584cdf0e10cSrcweir t.Hours = static_cast<sal_uInt16>(token.toInt32(10)); 585cdf0e10cSrcweir break; 586cdf0e10cSrcweir case 1: 587cdf0e10cSrcweir t.Minutes = static_cast<sal_uInt16>(token.toInt32(10)); 588cdf0e10cSrcweir break; 589cdf0e10cSrcweir case 2: 590cdf0e10cSrcweir t.Seconds = static_cast<sal_uInt16>(token.toInt32(10)); 591cdf0e10cSrcweir break; 592cdf0e10cSrcweir } 593cdf0e10cSrcweir i++; 594cdf0e10cSrcweir } while (nIndex >= 0); 595cdf0e10cSrcweir 596cdf0e10cSrcweir return t; 597cdf0e10cSrcweir } 598cdf0e10cSrcweir /* }}} */ 599cdf0e10cSrcweir 600cdf0e10cSrcweir 601cdf0e10cSrcweir /* {{{ OResultSet::getTimestamp() -I- */ 602cdf0e10cSrcweir DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column) 603cdf0e10cSrcweir throw(SQLException, RuntimeException) 604cdf0e10cSrcweir { 605cdf0e10cSrcweir OSL_TRACE("OResultSet::getTimestamp"); 606cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 607cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 608cdf0e10cSrcweir 609cdf0e10cSrcweir checkColumnIndex(column); 610cdf0e10cSrcweir DateTime dt; 611cdf0e10cSrcweir Date d = getDate(column); 612cdf0e10cSrcweir Time t = getTime(column); 613cdf0e10cSrcweir 614cdf0e10cSrcweir dt.Year = d.Year; 615cdf0e10cSrcweir dt.Month = d.Month; 616cdf0e10cSrcweir dt.Day = d.Day; 617cdf0e10cSrcweir dt.Hours = t.Hours; 618cdf0e10cSrcweir dt.Minutes = t.Minutes; 619cdf0e10cSrcweir dt.Seconds = t.Seconds; 620cdf0e10cSrcweir return dt; 621cdf0e10cSrcweir } 622cdf0e10cSrcweir /* }}} */ 623cdf0e10cSrcweir 624cdf0e10cSrcweir 625cdf0e10cSrcweir /* {{{ OResultSet::isBeforeFirst() -I- */ 626cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::isBeforeFirst() 627cdf0e10cSrcweir throw(SQLException, RuntimeException) 628cdf0e10cSrcweir { 629cdf0e10cSrcweir OSL_TRACE("OResultSet::isBeforeFirst"); 630cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 631cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 632cdf0e10cSrcweir 633cdf0e10cSrcweir try { 634cdf0e10cSrcweir return m_result->isBeforeFirst()? sal_True:sal_False; 635cdf0e10cSrcweir } catch (sql::SQLException &e) { 636cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 637cdf0e10cSrcweir } 638cdf0e10cSrcweir return sal_False; //fool 639cdf0e10cSrcweir } 640cdf0e10cSrcweir /* }}} */ 641cdf0e10cSrcweir 642cdf0e10cSrcweir 643cdf0e10cSrcweir /* {{{ OResultSet::isAfterLast() -I- */ 644cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::isAfterLast() 645cdf0e10cSrcweir throw(SQLException, RuntimeException) 646cdf0e10cSrcweir { 647cdf0e10cSrcweir OSL_TRACE("OResultSet::isAfterLast"); 648cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 649cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 650cdf0e10cSrcweir 651cdf0e10cSrcweir try { 652cdf0e10cSrcweir return m_result->isAfterLast()? sal_True:sal_False; 653cdf0e10cSrcweir } catch (sql::SQLException &e) { 654cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 655cdf0e10cSrcweir } 656cdf0e10cSrcweir return sal_False; //fool 657cdf0e10cSrcweir } 658cdf0e10cSrcweir /* }}} */ 659cdf0e10cSrcweir 660cdf0e10cSrcweir 661cdf0e10cSrcweir /* {{{ OResultSet::isFirst() -I- */ 662cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::isFirst() 663cdf0e10cSrcweir throw(SQLException, RuntimeException) 664cdf0e10cSrcweir { 665cdf0e10cSrcweir OSL_TRACE("OResultSet::isFirst"); 666cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 667cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 668cdf0e10cSrcweir 669cdf0e10cSrcweir try { 670cdf0e10cSrcweir return m_result->isFirst(); 671cdf0e10cSrcweir } catch (sql::SQLException &e) { 672cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 673cdf0e10cSrcweir } 674cdf0e10cSrcweir return sal_False; //fool 675cdf0e10cSrcweir } 676cdf0e10cSrcweir /* }}} */ 677cdf0e10cSrcweir 678cdf0e10cSrcweir 679cdf0e10cSrcweir /* {{{ OResultSet::isLast() -I- */ 680cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::isLast() 681cdf0e10cSrcweir throw(SQLException, RuntimeException) 682cdf0e10cSrcweir { 683cdf0e10cSrcweir OSL_TRACE("OResultSet::isLast"); 684cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 685cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 686cdf0e10cSrcweir 687cdf0e10cSrcweir try { 688cdf0e10cSrcweir return m_result->isLast()? sal_True:sal_False; 689cdf0e10cSrcweir } catch (sql::SQLException &e) { 690cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 691cdf0e10cSrcweir } 692cdf0e10cSrcweir return sal_False; //fool 693cdf0e10cSrcweir } 694cdf0e10cSrcweir /* }}} */ 695cdf0e10cSrcweir 696cdf0e10cSrcweir 697cdf0e10cSrcweir /* {{{ OResultSet::beforeFirst() -I- */ 698cdf0e10cSrcweir void SAL_CALL OResultSet::beforeFirst() 699cdf0e10cSrcweir throw(SQLException, RuntimeException) 700cdf0e10cSrcweir { 701cdf0e10cSrcweir OSL_TRACE("OResultSet::beforeFirst"); 702cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 703cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 704cdf0e10cSrcweir 705cdf0e10cSrcweir try { 706cdf0e10cSrcweir m_result->beforeFirst(); 707cdf0e10cSrcweir } catch (sql::SQLException &e) { 708cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 709cdf0e10cSrcweir } 710cdf0e10cSrcweir } 711cdf0e10cSrcweir /* }}} */ 712cdf0e10cSrcweir 713cdf0e10cSrcweir 714cdf0e10cSrcweir /* {{{ OResultSet::afterLast() -I- */ 715cdf0e10cSrcweir void SAL_CALL OResultSet::afterLast() 716cdf0e10cSrcweir throw(SQLException, RuntimeException) 717cdf0e10cSrcweir { 718cdf0e10cSrcweir OSL_TRACE("OResultSet::afterLast"); 719cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 720cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 721cdf0e10cSrcweir 722cdf0e10cSrcweir try { 723cdf0e10cSrcweir m_result->afterLast(); 724cdf0e10cSrcweir } catch (sql::SQLException &e) { 725cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 726cdf0e10cSrcweir } 727cdf0e10cSrcweir } 728cdf0e10cSrcweir /* }}} */ 729cdf0e10cSrcweir 730cdf0e10cSrcweir 731cdf0e10cSrcweir /* {{{ OResultSet::close() -I- */ 732cdf0e10cSrcweir void SAL_CALL OResultSet::close() throw(SQLException, RuntimeException) 733cdf0e10cSrcweir { 734cdf0e10cSrcweir OSL_TRACE("OResultSet::close"); 735cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 736cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 737cdf0e10cSrcweir 738cdf0e10cSrcweir try { 739cdf0e10cSrcweir m_result->close(); 740cdf0e10cSrcweir } catch (sql::SQLException &e) { 741cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 742cdf0e10cSrcweir } 743cdf0e10cSrcweir 744cdf0e10cSrcweir dispose(); 745cdf0e10cSrcweir } 746cdf0e10cSrcweir /* }}} */ 747cdf0e10cSrcweir 748cdf0e10cSrcweir 749cdf0e10cSrcweir /* {{{ OResultSet::first() -I- */ 750cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::first() throw(SQLException, RuntimeException) 751cdf0e10cSrcweir { 752cdf0e10cSrcweir OSL_TRACE("OResultSet::first"); 753cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 754cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 755cdf0e10cSrcweir 756cdf0e10cSrcweir try { 757cdf0e10cSrcweir return m_result->first()? sal_True:sal_False; 758cdf0e10cSrcweir } catch (sql::SQLException &e) { 759cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 760cdf0e10cSrcweir } 761cdf0e10cSrcweir return sal_False; //fool 762cdf0e10cSrcweir } 763cdf0e10cSrcweir /* }}} */ 764cdf0e10cSrcweir 765cdf0e10cSrcweir 766cdf0e10cSrcweir /* {{{ OResultSet::last() -I- */ 767cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::last() 768cdf0e10cSrcweir throw(SQLException, RuntimeException) 769cdf0e10cSrcweir { 770cdf0e10cSrcweir OSL_TRACE("OResultSet::last"); 771cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 772cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 773cdf0e10cSrcweir 774cdf0e10cSrcweir try { 775cdf0e10cSrcweir return m_result->last()? sal_True:sal_False; 776cdf0e10cSrcweir } catch (sql::SQLException &e) { 777cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 778cdf0e10cSrcweir } 779cdf0e10cSrcweir return sal_False; //fool 780cdf0e10cSrcweir } 781cdf0e10cSrcweir /* }}} */ 782cdf0e10cSrcweir 783cdf0e10cSrcweir 784cdf0e10cSrcweir /* {{{ OResultSet::absolute() -I- */ 785cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 row) 786cdf0e10cSrcweir throw(SQLException, RuntimeException) 787cdf0e10cSrcweir { 788cdf0e10cSrcweir OSL_TRACE("OResultSet::absolute"); 789cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 790cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 791cdf0e10cSrcweir 792cdf0e10cSrcweir try { 793cdf0e10cSrcweir return m_result->absolute(row)? sal_True:sal_False; 794cdf0e10cSrcweir } catch (sql::SQLException &e) { 795cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 796cdf0e10cSrcweir } 797cdf0e10cSrcweir return sal_False; //fool 798cdf0e10cSrcweir } 799cdf0e10cSrcweir /* }}} */ 800cdf0e10cSrcweir 801cdf0e10cSrcweir 802cdf0e10cSrcweir /* {{{ OResultSet::relative() -I- */ 803cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row) 804cdf0e10cSrcweir throw(SQLException, RuntimeException) 805cdf0e10cSrcweir { 806cdf0e10cSrcweir OSL_TRACE("OResultSet::relative"); 807cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 808cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 809cdf0e10cSrcweir 810cdf0e10cSrcweir try { 811cdf0e10cSrcweir return m_result->relative(row)? sal_True:sal_False; 812cdf0e10cSrcweir } catch (sql::SQLException &e) { 813cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 814cdf0e10cSrcweir } 815cdf0e10cSrcweir return sal_False; //fool 816cdf0e10cSrcweir } 817cdf0e10cSrcweir /* }}} */ 818cdf0e10cSrcweir 819cdf0e10cSrcweir 820cdf0e10cSrcweir /* {{{ OResultSet::previous() -I- */ 821cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::previous() 822cdf0e10cSrcweir throw(SQLException, RuntimeException) 823cdf0e10cSrcweir { 824cdf0e10cSrcweir OSL_TRACE("OResultSet::previous"); 825cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 826cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 827cdf0e10cSrcweir 828cdf0e10cSrcweir try { 829cdf0e10cSrcweir return m_result->previous()? sal_True:sal_False; 830cdf0e10cSrcweir } catch (sql::SQLException &e) { 831cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 832cdf0e10cSrcweir } 833cdf0e10cSrcweir return sal_False; //fool 834cdf0e10cSrcweir } 835cdf0e10cSrcweir /* }}} */ 836cdf0e10cSrcweir 837cdf0e10cSrcweir 838cdf0e10cSrcweir /* {{{ OResultSet::getStatement() -I- */ 839cdf0e10cSrcweir Reference< XInterface > SAL_CALL OResultSet::getStatement() 840cdf0e10cSrcweir throw(SQLException, RuntimeException) 841cdf0e10cSrcweir { 842cdf0e10cSrcweir OSL_TRACE("OResultSet::getStatement"); 843cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 844cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 845cdf0e10cSrcweir 846cdf0e10cSrcweir return m_aStatement.get(); 847cdf0e10cSrcweir } 848cdf0e10cSrcweir /* }}} */ 849cdf0e10cSrcweir 850cdf0e10cSrcweir 851cdf0e10cSrcweir /* {{{ OResultSet::rowDeleted() -I- */ 852cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::rowDeleted() 853cdf0e10cSrcweir throw(SQLException, RuntimeException) 854cdf0e10cSrcweir { 855cdf0e10cSrcweir OSL_TRACE("OResultSet::rowDeleted"); 856cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 857cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 858cdf0e10cSrcweir 859cdf0e10cSrcweir return sal_False; 860cdf0e10cSrcweir } 861cdf0e10cSrcweir /* }}} */ 862cdf0e10cSrcweir 863cdf0e10cSrcweir 864cdf0e10cSrcweir /* {{{ OResultSet::rowInserted() -I- */ 865cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::rowInserted() 866cdf0e10cSrcweir throw(SQLException, RuntimeException) 867cdf0e10cSrcweir { 868cdf0e10cSrcweir OSL_TRACE("OResultSet::rowInserted"); 869cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 870cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 871cdf0e10cSrcweir 872cdf0e10cSrcweir return sal_False; 873cdf0e10cSrcweir } 874cdf0e10cSrcweir /* }}} */ 875cdf0e10cSrcweir 876cdf0e10cSrcweir 877cdf0e10cSrcweir /* {{{ OResultSet::rowUpdated() -I- */ 878cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::rowUpdated() 879cdf0e10cSrcweir throw(SQLException, RuntimeException) 880cdf0e10cSrcweir { 881cdf0e10cSrcweir OSL_TRACE("OResultSet::rowUpdated"); 882cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 883cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 884cdf0e10cSrcweir 885cdf0e10cSrcweir return sal_False; 886cdf0e10cSrcweir } 887cdf0e10cSrcweir /* }}} */ 888cdf0e10cSrcweir 889cdf0e10cSrcweir 890cdf0e10cSrcweir /* {{{ OResultSet::next() -I- */ 891cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::next() 892cdf0e10cSrcweir throw(SQLException, RuntimeException) 893cdf0e10cSrcweir { 894cdf0e10cSrcweir OSL_TRACE("OResultSet::next"); 895cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 896cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 897cdf0e10cSrcweir 898cdf0e10cSrcweir try { 899cdf0e10cSrcweir return m_result->next()? sal_True:sal_False; 900cdf0e10cSrcweir } catch (sql::SQLException &e) { 901cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 902cdf0e10cSrcweir } 903cdf0e10cSrcweir return sal_False; //fool 904cdf0e10cSrcweir } 905cdf0e10cSrcweir /* }}} */ 906cdf0e10cSrcweir 907cdf0e10cSrcweir 908cdf0e10cSrcweir /* {{{ OResultSet::wasNull() -I- */ 909cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::wasNull() 910cdf0e10cSrcweir throw(SQLException, RuntimeException) 911cdf0e10cSrcweir { 912cdf0e10cSrcweir OSL_TRACE("OResultSet::wasNull"); 913cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 914cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 915cdf0e10cSrcweir 916cdf0e10cSrcweir try { 917cdf0e10cSrcweir return m_result->wasNull()? sal_True:sal_False; 918cdf0e10cSrcweir } catch (sql::SQLException &e) { 919cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); 920cdf0e10cSrcweir } 921cdf0e10cSrcweir return sal_False; //fool 922cdf0e10cSrcweir } 923cdf0e10cSrcweir /* }}} */ 924cdf0e10cSrcweir 925cdf0e10cSrcweir 926cdf0e10cSrcweir /* {{{ OResultSet::cancel() -I- */ 927cdf0e10cSrcweir void SAL_CALL OResultSet::cancel() 928cdf0e10cSrcweir throw(RuntimeException) 929cdf0e10cSrcweir { 930cdf0e10cSrcweir OSL_TRACE("OResultSet::cancel"); 931cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 932cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 933cdf0e10cSrcweir } 934cdf0e10cSrcweir /* }}} */ 935cdf0e10cSrcweir 936cdf0e10cSrcweir 937cdf0e10cSrcweir /* {{{ OResultSet::clearWarnings() -I- */ 938cdf0e10cSrcweir void SAL_CALL OResultSet::clearWarnings() 939cdf0e10cSrcweir throw(SQLException, RuntimeException) 940cdf0e10cSrcweir { 941cdf0e10cSrcweir OSL_TRACE("OResultSet::clearWarnings"); 942cdf0e10cSrcweir } 943cdf0e10cSrcweir /* }}} */ 944cdf0e10cSrcweir 945cdf0e10cSrcweir 946cdf0e10cSrcweir /* {{{ OResultSet::getWarnings() -I- */ 947cdf0e10cSrcweir Any SAL_CALL OResultSet::getWarnings() 948cdf0e10cSrcweir throw(SQLException, RuntimeException) 949cdf0e10cSrcweir { 950cdf0e10cSrcweir OSL_TRACE("OResultSet::getWarnings"); 951cdf0e10cSrcweir Any aRet= Any(); 952cdf0e10cSrcweir return aRet; 953cdf0e10cSrcweir } 954cdf0e10cSrcweir /* }}} */ 955cdf0e10cSrcweir 956cdf0e10cSrcweir 957cdf0e10cSrcweir /* {{{ OResultSet::insertRow() -I- */ 958cdf0e10cSrcweir void SAL_CALL OResultSet::insertRow() 959cdf0e10cSrcweir throw(SQLException, RuntimeException) 960cdf0e10cSrcweir { 961cdf0e10cSrcweir OSL_TRACE("OResultSet::insertRow"); 962cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 963cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 964cdf0e10cSrcweir // you only have to implement this if you want to insert new rows 965cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::insertRow", *this); 966cdf0e10cSrcweir } 967cdf0e10cSrcweir /* }}} */ 968cdf0e10cSrcweir 969cdf0e10cSrcweir 970cdf0e10cSrcweir /* {{{ OResultSet::updateRow() -I- */ 971cdf0e10cSrcweir void SAL_CALL OResultSet::updateRow() 972cdf0e10cSrcweir throw(SQLException, RuntimeException) 973cdf0e10cSrcweir { 974cdf0e10cSrcweir OSL_TRACE("OResultSet::updateRow"); 975cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 976cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 977cdf0e10cSrcweir 978cdf0e10cSrcweir // only when you allow updates 979cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateRow", *this); 980cdf0e10cSrcweir } 981cdf0e10cSrcweir /* }}} */ 982cdf0e10cSrcweir 983cdf0e10cSrcweir 984cdf0e10cSrcweir /* {{{ OResultSet::deleteRow() -I- */ 985cdf0e10cSrcweir void SAL_CALL OResultSet::deleteRow() 986cdf0e10cSrcweir throw(SQLException, RuntimeException) 987cdf0e10cSrcweir { 988cdf0e10cSrcweir OSL_TRACE("OResultSet::deleteRow"); 989cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 990cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 991cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::deleteRow", *this); 992cdf0e10cSrcweir } 993cdf0e10cSrcweir /* }}} */ 994cdf0e10cSrcweir 995cdf0e10cSrcweir 996cdf0e10cSrcweir /* {{{ OResultSet::cancelRowUpdates() -I- */ 997cdf0e10cSrcweir void SAL_CALL OResultSet::cancelRowUpdates() 998cdf0e10cSrcweir throw(SQLException, RuntimeException) 999cdf0e10cSrcweir { 1000cdf0e10cSrcweir OSL_TRACE("OResultSet::cancelRowUpdates"); 1001cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1002cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1003cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::cancelRowUpdates", *this); 1004cdf0e10cSrcweir } 1005cdf0e10cSrcweir /* }}} */ 1006cdf0e10cSrcweir 1007cdf0e10cSrcweir 1008cdf0e10cSrcweir /* {{{ OResultSet::moveToInsertRow() -I- */ 1009cdf0e10cSrcweir void SAL_CALL OResultSet::moveToInsertRow() 1010cdf0e10cSrcweir throw(SQLException, RuntimeException) 1011cdf0e10cSrcweir { 1012cdf0e10cSrcweir OSL_TRACE("OResultSet::moveToInsertRow"); 1013cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1014cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1015cdf0e10cSrcweir 1016cdf0e10cSrcweir // only when you allow insert's 1017cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::moveToInsertRow", *this); 1018cdf0e10cSrcweir } 1019cdf0e10cSrcweir /* }}} */ 1020cdf0e10cSrcweir 1021cdf0e10cSrcweir 1022cdf0e10cSrcweir /* {{{ OResultSet::moveToCurrentRow() -I- */ 1023cdf0e10cSrcweir void SAL_CALL OResultSet::moveToCurrentRow() 1024cdf0e10cSrcweir throw(SQLException, RuntimeException) 1025cdf0e10cSrcweir { 1026cdf0e10cSrcweir OSL_TRACE("OResultSet::moveToCurrentRow"); 1027cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1028cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1029cdf0e10cSrcweir } 1030cdf0e10cSrcweir /* }}} */ 1031cdf0e10cSrcweir 1032cdf0e10cSrcweir 1033cdf0e10cSrcweir /* {{{ OResultSet::updateNull() -U- */ 1034cdf0e10cSrcweir void SAL_CALL OResultSet::updateNull(sal_Int32 column) 1035cdf0e10cSrcweir throw(SQLException, RuntimeException) 1036cdf0e10cSrcweir { 1037cdf0e10cSrcweir OSL_TRACE("OResultSet::updateNull"); 1038cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1039cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1040cdf0e10cSrcweir checkColumnIndex(column); 1041cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateNull", *this); 1042cdf0e10cSrcweir } 1043cdf0e10cSrcweir /* }}} */ 1044cdf0e10cSrcweir 1045cdf0e10cSrcweir 1046cdf0e10cSrcweir /* {{{ OResultSet::updateBoolean() -U- */ 1047cdf0e10cSrcweir void SAL_CALL OResultSet::updateBoolean(sal_Int32 column, sal_Bool /* x */) 1048cdf0e10cSrcweir throw(SQLException, RuntimeException) 1049cdf0e10cSrcweir { 1050cdf0e10cSrcweir OSL_TRACE("OResultSet::updateBoolean"); 1051cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1052cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1053cdf0e10cSrcweir checkColumnIndex(column); 1054cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateBoolean", *this); 1055cdf0e10cSrcweir } 1056cdf0e10cSrcweir /* }}} */ 1057cdf0e10cSrcweir 1058cdf0e10cSrcweir 1059cdf0e10cSrcweir /* {{{ OResultSet::updateByte() -U- */ 1060cdf0e10cSrcweir void SAL_CALL OResultSet::updateByte(sal_Int32 column, sal_Int8 /* x */) 1061cdf0e10cSrcweir throw(SQLException, RuntimeException) 1062cdf0e10cSrcweir { 1063cdf0e10cSrcweir OSL_TRACE("OResultSet::updateByte"); 1064cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1065cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1066cdf0e10cSrcweir checkColumnIndex(column); 1067cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateByte", *this); 1068cdf0e10cSrcweir } 1069cdf0e10cSrcweir /* }}} */ 1070cdf0e10cSrcweir 1071cdf0e10cSrcweir 1072cdf0e10cSrcweir /* {{{ OResultSet::updateShort() -U- */ 1073cdf0e10cSrcweir void SAL_CALL OResultSet::updateShort(sal_Int32 column, sal_Int16 /* x */) 1074cdf0e10cSrcweir throw(SQLException, RuntimeException) 1075cdf0e10cSrcweir { 1076cdf0e10cSrcweir OSL_TRACE("OResultSet::updateShort"); 1077cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1078cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1079cdf0e10cSrcweir checkColumnIndex(column); 1080cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateShort", *this); 1081cdf0e10cSrcweir } 1082cdf0e10cSrcweir /* }}} */ 1083cdf0e10cSrcweir 1084cdf0e10cSrcweir 1085cdf0e10cSrcweir /* {{{ OResultSet::updateInt() -U- */ 1086cdf0e10cSrcweir void SAL_CALL OResultSet::updateInt(sal_Int32 column, sal_Int32 /* x */) 1087cdf0e10cSrcweir throw(SQLException, RuntimeException) 1088cdf0e10cSrcweir { 1089cdf0e10cSrcweir OSL_TRACE("OResultSet::updateInt"); 1090cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1091cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1092cdf0e10cSrcweir checkColumnIndex(column); 1093cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateInt", *this); 1094cdf0e10cSrcweir } 1095cdf0e10cSrcweir /* }}} */ 1096cdf0e10cSrcweir 1097cdf0e10cSrcweir 1098cdf0e10cSrcweir /* {{{ OResultSet::updateLong() -U- */ 1099cdf0e10cSrcweir void SAL_CALL OResultSet::updateLong(sal_Int32 column, sal_Int64 /* x */) 1100cdf0e10cSrcweir throw(SQLException, RuntimeException) 1101cdf0e10cSrcweir { 1102cdf0e10cSrcweir OSL_TRACE("OResultSet::updateLong"); 1103cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1104cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1105cdf0e10cSrcweir checkColumnIndex(column); 1106cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateLong", *this); 1107cdf0e10cSrcweir } 1108cdf0e10cSrcweir /* }}} */ 1109cdf0e10cSrcweir 1110cdf0e10cSrcweir 1111cdf0e10cSrcweir /* {{{ OResultSet::updateFloat() -U- */ 1112cdf0e10cSrcweir void SAL_CALL OResultSet::updateFloat(sal_Int32 column, float /* x */) 1113cdf0e10cSrcweir throw(SQLException, RuntimeException) 1114cdf0e10cSrcweir { 1115cdf0e10cSrcweir OSL_TRACE("OResultSet::updateFloat"); 1116cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1117cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1118cdf0e10cSrcweir checkColumnIndex(column); 1119cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateFloat", *this); 1120cdf0e10cSrcweir } 1121cdf0e10cSrcweir /* }}} */ 1122cdf0e10cSrcweir 1123cdf0e10cSrcweir 1124cdf0e10cSrcweir /* {{{ OResultSet::updateDouble() -U- */ 1125cdf0e10cSrcweir void SAL_CALL OResultSet::updateDouble(sal_Int32 column, double /* x */) 1126cdf0e10cSrcweir throw(SQLException, RuntimeException) 1127cdf0e10cSrcweir { 1128cdf0e10cSrcweir OSL_TRACE("OResultSet::updateDouble"); 1129cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1130cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1131cdf0e10cSrcweir checkColumnIndex(column); 1132cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateDouble", *this); 1133cdf0e10cSrcweir } 1134cdf0e10cSrcweir /* }}} */ 1135cdf0e10cSrcweir 1136cdf0e10cSrcweir 1137cdf0e10cSrcweir /* {{{ OResultSet::updateString() -U- */ 1138cdf0e10cSrcweir void SAL_CALL OResultSet::updateString(sal_Int32 column, const OUString& /* x */) 1139cdf0e10cSrcweir throw(SQLException, RuntimeException) 1140cdf0e10cSrcweir { 1141cdf0e10cSrcweir OSL_TRACE("OResultSet::updateString"); 1142cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1143cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1144cdf0e10cSrcweir checkColumnIndex(column); 1145cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateString", *this); 1146cdf0e10cSrcweir } 1147cdf0e10cSrcweir /* }}} */ 1148cdf0e10cSrcweir 1149cdf0e10cSrcweir 1150cdf0e10cSrcweir /* {{{ OResultSet::updateBytes() -U- */ 1151cdf0e10cSrcweir void SAL_CALL OResultSet::updateBytes(sal_Int32 column, const Sequence< sal_Int8 >& /* x */) 1152cdf0e10cSrcweir throw(SQLException, RuntimeException) 1153cdf0e10cSrcweir { 1154cdf0e10cSrcweir OSL_TRACE("OResultSet::updateBytes"); 1155cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1156cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1157cdf0e10cSrcweir checkColumnIndex(column); 1158cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateBytes", *this); 1159cdf0e10cSrcweir } 1160cdf0e10cSrcweir /* }}} */ 1161cdf0e10cSrcweir 1162cdf0e10cSrcweir 1163cdf0e10cSrcweir /* {{{ OResultSet::updateDate() -U- */ 1164cdf0e10cSrcweir void SAL_CALL OResultSet::updateDate(sal_Int32 column, const Date& /* x */) 1165cdf0e10cSrcweir throw(SQLException, RuntimeException) 1166cdf0e10cSrcweir { 1167cdf0e10cSrcweir OSL_TRACE("OResultSet::updateDate"); 1168cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1169cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1170cdf0e10cSrcweir checkColumnIndex(column); 1171cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateDate", *this); 1172cdf0e10cSrcweir } 1173cdf0e10cSrcweir /* }}} */ 1174cdf0e10cSrcweir 1175cdf0e10cSrcweir 1176cdf0e10cSrcweir /* {{{ OResultSet::updateTime() -U- */ 1177cdf0e10cSrcweir void SAL_CALL OResultSet::updateTime(sal_Int32 column, const Time& /* x */) 1178cdf0e10cSrcweir throw(SQLException, RuntimeException) 1179cdf0e10cSrcweir { 1180cdf0e10cSrcweir OSL_TRACE("OResultSet::updateTime"); 1181cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1182cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1183cdf0e10cSrcweir checkColumnIndex(column); 1184cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateTime", *this); 1185cdf0e10cSrcweir } 1186cdf0e10cSrcweir /* }}} */ 1187cdf0e10cSrcweir 1188cdf0e10cSrcweir 1189cdf0e10cSrcweir /* {{{ OResultSet::updateTimestamp() -U- */ 1190cdf0e10cSrcweir void SAL_CALL OResultSet::updateTimestamp(sal_Int32 column, const DateTime& /* x */) 1191cdf0e10cSrcweir throw(SQLException, RuntimeException) 1192cdf0e10cSrcweir { 1193cdf0e10cSrcweir OSL_TRACE("OResultSet::updateTimestamp"); 1194cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1195cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1196cdf0e10cSrcweir checkColumnIndex(column); 1197cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateTimestamp", *this); 1198cdf0e10cSrcweir } 1199cdf0e10cSrcweir /* }}} */ 1200cdf0e10cSrcweir 1201cdf0e10cSrcweir 1202cdf0e10cSrcweir /* {{{ OResultSet::updateBinaryStream() -U- */ 1203cdf0e10cSrcweir void SAL_CALL OResultSet::updateBinaryStream(sal_Int32 column, const Reference< XInputStream >& /* x */, 1204cdf0e10cSrcweir sal_Int32 /* length */) 1205cdf0e10cSrcweir throw(SQLException, RuntimeException) 1206cdf0e10cSrcweir { 1207cdf0e10cSrcweir OSL_TRACE("OResultSet::updateBinaryStream"); 1208cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1209cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1210cdf0e10cSrcweir checkColumnIndex(column); 1211cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateBinaryStream", *this); 1212cdf0e10cSrcweir } 1213cdf0e10cSrcweir /* }}} */ 1214cdf0e10cSrcweir 1215cdf0e10cSrcweir 1216cdf0e10cSrcweir /* {{{ OResultSet::updateCharacterStream() -U- */ 1217cdf0e10cSrcweir void SAL_CALL OResultSet::updateCharacterStream(sal_Int32 column, const Reference< XInputStream >& /* x */, 1218cdf0e10cSrcweir sal_Int32 /* length */) 1219cdf0e10cSrcweir throw(SQLException, RuntimeException) 1220cdf0e10cSrcweir { 1221cdf0e10cSrcweir OSL_TRACE("OResultSet::updateCharacterStream"); 1222cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1223cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1224cdf0e10cSrcweir checkColumnIndex(column); 1225cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateCharacterStream", *this); 1226cdf0e10cSrcweir } 1227cdf0e10cSrcweir /* }}} */ 1228cdf0e10cSrcweir 1229cdf0e10cSrcweir 1230cdf0e10cSrcweir /* {{{ OResultSet::refreshRow() -U- */ 1231cdf0e10cSrcweir void SAL_CALL OResultSet::refreshRow() 1232cdf0e10cSrcweir throw(SQLException, RuntimeException) 1233cdf0e10cSrcweir { 1234cdf0e10cSrcweir OSL_TRACE("OResultSet::refreshRow"); 1235cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1236cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1237cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::refreshRow", *this); 1238cdf0e10cSrcweir } 1239cdf0e10cSrcweir /* }}} */ 1240cdf0e10cSrcweir 1241cdf0e10cSrcweir 1242cdf0e10cSrcweir /* {{{ OResultSet::updateObject() -U- */ 1243cdf0e10cSrcweir void SAL_CALL OResultSet::updateObject(sal_Int32 column, const Any& /* x */) 1244cdf0e10cSrcweir throw(SQLException, RuntimeException) 1245cdf0e10cSrcweir { 1246cdf0e10cSrcweir OSL_TRACE("OResultSet::updateObject"); 1247cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1248cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1249cdf0e10cSrcweir checkColumnIndex(column); 1250cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateObject", *this); 1251cdf0e10cSrcweir } 1252cdf0e10cSrcweir /* }}} */ 1253cdf0e10cSrcweir 1254cdf0e10cSrcweir 1255cdf0e10cSrcweir /* {{{ OResultSet::updateNumericObject() -U- */ 1256cdf0e10cSrcweir void SAL_CALL OResultSet::updateNumericObject(sal_Int32 column, const Any& /* x */, sal_Int32 /* scale */) 1257cdf0e10cSrcweir throw(SQLException, RuntimeException) 1258cdf0e10cSrcweir { 1259cdf0e10cSrcweir OSL_TRACE("OResultSet::updateNumericObject"); 1260cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1261cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1262cdf0e10cSrcweir checkColumnIndex(column); 1263cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateNumericObject", *this); 1264cdf0e10cSrcweir } 1265cdf0e10cSrcweir /* }}} */ 1266cdf0e10cSrcweir 1267cdf0e10cSrcweir 1268cdf0e10cSrcweir // XRowLocate 1269cdf0e10cSrcweir /* {{{ OResultSet::getBookmark() -U- */ 1270cdf0e10cSrcweir Any SAL_CALL OResultSet::getBookmark() 1271cdf0e10cSrcweir throw(SQLException, RuntimeException) 1272cdf0e10cSrcweir { 1273cdf0e10cSrcweir OSL_TRACE("OResultSet::getBookmark"); 1274cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1275cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1276cdf0e10cSrcweir Any aRet = Any(); 1277cdf0e10cSrcweir 1278cdf0e10cSrcweir // if you don't want to support bookmark you must remove the XRowLocate interface 1279cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBookmark", *this); 1280cdf0e10cSrcweir 1281cdf0e10cSrcweir return aRet; 1282cdf0e10cSrcweir } 1283cdf0e10cSrcweir /* }}} */ 1284cdf0e10cSrcweir 1285cdf0e10cSrcweir 1286cdf0e10cSrcweir /* {{{ OResultSet::moveToBookmark() -U- */ 1287cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::moveToBookmark(const Any& /* bookmark */) 1288cdf0e10cSrcweir throw(SQLException, RuntimeException) 1289cdf0e10cSrcweir { 1290cdf0e10cSrcweir OSL_TRACE("OResultSet::moveToBookmark"); 1291cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1292cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1293cdf0e10cSrcweir 1294cdf0e10cSrcweir return sal_False; 1295cdf0e10cSrcweir } 1296cdf0e10cSrcweir /* }}} */ 1297cdf0e10cSrcweir 1298cdf0e10cSrcweir 1299cdf0e10cSrcweir /* {{{ OResultSet::moveRelativeToBookmark() -U- */ 1300cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark(const Any& /* bookmark */, sal_Int32 /* rows */) 1301cdf0e10cSrcweir throw(SQLException, RuntimeException) 1302cdf0e10cSrcweir { 1303cdf0e10cSrcweir OSL_TRACE("OResultSet::moveRelativeToBookmark"); 1304cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1305cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1306cdf0e10cSrcweir 1307cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::moveRelativeToBookmark", *this); 1308cdf0e10cSrcweir return sal_False; 1309cdf0e10cSrcweir } 1310cdf0e10cSrcweir /* }}} */ 1311cdf0e10cSrcweir 1312cdf0e10cSrcweir 1313cdf0e10cSrcweir /* {{{ OResultSet::compareBookmarks() -I- */ 1314cdf0e10cSrcweir sal_Int32 SAL_CALL OResultSet::compareBookmarks(const Any& /* n1 */, const Any& /* n2 */) 1315cdf0e10cSrcweir throw(SQLException, RuntimeException) 1316cdf0e10cSrcweir { 1317cdf0e10cSrcweir OSL_TRACE("OResultSet::compareBookmarks"); 1318cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1319cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1320cdf0e10cSrcweir 1321cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::compareBookmarks", *this); 1322cdf0e10cSrcweir 1323cdf0e10cSrcweir return CompareBookmark::NOT_EQUAL; 1324cdf0e10cSrcweir } 1325cdf0e10cSrcweir /* }}} */ 1326cdf0e10cSrcweir 1327cdf0e10cSrcweir 1328cdf0e10cSrcweir /* {{{ OResultSet::hasOrderedBookmarks() -I- */ 1329cdf0e10cSrcweir sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks() 1330cdf0e10cSrcweir throw(SQLException, RuntimeException) 1331cdf0e10cSrcweir { 1332cdf0e10cSrcweir OSL_TRACE("OResultSet::hasOrderedBookmarks"); 1333cdf0e10cSrcweir return sal_False; 1334cdf0e10cSrcweir } 1335cdf0e10cSrcweir /* }}} */ 1336cdf0e10cSrcweir 1337cdf0e10cSrcweir 1338cdf0e10cSrcweir /* {{{ OResultSet::hashBookmark() -U- */ 1339cdf0e10cSrcweir sal_Int32 SAL_CALL OResultSet::hashBookmark(const Any& /* bookmark */) 1340cdf0e10cSrcweir throw(SQLException, RuntimeException) 1341cdf0e10cSrcweir { 1342cdf0e10cSrcweir OSL_TRACE("OResultSet::hashBookmark"); 1343cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::hashBookmark", *this); 1344cdf0e10cSrcweir return 0; 1345cdf0e10cSrcweir } 1346cdf0e10cSrcweir /* }}} */ 1347cdf0e10cSrcweir 1348cdf0e10cSrcweir 1349cdf0e10cSrcweir // XDeleteRows 1350cdf0e10cSrcweir /* {{{ OResultSet::deleteRows() -U- */ 1351cdf0e10cSrcweir Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows(const Sequence< Any >& /* rows */) 1352cdf0e10cSrcweir throw(SQLException, RuntimeException) 1353cdf0e10cSrcweir { 1354cdf0e10cSrcweir OSL_TRACE("OResultSet::deleteRows"); 1355cdf0e10cSrcweir MutexGuard aGuard(m_aMutex); 1356cdf0e10cSrcweir checkDisposed(OResultSet_BASE::rBHelper.bDisposed); 1357cdf0e10cSrcweir Sequence< sal_Int32 > aRet = Sequence< sal_Int32 >(); 1358cdf0e10cSrcweir 1359cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::deleteRows", *this); 1360cdf0e10cSrcweir return aRet; 1361cdf0e10cSrcweir } 1362cdf0e10cSrcweir /* }}} */ 1363cdf0e10cSrcweir 1364cdf0e10cSrcweir 1365cdf0e10cSrcweir /* {{{ OResultSet::createArrayHelper() -I- */ 1366cdf0e10cSrcweir IPropertyArrayHelper * OResultSet::createArrayHelper() const 1367cdf0e10cSrcweir { 1368cdf0e10cSrcweir OSL_TRACE("OResultSet::createArrayHelper"); 1369cdf0e10cSrcweir Sequence< Property > aProps(5); 1370cdf0e10cSrcweir Property* pProperties = aProps.getArray(); 1371cdf0e10cSrcweir sal_Int32 nPos = 0; 1372cdf0e10cSrcweir DECL_PROP0(FETCHDIRECTION, sal_Int32); 1373cdf0e10cSrcweir DECL_PROP0(FETCHSIZE, sal_Int32); 1374cdf0e10cSrcweir DECL_BOOL_PROP1IMPL(ISBOOKMARKABLE) PropertyAttribute::READONLY); 1375cdf0e10cSrcweir DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) PropertyAttribute::READONLY); 1376cdf0e10cSrcweir DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); 1377cdf0e10cSrcweir 1378cdf0e10cSrcweir return new OPropertyArrayHelper(aProps); 1379cdf0e10cSrcweir } 1380cdf0e10cSrcweir /* }}} */ 1381cdf0e10cSrcweir 1382cdf0e10cSrcweir 1383cdf0e10cSrcweir /* {{{ OResultSet::getInfoHelper() -I- */ 1384cdf0e10cSrcweir IPropertyArrayHelper & OResultSet::getInfoHelper() 1385cdf0e10cSrcweir { 1386cdf0e10cSrcweir OSL_TRACE("OResultSet::getInfoHelper"); 1387cdf0e10cSrcweir return (*const_cast<OResultSet*>(this)->getArrayHelper()); 1388cdf0e10cSrcweir } 1389cdf0e10cSrcweir /* }}} */ 1390cdf0e10cSrcweir 1391cdf0e10cSrcweir 1392cdf0e10cSrcweir /* {{{ OResultSet::convertFastPropertyValue() -I- */ 1393cdf0e10cSrcweir sal_Bool OResultSet::convertFastPropertyValue(Any & /* rConvertedValue */, 1394cdf0e10cSrcweir Any & /* rOldValue */, 1395cdf0e10cSrcweir sal_Int32 nHandle, 1396cdf0e10cSrcweir const Any& /* rValue */) 1397cdf0e10cSrcweir throw (::com::sun::star::lang::IllegalArgumentException) 1398cdf0e10cSrcweir { 1399cdf0e10cSrcweir OSL_TRACE("OResultSet::convertFastPropertyValue"); 1400cdf0e10cSrcweir switch (nHandle) { 1401cdf0e10cSrcweir case PROPERTY_ID_ISBOOKMARKABLE: 1402cdf0e10cSrcweir case PROPERTY_ID_CURSORNAME: 1403cdf0e10cSrcweir case PROPERTY_ID_RESULTSETCONCURRENCY: 1404cdf0e10cSrcweir case PROPERTY_ID_RESULTSETTYPE: 1405cdf0e10cSrcweir throw ::com::sun::star::lang::IllegalArgumentException(); 1406cdf0e10cSrcweir case PROPERTY_ID_FETCHDIRECTION: 1407cdf0e10cSrcweir case PROPERTY_ID_FETCHSIZE: 1408cdf0e10cSrcweir default: 1409cdf0e10cSrcweir ; 1410cdf0e10cSrcweir } 1411cdf0e10cSrcweir return sal_False; 1412cdf0e10cSrcweir } 1413cdf0e10cSrcweir /* }}} */ 1414cdf0e10cSrcweir 1415cdf0e10cSrcweir 1416cdf0e10cSrcweir /* {{{ OResultSet::setFastPropertyValue_NoBroadcast() -I- */ 1417cdf0e10cSrcweir void OResultSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& /* rValue */) 1418cdf0e10cSrcweir throw (Exception) 1419cdf0e10cSrcweir { 1420cdf0e10cSrcweir OSL_TRACE("OResultSet::setFastPropertyValue_NoBroadcast"); 1421cdf0e10cSrcweir switch (nHandle) { 1422cdf0e10cSrcweir case PROPERTY_ID_ISBOOKMARKABLE: 1423cdf0e10cSrcweir case PROPERTY_ID_CURSORNAME: 1424cdf0e10cSrcweir case PROPERTY_ID_RESULTSETCONCURRENCY: 1425cdf0e10cSrcweir case PROPERTY_ID_RESULTSETTYPE: 1426cdf0e10cSrcweir throw Exception(); 1427cdf0e10cSrcweir case PROPERTY_ID_FETCHDIRECTION: 1428cdf0e10cSrcweir break; 1429cdf0e10cSrcweir case PROPERTY_ID_FETCHSIZE: 1430cdf0e10cSrcweir break; 1431cdf0e10cSrcweir default: 1432cdf0e10cSrcweir ; 1433cdf0e10cSrcweir } 1434cdf0e10cSrcweir } 1435cdf0e10cSrcweir /* }}} */ 1436cdf0e10cSrcweir 1437cdf0e10cSrcweir 1438cdf0e10cSrcweir /* {{{ OResultSet::getFastPropertyValue() -I- */ 1439cdf0e10cSrcweir void OResultSet::getFastPropertyValue(Any& _rValue, sal_Int32 nHandle) const 1440cdf0e10cSrcweir { 1441cdf0e10cSrcweir OSL_TRACE("OResultSet::getFastPropertyValue"); 1442cdf0e10cSrcweir switch (nHandle) { 1443cdf0e10cSrcweir case PROPERTY_ID_ISBOOKMARKABLE: 1444cdf0e10cSrcweir _rValue <<= sal_False; 1445cdf0e10cSrcweir break; 1446cdf0e10cSrcweir case PROPERTY_ID_CURSORNAME: 1447cdf0e10cSrcweir break; 1448cdf0e10cSrcweir case PROPERTY_ID_RESULTSETCONCURRENCY: 1449cdf0e10cSrcweir _rValue <<= ResultSetConcurrency::READ_ONLY; 1450cdf0e10cSrcweir break; 1451cdf0e10cSrcweir case PROPERTY_ID_RESULTSETTYPE: 1452cdf0e10cSrcweir _rValue <<= ResultSetType::SCROLL_INSENSITIVE; 1453cdf0e10cSrcweir break; 1454cdf0e10cSrcweir case PROPERTY_ID_FETCHDIRECTION: 1455cdf0e10cSrcweir _rValue <<= FetchDirection::FORWARD; 1456cdf0e10cSrcweir break; 1457cdf0e10cSrcweir case PROPERTY_ID_FETCHSIZE: 1458cdf0e10cSrcweir _rValue <<= sal_Int32(50); 1459cdf0e10cSrcweir break; 1460cdf0e10cSrcweir ; 1461cdf0e10cSrcweir default: 1462cdf0e10cSrcweir ; 1463cdf0e10cSrcweir } 1464cdf0e10cSrcweir } 1465cdf0e10cSrcweir /* }}} */ 1466cdf0e10cSrcweir 1467cdf0e10cSrcweir 1468cdf0e10cSrcweir /* {{{ OResultSet::acquire() -I- */ 1469cdf0e10cSrcweir void SAL_CALL OResultSet::acquire() 1470cdf0e10cSrcweir throw() 1471cdf0e10cSrcweir { 1472cdf0e10cSrcweir OSL_TRACE("OResultSet::acquire"); 1473cdf0e10cSrcweir OResultSet_BASE::acquire(); 1474cdf0e10cSrcweir } 1475cdf0e10cSrcweir /* }}} */ 1476cdf0e10cSrcweir 1477cdf0e10cSrcweir 1478cdf0e10cSrcweir /* {{{ OResultSet::release() -I- */ 1479cdf0e10cSrcweir void SAL_CALL OResultSet::release() 1480cdf0e10cSrcweir throw() 1481cdf0e10cSrcweir { 1482cdf0e10cSrcweir OSL_TRACE("OResultSet::release"); 1483cdf0e10cSrcweir OResultSet_BASE::release(); 1484cdf0e10cSrcweir } 1485cdf0e10cSrcweir /* }}} */ 1486cdf0e10cSrcweir 1487cdf0e10cSrcweir 1488cdf0e10cSrcweir /* {{{ OResultSet::getPropertySetInfo() -I- */ 1489cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException) 1490cdf0e10cSrcweir { 1491cdf0e10cSrcweir OSL_TRACE("OResultSet::getPropertySetInfo"); 1492cdf0e10cSrcweir return (::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper())); 1493cdf0e10cSrcweir } 1494cdf0e10cSrcweir /* }}} */ 1495cdf0e10cSrcweir 1496cdf0e10cSrcweir 1497cdf0e10cSrcweir /* {{{ OResultSet::checkColumnIndex() -I- */ 1498cdf0e10cSrcweir void OResultSet::checkColumnIndex(sal_Int32 index) 1499cdf0e10cSrcweir throw (SQLException, RuntimeException) 1500cdf0e10cSrcweir { 1501cdf0e10cSrcweir OSL_TRACE("OResultSet::checkColumnIndex"); 1502cdf0e10cSrcweir if ((index < 1 || index > (int) fieldCount)) { 1503cdf0e10cSrcweir /* static object for efficiency or thread safety is a problem ? */ 1504cdf0e10cSrcweir OUString buf( RTL_CONSTASCII_USTRINGPARAM( "index out of range" ) ); 1505cdf0e10cSrcweir throw SQLException(buf, *this, OUString(), 1, Any()); 1506cdf0e10cSrcweir } 1507cdf0e10cSrcweir } 1508cdf0e10cSrcweir /* }}} */ 1509cdf0e10cSrcweir 1510cdf0e10cSrcweir 1511cdf0e10cSrcweir /* 1512cdf0e10cSrcweir * Local variables: 1513cdf0e10cSrcweir * tab-width: 4 1514cdf0e10cSrcweir * c-basic-offset: 4 1515cdf0e10cSrcweir * End: 1516cdf0e10cSrcweir * vim600: noet sw=4 ts=4 fdm=marker 1517cdf0e10cSrcweir * vim<600: noet sw=4 ts=4 1518cdf0e10cSrcweir */ 1519