LCOV - code coverage report
Current view: top level - connectivity/source/drivers/jdbc - ResultSet.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 93 383 24.3 %
Date: 2015-06-13 12:38:46 Functions: 25 92 27.2 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "java/lang/String.hxx"
      21             : #include "java/lang/Boolean.hxx"
      22             : #include "java/sql/ResultSet.hxx"
      23             : #include "java/math/BigDecimal.hxx"
      24             : #include "java/sql/JStatement.hxx"
      25             : #include "java/sql/SQLWarning.hxx"
      26             : #include "java/sql/Timestamp.hxx"
      27             : #include "java/sql/Array.hxx"
      28             : #include "java/sql/Ref.hxx"
      29             : #include "java/sql/Clob.hxx"
      30             : #include "java/sql/Blob.hxx"
      31             : #include "java/sql/ResultSetMetaData.hxx"
      32             : #include "java/io/InputStream.hxx"
      33             : #include "java/io/Reader.hxx"
      34             : #include "java/tools.hxx"
      35             : #include <comphelper/property.hxx>
      36             : #include <connectivity/CommonTools.hxx>
      37             : #include <cppuhelper/typeprovider.hxx>
      38             : #include <comphelper/sequence.hxx>
      39             : #include <com/sun/star/beans/PropertyAttribute.hpp>
      40             : #include "TConnection.hxx"
      41             : #include <comphelper/types.hxx>
      42             : #include <connectivity/dbtools.hxx>
      43             : #include <connectivity/dbexception.hxx>
      44             : #include "resource/common_res.hrc"
      45             : #include "resource/sharedresources.hxx"
      46             : #include "java/LocalRef.hxx"
      47             : 
      48             : #include <string.h>
      49             : #include <boost/scoped_ptr.hpp>
      50             : 
      51             : using namespace ::comphelper;
      52             : 
      53             : using namespace connectivity;
      54             : using namespace ::com::sun::star::uno;
      55             : using namespace ::com::sun::star::beans;
      56             : using namespace ::com::sun::star::sdbc;
      57             : using namespace ::com::sun::star::container;
      58             : using namespace ::com::sun::star::lang;
      59             : 
      60           0 : IMPLEMENT_SERVICE_INFO(java_sql_ResultSet,"com.sun.star.sdbcx.JResultSet","com.sun.star.sdbc.ResultSet");
      61             : 
      62             : //************ Class: java.sql.ResultSet
      63             : 
      64             : 
      65             : jclass java_sql_ResultSet::theClass = 0;
      66       13713 : java_sql_ResultSet::java_sql_ResultSet( JNIEnv * pEnv, jobject myObj, const java::sql::ConnectionLog& _rParentLogger,java_sql_Connection& _rConnection, java_sql_Statement_Base* pStmt)
      67             :     :java_sql_ResultSet_BASE(m_aMutex)
      68             :     ,java_lang_Object( pEnv, myObj )
      69             :     ,OPropertySetHelper(java_sql_ResultSet_BASE::rBHelper)
      70             :     ,m_aLogger( _rParentLogger, java::sql::ConnectionLog::RESULTSET )
      71       13713 :     ,m_pConnection(&_rConnection)
      72             : {
      73       13713 :     SDBThreadAttach::addRef();
      74       13713 :     osl_atomic_increment(&m_refCount);
      75       13713 :     if ( pStmt )
      76       13509 :         m_xStatement = *pStmt;
      77             : 
      78       13713 :     osl_atomic_decrement(&m_refCount);
      79       13713 : }
      80             : 
      81       41139 : java_sql_ResultSet::~java_sql_ResultSet()
      82             : {
      83       13713 :     if ( !java_sql_ResultSet_BASE::rBHelper.bDisposed && !java_sql_ResultSet_BASE::rBHelper.bInDispose )
      84             :     {
      85             :         // increment ref count to prevent double call of Dtor
      86           0 :         osl_atomic_increment( &m_refCount );
      87           0 :         dispose();
      88             :     }
      89       27426 : }
      90             : 
      91          35 : jclass java_sql_ResultSet::getMyClass() const
      92             : {
      93             :     // the class must be fetched only once, therefore static
      94          35 :     if( !theClass )
      95           4 :         theClass = findMyClass("java/sql/ResultSet");
      96          35 :     return theClass;
      97             : }
      98             : 
      99       13713 : void java_sql_ResultSet::disposing()
     100             : {
     101       13713 :     OPropertySetHelper::disposing();
     102             : 
     103       13713 :     ::osl::MutexGuard aGuard(m_aMutex);
     104       13713 : m_xMetaData.clear();
     105       13713 :     if( object )
     106             :     {
     107       13713 :         SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     108             :         static jmethodID mID(NULL);
     109       13713 :         callVoidMethod_ThrowSQL("close", mID);
     110       13713 :         clearObject(*t.pEnv);
     111             :     }
     112             : 
     113       13713 :     SDBThreadAttach::releaseRef();
     114       13713 : }
     115             : 
     116      189904 : ::com::sun::star::uno::Any SAL_CALL java_sql_ResultSet::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception)
     117             : {
     118      189904 :     ::com::sun::star::uno::Any aRet = OPropertySetHelper::queryInterface(rType);
     119      189904 :     return aRet.hasValue() ? aRet : java_sql_ResultSet_BASE::queryInterface(rType);
     120             : }
     121             : 
     122           0 : ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_ResultSet::getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception)
     123             : {
     124           0 :     ::cppu::OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(),
     125           0 :                                     cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(),
     126           0 :                                     cppu::UnoType<com::sun::star::beans::XPropertySet>::get());
     127             : 
     128           0 :     return ::comphelper::concatSequences(aTypes.getTypes(),java_sql_ResultSet_BASE::getTypes());
     129             : }
     130             : 
     131             : 
     132           3 : sal_Int32 SAL_CALL java_sql_ResultSet::findColumn( const OUString& columnName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     133             : {
     134             :     static jmethodID mID(NULL);
     135           3 :     return callIntMethodWithStringArg("findColumn",mID,columnName);
     136             : }
     137             : 
     138           0 : Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     139             : {
     140           0 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     141             :     static jmethodID mID(NULL);
     142           0 :     jobject out = callObjectMethodWithIntArg(t.pEnv,"getBinaryStream","(I)Ljava/io/InputStream;", mID, columnIndex);
     143             : 
     144             :     // WARNING: the caller becomes the owner of the returned pointer
     145           0 :     return out==0 ? 0 : new java_io_InputStream( t.pEnv, out );
     146             : }
     147             : 
     148           0 : Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     149             : {
     150           0 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     151             :     static jmethodID mID(NULL);
     152           0 :     jobject out = callObjectMethodWithIntArg(t.pEnv,"getCharacterStream","(I)Ljava/io/Reader;", mID, columnIndex);
     153             : 
     154             :     // WARNING: the caller becomes the owner of the returned pointer
     155           0 :     return out==0 ? 0 : new java_io_Reader( t.pEnv, out );
     156             : }
     157             : 
     158             : 
     159           3 : sal_Bool SAL_CALL java_sql_ResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     160             : {
     161             :     static jmethodID mID(NULL);
     162           3 :     return callBooleanMethodWithIntArg( "getBoolean", mID,columnIndex );
     163             : }
     164             : 
     165             : 
     166           0 : sal_Int8 SAL_CALL java_sql_ResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     167             : {
     168             :     static jmethodID mID(NULL);
     169           0 :     jbyte (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod;
     170           0 :     return callMethodWithIntArg<jbyte>(pCallMethod,"getByte","(I)B",mID,columnIndex);
     171             : }
     172             : 
     173             : 
     174           0 : Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     175             : {
     176           0 :     Sequence< sal_Int8 > aSeq;
     177           0 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     178             :     static jmethodID mID(NULL);
     179           0 :     jbyteArray out = static_cast<jbyteArray>(callObjectMethodWithIntArg(t.pEnv,"getBytes","(I)[B", mID, columnIndex));
     180           0 :     if (out)
     181             :     {
     182           0 :         jboolean p = sal_False;
     183           0 :         aSeq.realloc(t.pEnv->GetArrayLength(out));
     184           0 :         memcpy(aSeq.getArray(),t.pEnv->GetByteArrayElements(out,&p),aSeq.getLength());
     185           0 :         t.pEnv->DeleteLocalRef(out);
     186             :     }
     187           0 :     return aSeq;
     188             : }
     189             : 
     190             : 
     191          36 : ::com::sun::star::util::Date SAL_CALL java_sql_ResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     192             : {
     193          36 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     194             :     static jmethodID mID(NULL);
     195          36 :     jobject out = callObjectMethodWithIntArg(t.pEnv,"getDate","(I)Ljava/sql/Date;", mID, columnIndex);
     196             :     // WARNING: the caller becomes the owner of the returned pointer
     197          36 :     return out ? static_cast <com::sun::star::util::Date> (java_sql_Date( t.pEnv, out )) : ::com::sun::star::util::Date();
     198             : }
     199             : 
     200             : 
     201           0 : double SAL_CALL java_sql_ResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     202             : {
     203             :     static jmethodID mID(NULL);
     204           0 :     jdouble (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallDoubleMethod;
     205           0 :     return callMethodWithIntArg<double>(pCallMethod,"getDouble","(I)D",mID,columnIndex);
     206             : }
     207             : 
     208             : 
     209           0 : float SAL_CALL java_sql_ResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     210             : {
     211             :     static jmethodID mID(NULL);
     212           0 :     jfloat (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallFloatMethod;
     213           0 :     return callMethodWithIntArg<jfloat>(pCallMethod,"getFloat","(I)F",mID,columnIndex);
     214             : }
     215             : 
     216             : 
     217       14423 : sal_Int32 SAL_CALL java_sql_ResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     218             : {
     219             :     static jmethodID mID(NULL);
     220       14423 :     return callIntMethodWithIntArg_ThrowSQL("getInt",mID,columnIndex);
     221             : }
     222             : 
     223             : 
     224           0 : sal_Int32 SAL_CALL java_sql_ResultSet::getRow(  ) throw(SQLException, RuntimeException, std::exception)
     225             : {
     226             :     static jmethodID mID(NULL);
     227           0 :     return callIntMethod_ThrowSQL("getRow", mID);
     228             : }
     229             : 
     230             : 
     231           0 : sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     232             : {
     233             :     static jmethodID mID(NULL);
     234           0 :     jlong (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallLongMethod;
     235           0 :     return callMethodWithIntArg<jlong>(pCallMethod,"getLong","(I)J",mID,columnIndex);
     236             : }
     237             : 
     238             : 
     239          31 : ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL java_sql_ResultSet::getMetaData(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     240             : {
     241          31 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     242             :     static jmethodID mID(NULL);
     243          31 :     jobject out = callObjectMethod(t.pEnv,"getMetaData","()Ljava/sql/ResultSetMetaData;", mID);
     244             : 
     245          31 :     return out==0 ? 0 : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection );
     246             : }
     247             : 
     248           0 : Reference< XArray > SAL_CALL java_sql_ResultSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     249             : {
     250           0 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     251             :     static jmethodID mID(NULL);
     252           0 :     jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex);
     253             : 
     254             :     // WARNING: the caller becomes the owner of the returned pointer
     255           0 :     return out==0 ? 0 : new java_sql_Array( t.pEnv, out );
     256             : }
     257             : 
     258             : 
     259           0 : Reference< XClob > SAL_CALL java_sql_ResultSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     260             : {
     261           0 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     262             :     static jmethodID mID(NULL);
     263           0 :     jobject out = callObjectMethodWithIntArg(t.pEnv,"getClob","(I)Ljava/sql/Clob;", mID, columnIndex);
     264             :     // WARNING: the caller becomes the owner of the returned pointer
     265           0 :     return out==0 ? 0 : new java_sql_Clob( t.pEnv, out );
     266             : }
     267             : 
     268           0 : Reference< XBlob > SAL_CALL java_sql_ResultSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     269             : {
     270           0 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     271             :     static jmethodID mID(NULL);
     272           0 :     jobject out = callObjectMethodWithIntArg(t.pEnv,"getBlob","(I)Ljava/sql/Blob;", mID, columnIndex);
     273             :     // WARNING: the caller becomes the owner of the returned pointer
     274           0 :     return out==0 ? 0 : new java_sql_Blob( t.pEnv, out );
     275             : }
     276             : 
     277             : 
     278           0 : Reference< XRef > SAL_CALL java_sql_ResultSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     279             : {
     280           0 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     281             :     static jmethodID mID(NULL);
     282           0 :     jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex);
     283             : 
     284             :     // WARNING: the caller becomes the owner of the returned pointer
     285           0 :     return out==0 ? 0 : new java_sql_Ref( t.pEnv, out );
     286             : }
     287             : 
     288             : 
     289           0 : Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException, std::exception)
     290             : {
     291           0 :     jobject out(0);
     292           0 :     Any aRet;
     293           0 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     294             :     {
     295             :         jvalue args[2];
     296             :         // convert parameter
     297           0 :         args[0].i = (sal_Int32)columnIndex;
     298           0 :         args[1].l = convertTypeMapToJavaMap(t.pEnv,typeMap);
     299             :         // initialize temporary Variable
     300             :         // Java-Call
     301             :         static jmethodID mID(NULL);
     302           0 :         if ( !mID  )
     303             :         {
     304             :             static const char * cSignature = "(I)Ljava/lang/Object;";
     305             :             static const char * cMethodName = "getObject";
     306             : 
     307           0 :             obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
     308             :         }
     309             : 
     310           0 :         out = t.pEnv->CallObjectMethodA( object, mID, args);
     311           0 :         t.pEnv->DeleteLocalRef(static_cast<jstring>(args[1].l));
     312           0 :         ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
     313             :         // and clean up
     314           0 :         if ( out )
     315             :         {
     316           0 :             if ( t.pEnv->IsInstanceOf(out,java_lang_String::st_getMyClass()) )
     317             :             {
     318           0 :                 java_lang_String aVal(t.pEnv,out);
     319           0 :                 aRet <<= OUString(aVal);
     320             :             }
     321           0 :             else if ( t.pEnv->IsInstanceOf(out,java_lang_Boolean::st_getMyClass()) )
     322             :             {
     323           0 :                 java_lang_Boolean aVal(t.pEnv,out);
     324             :                 static jmethodID methodID = NULL;
     325           0 :                 aRet <<= aVal.callBooleanMethod("booleanValue",methodID);
     326             :             }
     327           0 :             else if ( t.pEnv->IsInstanceOf(out,java_sql_Date::st_getMyClass()) )
     328             :             {
     329           0 :                 java_sql_Date aVal(t.pEnv,out);
     330           0 :                 aRet <<= ::com::sun::star::util::Date(aVal);
     331             :             }
     332           0 :             else if ( t.pEnv->IsInstanceOf(out,java_sql_Time::st_getMyClass()) )
     333             :             {
     334           0 :                 java_sql_Time aVal(t.pEnv,out);
     335           0 :                 aRet <<= ::com::sun::star::util::Time(aVal);
     336             :             }
     337           0 :             else if ( t.pEnv->IsInstanceOf(out,java_sql_Timestamp::st_getMyClass()) )
     338             :             {
     339           0 :                 java_sql_Timestamp aVal(t.pEnv,out);
     340           0 :                 aRet <<= ::com::sun::star::util::DateTime(aVal);
     341             :             }
     342             :             else
     343           0 :                 t.pEnv->DeleteLocalRef(out);
     344             :         }
     345             :     } //t.pEnv
     346           0 :     return aRet;
     347             : }
     348             : 
     349             : 
     350           3 : sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     351             : {
     352             :     static jmethodID mID(NULL);
     353           3 :     jshort (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallShortMethod;
     354           3 :     return callMethodWithIntArg<jshort>(pCallMethod,"getShort","(I)S",mID,columnIndex);
     355             : }
     356             : 
     357             : 
     358             : 
     359       48134 : OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     360             : {
     361             :     static jmethodID mID(NULL);
     362       48134 :     return callStringMethodWithIntArg("getString",mID,columnIndex);
     363             : }
     364             : 
     365             : 
     366             : 
     367           0 : ::com::sun::star::util::Time SAL_CALL java_sql_ResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     368             : {
     369           0 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     370             :     static jmethodID mID(NULL);
     371           0 :     jobject out = callObjectMethodWithIntArg(t.pEnv,"getTime","(I)Ljava/sql/Time;", mID, columnIndex);
     372             :     // WARNING: the caller becomes the owner of the returned pointer
     373           0 :     return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time();
     374             : }
     375             : 
     376             : 
     377             : 
     378           0 : ::com::sun::star::util::DateTime SAL_CALL java_sql_ResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
     379             : {
     380           0 :     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
     381             :     static jmethodID mID(NULL);
     382           0 :     jobject out = callObjectMethodWithIntArg(t.pEnv,"getTimestamp","(I)Ljava/sql/Timestamp;", mID, columnIndex);
     383             :     // WARNING: the caller becomes the owner of the returned pointer
     384           0 :     return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime();
     385             : }
     386             : 
     387             : 
     388           0 : sal_Bool SAL_CALL java_sql_ResultSet::isAfterLast(  ) throw(SQLException, RuntimeException, std::exception)
     389             : {
     390             :     static jmethodID mID(NULL);
     391           0 :     return callBooleanMethod( "isAfterLast", mID );
     392             : }
     393             : 
     394           0 : sal_Bool SAL_CALL java_sql_ResultSet::isFirst(  ) throw(SQLException, RuntimeException, std::exception)
     395             : {
     396             :     static jmethodID mID(NULL);
     397           0 :     return callBooleanMethod( "isFirst", mID );
     398             : }
     399             : 
     400           0 : sal_Bool SAL_CALL java_sql_ResultSet::isLast(  ) throw(SQLException, RuntimeException, std::exception)
     401             : {
     402             :     static jmethodID mID(NULL);
     403           0 :     return callBooleanMethod( "isLast", mID );
     404             : }
     405             : 
     406           9 : void SAL_CALL java_sql_ResultSet::beforeFirst(  ) throw(SQLException, RuntimeException, std::exception)
     407             : {
     408             :     static jmethodID mID(NULL);
     409           9 :     callVoidMethod_ThrowSQL("beforeFirst", mID);
     410           9 : }
     411             : 
     412           0 : void SAL_CALL java_sql_ResultSet::afterLast(  ) throw(SQLException, RuntimeException, std::exception)
     413             : {
     414             :     static jmethodID mID(NULL);
     415           0 :     callVoidMethod_ThrowSQL("afterLast", mID);
     416           0 : }
     417             : 
     418             : 
     419       13490 : void SAL_CALL java_sql_ResultSet::close(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     420             : {
     421       13490 :     dispose();
     422       13490 : }
     423             : 
     424             : 
     425           0 : sal_Bool SAL_CALL java_sql_ResultSet::first(  ) throw(SQLException, RuntimeException, std::exception)
     426             : {
     427             :     static jmethodID mID(NULL);
     428           0 :     return callBooleanMethod( "first", mID );
     429             : }
     430             : 
     431             : 
     432           0 : sal_Bool SAL_CALL java_sql_ResultSet::last(  ) throw(SQLException, RuntimeException, std::exception)
     433             : {
     434             :     static jmethodID mID(NULL);
     435           0 :     return callBooleanMethod( "last", mID );
     436             : }
     437             : 
     438           0 : sal_Bool SAL_CALL java_sql_ResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception)
     439             : {
     440             :     static jmethodID mID(NULL);
     441           0 :     return callBooleanMethodWithIntArg( "absolute", mID,row );
     442             : }
     443             : 
     444           0 : sal_Bool SAL_CALL java_sql_ResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception)
     445             : {
     446             :     static jmethodID mID(NULL);
     447           0 :     return callBooleanMethodWithIntArg( "relative", mID,row );
     448             : }
     449             : 
     450           0 : sal_Bool SAL_CALL java_sql_ResultSet::previous(  ) throw(SQLException, RuntimeException, std::exception)
     451             : {
     452             :     static jmethodID mID(NULL);
     453           0 :     return callBooleanMethod( "previous", mID );
     454             : }
     455             : 
     456           0 : Reference< XInterface > SAL_CALL java_sql_ResultSet::getStatement(  ) throw(SQLException, RuntimeException, std::exception)
     457             : {
     458           0 :     return m_xStatement;
     459             : }
     460             : 
     461             : 
     462           0 : sal_Bool SAL_CALL java_sql_ResultSet::rowDeleted(  ) throw(SQLException, RuntimeException, std::exception)
     463             : {
     464             :     static jmethodID mID(NULL);
     465           0 :     return callBooleanMethod( "rowDeleted", mID );
     466             : }
     467             : 
     468           0 : sal_Bool SAL_CALL java_sql_ResultSet::rowInserted(  ) throw(SQLException, RuntimeException, std::exception)
     469             : {
     470             :     static jmethodID mID(NULL);
     471           0 :     return callBooleanMethod( "rowInserted", mID );
     472             : }
     473             : 
     474           0 : sal_Bool SAL_CALL java_sql_ResultSet::rowUpdated(  ) throw(SQLException, RuntimeException, std::exception)
     475             : {
     476             :     static jmethodID mID(NULL);
     477           0 :     return callBooleanMethod( "rowUpdated", mID );
     478             : }
     479             : 
     480             : 
     481           0 : sal_Bool SAL_CALL java_sql_ResultSet::isBeforeFirst(  ) throw(SQLException, RuntimeException, std::exception)
     482             : {
     483             :     static jmethodID mID(NULL);
     484           0 :     return callBooleanMethod( "isBeforeFirst", mID );
     485             : }
     486             : 
     487             : 
     488       31198 : sal_Bool SAL_CALL java_sql_ResultSet::next(  ) throw(SQLException, RuntimeException, std::exception)
     489             : {
     490             :     static jmethodID mID(NULL);
     491       31198 :     return callBooleanMethod( "next", mID );
     492             : }
     493             : 
     494       28519 : sal_Bool SAL_CALL java_sql_ResultSet::wasNull(  ) throw(SQLException, RuntimeException, std::exception)
     495             : {
     496             :     static jmethodID mID(NULL);
     497       28519 :     return callBooleanMethod( "wasNull", mID );
     498             : }
     499             : 
     500           0 : void SAL_CALL java_sql_ResultSet::cancel(  ) throw(::com::sun::star::uno::RuntimeException, std::exception)
     501             : {
     502             :     static jmethodID mID(NULL);
     503           0 :     callVoidMethod_ThrowRuntime("cancel", mID);
     504           0 : }
     505             : 
     506           0 : void SAL_CALL java_sql_ResultSet::clearWarnings(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     507             : {
     508             :     static jmethodID mID(NULL);
     509           0 :     callVoidMethod_ThrowSQL("clearWarnings", mID);
     510           0 : }
     511             : 
     512           0 : ::com::sun::star::uno::Any SAL_CALL java_sql_ResultSet::getWarnings(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     513             : {
     514           0 :     SDBThreadAttach t;
     515             :     static jmethodID mID(NULL);
     516           0 :     jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID);
     517             :     // WARNING: the caller becomes the owner of the returned pointer
     518           0 :     if( out )
     519             :     {
     520           0 :         java_sql_SQLWarning_BASE        warn_base( t.pEnv, out );
     521             :         return makeAny(
     522             :             static_cast< css::sdbc::SQLException >(
     523           0 :                 java_sql_SQLWarning(warn_base,*this)));
     524             :     }
     525             : 
     526           0 :     return ::com::sun::star::uno::Any();
     527             : }
     528             : 
     529             : 
     530           0 : void SAL_CALL java_sql_ResultSet::insertRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     531             : {
     532             :     static jmethodID mID(NULL);
     533           0 :     callVoidMethod_ThrowSQL("insertRow", mID);
     534           0 : }
     535             : 
     536           0 : void SAL_CALL java_sql_ResultSet::updateRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     537             : {
     538             :     static jmethodID mID(NULL);
     539           0 :     callVoidMethod_ThrowSQL("updateRow", mID);
     540           0 : }
     541             : 
     542           0 : void SAL_CALL java_sql_ResultSet::deleteRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     543             : {
     544             :     static jmethodID mID(NULL);
     545           0 :     callVoidMethod_ThrowSQL("deleteRow", mID);
     546           0 : }
     547             : 
     548             : 
     549           0 : void SAL_CALL java_sql_ResultSet::cancelRowUpdates(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     550             : {
     551             :     static jmethodID mID(NULL);
     552           0 :     callVoidMethod_ThrowSQL("cancelRowUpdates", mID);
     553           0 : }
     554             : 
     555             : 
     556           0 : void SAL_CALL java_sql_ResultSet::moveToInsertRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     557             : {
     558             :     static jmethodID mID(NULL);
     559           0 :     callVoidMethod_ThrowSQL("moveToInsertRow", mID);
     560           0 : }
     561             : 
     562             : 
     563           0 : void SAL_CALL java_sql_ResultSet::moveToCurrentRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     564             : {
     565             :     static jmethodID mID(NULL);
     566           0 :     callVoidMethod_ThrowSQL("moveToCurrentRow", mID);
     567           0 : }
     568             : 
     569             : 
     570           0 : void SAL_CALL java_sql_ResultSet::updateNull( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     571             : {
     572             :     static jmethodID mID(NULL);
     573           0 :     callVoidMethodWithIntArg_ThrowSQL("updateNull", mID, columnIndex);
     574           0 : }
     575             : 
     576             : 
     577           0 : void SAL_CALL java_sql_ResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     578             : {
     579             :     static jmethodID mID(NULL);
     580           0 :     callVoidMethod_ThrowSQL("updateBoolean", "(IZ)V", mID, columnIndex, x);
     581           0 : }
     582             : 
     583           0 : void SAL_CALL java_sql_ResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     584             : {
     585             :     static jmethodID mID(NULL);
     586           0 :     callVoidMethod_ThrowSQL("updateByte", "(IB)V", mID, columnIndex, x);
     587           0 : }
     588             : 
     589             : 
     590           0 : void SAL_CALL java_sql_ResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     591             : {
     592             :     static jmethodID mID(NULL);
     593           0 :     callVoidMethod_ThrowSQL("updateShort", "(IS)V", mID, columnIndex, x);
     594           0 : }
     595             : 
     596           0 : void SAL_CALL java_sql_ResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     597             : {
     598             :     static jmethodID mID(NULL);
     599           0 :     callVoidMethod_ThrowSQL("updateInt", "(II)V", mID, columnIndex, x);
     600           0 : }
     601             : 
     602           0 : void SAL_CALL java_sql_ResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     603             : {
     604             :     static jmethodID mID(NULL);
     605           0 :     callVoidMethod_ThrowSQL("updateLong", "(IJ)V", mID, columnIndex, x);
     606           0 : }
     607             : 
     608             : 
     609             : 
     610           0 : void SAL_CALL java_sql_ResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     611             : {
     612             :     static jmethodID mID(NULL);
     613           0 :     callVoidMethod_ThrowSQL("updateFloat", "(IF)V", mID, columnIndex, x);
     614           0 : }
     615             : 
     616             : 
     617           0 : void SAL_CALL java_sql_ResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     618             : {
     619             :     static jmethodID mID(NULL);
     620           0 :     callVoidMethod_ThrowSQL("updateDouble", "(ID)V", mID, columnIndex, x);
     621           0 : }
     622             : 
     623             : 
     624           0 : void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     625             : {
     626           0 :     SDBThreadAttach t;
     627             : 
     628             :     {
     629             :         // initialize temporary variable
     630             :         // Java-Call
     631             :         static jmethodID mID(NULL);
     632           0 :         if ( !mID  )
     633             :         {
     634             :             static const char * cSignature = "(ILjava/lang/String;)V";
     635             :             static const char * cMethodName = "updateString";
     636             : 
     637           0 :             obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
     638             :         }
     639             : 
     640             :         {
     641             :             // convert parameter
     642           0 :             jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,x));
     643           0 :             t.pEnv->CallVoidMethod( object, mID,columnIndex,str.get());
     644           0 :             ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
     645             :         }
     646           0 :     }
     647           0 : }
     648             : 
     649             : 
     650           0 : void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     651             : {
     652           0 :     SDBThreadAttach t;
     653             : 
     654             :     {
     655             :         // initialize temporary variable
     656             :         // Java-Call
     657             :         static jmethodID mID(NULL);
     658           0 :         if ( !mID  )
     659             :         {
     660             :             static const char * cSignature = "(I[B)V";
     661             :             static const char * cMethodName = "updateBytes";
     662             : 
     663           0 :             obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
     664             :         }
     665             : 
     666             :         {
     667           0 :             jbyteArray aArray = t.pEnv->NewByteArray(x.getLength());
     668           0 :             t.pEnv->SetByteArrayRegion(aArray,0,x.getLength(),x.getConstArray());
     669             :             // convert parameter
     670           0 :             t.pEnv->CallVoidMethod( object, mID,columnIndex,aArray);
     671           0 :             t.pEnv->DeleteLocalRef(aArray);
     672           0 :             ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
     673             :         }
     674           0 :     }
     675           0 : }
     676             : 
     677             : 
     678           0 : void SAL_CALL java_sql_ResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     679             : {
     680           0 :     java_sql_Date aD(x);
     681             :     static jmethodID mID(NULL);
     682           0 :     callVoidMethod_ThrowSQL("updateDate", "(ILjava/sql/Date;)V", mID, columnIndex, aD.getJavaObject());
     683           0 : }
     684             : 
     685             : 
     686           0 : void SAL_CALL java_sql_ResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     687             : {
     688           0 :     java_sql_Time aD(x);
     689             :     static jmethodID mID(NULL);
     690           0 :     callVoidMethod_ThrowSQL("updateTime", "(ILjava/sql/Time;)V", mID, columnIndex, aD.getJavaObject());
     691           0 : }
     692             : 
     693             : 
     694           0 : void SAL_CALL java_sql_ResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     695             : {
     696           0 :     java_sql_Timestamp aD(x);
     697             :     static jmethodID mID(NULL);
     698           0 :     callVoidMethod_ThrowSQL("updateTimestamp", "(ILjava/sql/Timestamp;)V", mID, columnIndex, aD.getJavaObject());
     699           0 : }
     700             : 
     701             : 
     702           0 : void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     703             : {
     704             :     try
     705             :     {
     706           0 :         SDBThreadAttach t;
     707             :         {
     708             : 
     709             :             // initialize temporary variable
     710             :             // Java-Call
     711             :             static jmethodID mID(NULL);
     712           0 :             if ( !mID  )
     713             :             {
     714             :                 static const char * cSignature = "(ILjava/io/InputStream;I)V";
     715             :                 static const char * cMethodName = "updateBinaryStream";
     716           0 :                 obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
     717             :             }
     718             : 
     719             :             {
     720             :                 // convert Parameter
     721           0 :                 jobject obj = createByteInputStream(x,length);
     722           0 :                 t.pEnv->CallVoidMethod( object, mID, columnIndex,obj,length);
     723           0 :                 ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
     724             :             }
     725           0 :         }
     726             :     }
     727           0 :     catch(const Exception&)
     728             :     {
     729           0 :         ::dbtools::throwFeatureNotImplementedSQLException( "XRowUpdate::updateBinaryStream", *this );
     730             :     }
     731           0 : }
     732             : 
     733           0 : void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     734             : {
     735             :     try
     736             :     {
     737           0 :         SDBThreadAttach t;
     738             :         {
     739             : 
     740             :             // initialize temporary variable
     741             :             // Java-Call
     742             :             static jmethodID mID(NULL);
     743           0 :             if ( !mID  )
     744             :             {
     745             :                 static const char * cSignature = "(ILjava/io/Reader;I)V";
     746             :                 static const char * cMethodName = "updateCharacterStream";
     747           0 :                 obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
     748             :             }
     749             : 
     750             :             {
     751             :                 // convert Parameter
     752           0 :                 jobject obj = createCharArrayReader(x,length);
     753           0 :                 t.pEnv->CallVoidMethod( object, mID, columnIndex,obj,length);
     754           0 :                 ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
     755             :             }
     756           0 :         }
     757             :     }
     758           0 :     catch(const Exception&)
     759             :     {
     760           0 :         ::dbtools::throwFeatureNotImplementedSQLException( "XRowUpdate::updateCharacterStream", *this );
     761             :     }
     762           0 : }
     763             : 
     764           0 : void SAL_CALL java_sql_ResultSet::updateObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     765             : {
     766           0 :     if(!::dbtools::implUpdateObject(this,columnIndex,x))
     767             :     {
     768           0 :         ::connectivity::SharedResources aResources;
     769             :         const OUString sError( aResources.getResourceStringWithSubstitution(
     770             :                 STR_UNKNOWN_COLUMN_TYPE,
     771             :                 "$position$", OUString::number(columnIndex)
     772           0 :              ) );
     773           0 :         ::dbtools::throwGenericSQLException(sError,*this);
     774             :     }
     775           0 : }
     776             : 
     777             : 
     778           0 : void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     779             : {
     780             :     //  OSL_FAIL("java_sql_ResultSet::updateNumericObject: NYI");
     781             :     try
     782             :     {
     783           0 :         SDBThreadAttach t;
     784             : 
     785             :         {
     786             : 
     787             :             // initialize temporary variable
     788             :             // Java-Call
     789             :             static jmethodID mID(NULL);
     790           0 :             if ( !mID  )
     791             :             {
     792             :                 static const char * cSignature = "(ILjava/lang/Object;I)V";
     793             :                 static const char * cMethodName = "updateObject";
     794             : 
     795           0 :                 obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
     796             :             }
     797             : 
     798             :             {
     799             :                 // convert parameter
     800           0 :                 double nTemp = 0.0;
     801           0 :                 boost::scoped_ptr<java_math_BigDecimal> pBigDecimal;
     802           0 :                 if ( x >>= nTemp)
     803             :                 {
     804           0 :                     pBigDecimal.reset(new java_math_BigDecimal(nTemp));
     805             :                 }
     806             :                 else
     807           0 :                     pBigDecimal.reset(new java_math_BigDecimal(::comphelper::getString(x)));
     808             : 
     809           0 :                 t.pEnv->CallVoidMethod( object, mID, columnIndex,pBigDecimal->getJavaObject(),scale);
     810           0 :                 ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
     811             :             }
     812           0 :         }
     813             :     }
     814           0 :     catch(const Exception&)
     815             :     {
     816           0 :         updateObject( columnIndex,x);
     817             :     }
     818           0 : }
     819             : 
     820       13490 : sal_Int32 java_sql_ResultSet::getResultSetConcurrency() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
     821             : {
     822             :     static jmethodID mID(NULL);
     823       13490 :     return callIntMethod_ThrowRuntime("getConcurrency", mID);
     824             : }
     825             : 
     826       13499 : sal_Int32 java_sql_ResultSet::getResultSetType() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
     827             : {
     828             :     static jmethodID mID(NULL);
     829       13499 :     return callIntMethod_ThrowRuntime("getType",mID);
     830             : }
     831             : 
     832           0 : sal_Int32 java_sql_ResultSet::getFetchDirection() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
     833             : {
     834             :     static jmethodID mID(NULL);
     835           0 :     return callIntMethod_ThrowRuntime("getFetchDirection", mID);
     836             : }
     837             : 
     838           0 : sal_Int32 java_sql_ResultSet::getFetchSize() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
     839             : {
     840             :     static jmethodID mID(NULL);
     841           0 :     return callIntMethod_ThrowRuntime("getFetchSize", mID);
     842             : }
     843             : 
     844           0 : OUString java_sql_ResultSet::getCursorName() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
     845             : {
     846             :     static jmethodID mID(NULL);
     847           0 :     return callStringMethod("getCursorName",mID);
     848             : }
     849             : 
     850             : 
     851           0 : void java_sql_ResultSet::setFetchDirection(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
     852             : {
     853             :     static jmethodID mID(NULL);
     854           0 :     callVoidMethodWithIntArg_ThrowRuntime("setFetchDirection", mID, _par0);
     855           0 : }
     856             : 
     857           0 : void SAL_CALL java_sql_ResultSet::refreshRow(  ) throw(SQLException, RuntimeException, std::exception)
     858             : {
     859             :     static jmethodID mID(NULL);
     860           0 :     callVoidMethod_ThrowSQL("refreshRow",mID);
     861           0 : }
     862             : 
     863           0 : void java_sql_ResultSet::setFetchSize(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
     864             : {
     865             :     static jmethodID mID(NULL);
     866           0 :     callVoidMethodWithIntArg_ThrowRuntime("setFetchSize", mID, _par0);
     867           0 : }
     868             : 
     869           3 : ::cppu::IPropertyArrayHelper* java_sql_ResultSet::createArrayHelper( ) const
     870             : {
     871           3 :     Sequence< Property > aProps(5);
     872           3 :     Property* pProperties = aProps.getArray();
     873           3 :     sal_Int32 nPos = 0;
     874           6 :     pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CURSORNAME),
     875           6 :         PROPERTY_ID_CURSORNAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY);
     876             : 
     877           9 :     pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION),
     878           6 :         PROPERTY_ID_FETCHDIRECTION, cppu::UnoType<sal_Int32>::get(), 0);
     879             : 
     880           9 :     pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE),
     881           6 :         PROPERTY_ID_FETCHSIZE, cppu::UnoType<sal_Int32>::get(), 0);
     882             : 
     883           6 :     pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY),
     884           6 :         PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::READONLY);
     885             : 
     886           6 :     pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE),
     887           6 :         PROPERTY_ID_RESULTSETTYPE, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::READONLY);
     888             : 
     889           3 :     return new ::cppu::OPropertyArrayHelper(aProps);
     890             : }
     891             : 
     892       53987 : ::cppu::IPropertyArrayHelper & java_sql_ResultSet::getInfoHelper()
     893             : {
     894       53987 :     return *getArrayHelper();
     895             : }
     896             : 
     897           0 : sal_Bool java_sql_ResultSet::convertFastPropertyValue(
     898             :                             ::com::sun::star::uno::Any & rConvertedValue,
     899             :                             ::com::sun::star::uno::Any & rOldValue,
     900             :                             sal_Int32 nHandle,
     901             :                             const ::com::sun::star::uno::Any& rValue )
     902             :                                 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
     903             : {
     904           0 :     bool bRet = false;
     905           0 :     switch(nHandle)
     906             :     {
     907             :         case PROPERTY_ID_CURSORNAME:
     908             :         case PROPERTY_ID_RESULTSETCONCURRENCY:
     909             :         case PROPERTY_ID_RESULTSETTYPE:
     910           0 :             throw ::com::sun::star::lang::IllegalArgumentException();
     911             :         case PROPERTY_ID_FETCHDIRECTION:
     912           0 :             bRet = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getFetchDirection());
     913           0 :             break;
     914             :         case PROPERTY_ID_FETCHSIZE:
     915           0 :             bRet = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getFetchSize());
     916             :         default:
     917             :             ;
     918             :     }
     919           0 :     return bRet;
     920             : }
     921             : 
     922             : 
     923           0 : void java_sql_ResultSet::setFastPropertyValue_NoBroadcast(
     924             :                                 sal_Int32 nHandle,
     925             :                                 const ::com::sun::star::uno::Any& rValue
     926             :                                                  )
     927             :                                                  throw (::com::sun::star::uno::Exception, std::exception)
     928             : {
     929           0 :     switch(nHandle)
     930             :     {
     931             :         case PROPERTY_ID_CURSORNAME:
     932             :         case PROPERTY_ID_RESULTSETCONCURRENCY:
     933             :         case PROPERTY_ID_RESULTSETTYPE:
     934           0 :             throw ::com::sun::star::uno::Exception();
     935             :         case PROPERTY_ID_FETCHDIRECTION:
     936           0 :             setFetchDirection(comphelper::getINT32(rValue));
     937           0 :             break;
     938             :         case PROPERTY_ID_FETCHSIZE:
     939           0 :             setFetchSize(comphelper::getINT32(rValue));
     940           0 :             break;
     941             :         default:
     942             :             ;
     943             :     }
     944           0 : }
     945             : 
     946       26989 : void java_sql_ResultSet::getFastPropertyValue(
     947             :                                 ::com::sun::star::uno::Any& rValue,
     948             :                                 sal_Int32 nHandle
     949             :                                      ) const
     950             : {
     951             :     try
     952             :     {
     953       26989 :         switch(nHandle)
     954             :         {
     955             :             case PROPERTY_ID_CURSORNAME:
     956           0 :                 rValue <<= getCursorName();
     957           0 :                 break;
     958             :             case PROPERTY_ID_RESULTSETCONCURRENCY:
     959       13490 :                 rValue <<= getResultSetConcurrency();
     960       13490 :                 break;
     961             :             case PROPERTY_ID_RESULTSETTYPE:
     962       13499 :                 rValue <<= getResultSetType();
     963       13499 :                 break;
     964             :             case PROPERTY_ID_FETCHDIRECTION:
     965           0 :                 rValue <<= getFetchDirection();
     966           0 :                 break;
     967             :             case PROPERTY_ID_FETCHSIZE:
     968           0 :                 rValue <<= getFetchSize();
     969           0 :                 break;
     970             :         }
     971             :     }
     972           0 :     catch(const Exception&)
     973             :     {
     974             :     }
     975       26989 : }
     976             : 
     977      461864 : void SAL_CALL java_sql_ResultSet::acquire() throw()
     978             : {
     979      461864 :     java_sql_ResultSet_BASE::acquire();
     980      461864 : }
     981             : 
     982      461864 : void SAL_CALL java_sql_ResultSet::release() throw()
     983             : {
     984      461864 :     java_sql_ResultSet_BASE::release();
     985      461864 : }
     986             : 
     987           9 : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL java_sql_ResultSet::getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception)
     988             : {
     989           9 :     return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
     990             : }
     991             : 
     992             : 
     993             : 
     994             : 
     995             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11