LCOV - code coverage report
Current view: top level - connectivity/source/drivers/jdbc - ResultSetMetaData.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 57 0.0 %
Date: 2014-04-14 Functions: 0 25 0.0 %
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/sql/ResultSetMetaData.hxx"
      21             : #include "java/sql/Connection.hxx"
      22             : #include "java/tools.hxx"
      23             : 
      24             : using namespace connectivity;
      25             : using namespace ::com::sun::star::uno;
      26             : using namespace ::com::sun::star::beans;
      27             : using namespace ::com::sun::star::sdbc;
      28             : using namespace ::com::sun::star::container;
      29             : using namespace ::com::sun::star::lang;
      30             : 
      31             : 
      32             : //************ Class: java.sql.ResultSetMetaData
      33             : 
      34             : 
      35             : jclass java_sql_ResultSetMetaData::theClass = 0;
      36           0 : java_sql_ResultSetMetaData::java_sql_ResultSetMetaData( JNIEnv * pEnv, jobject myObj, const java::sql::ConnectionLog& _rResultSetLogger, java_sql_Connection& _rCon  )
      37             :     :java_lang_Object( pEnv, myObj )
      38             :     ,m_aLogger( _rResultSetLogger )
      39             :     ,m_pConnection( &_rCon )
      40           0 :     ,m_nColumnCount(-1)
      41             : {
      42             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::java_sql_ResultSetMetaData" );
      43           0 :     SDBThreadAttach::addRef();
      44           0 : }
      45           0 : java_sql_ResultSetMetaData::~java_sql_ResultSetMetaData()
      46             : {
      47           0 :     SDBThreadAttach::releaseRef();
      48           0 : }
      49             : 
      50           0 : jclass java_sql_ResultSetMetaData::getMyClass() const
      51             : {
      52             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getMyClass" );
      53             :     // The class needs to be fetched just once, that is why it is static
      54           0 :     if( !theClass )
      55           0 :         theClass = findMyClass("java/sql/ResultSetMetaData");
      56           0 :     return theClass;
      57             : }
      58             : 
      59             : 
      60           0 : sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
      61             : {
      62             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getColumnDisplaySize" );
      63             :     static jmethodID mID(NULL);
      64           0 :     return callIntMethodWithIntArg("getColumnDisplaySize",mID,column);
      65             : }
      66             : 
      67             : 
      68           0 : sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
      69             : {
      70             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getColumnType" );
      71             :     static jmethodID mID(NULL);
      72           0 :     return callIntMethodWithIntArg("getColumnType",mID,column);
      73             : }
      74             : 
      75             : 
      76           0 : sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnCount(  ) throw(SQLException, RuntimeException, std::exception)
      77             : {
      78             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getColumnCount" );
      79           0 :     if ( m_nColumnCount == -1 )
      80             :     {
      81             :         static jmethodID mID(NULL);
      82           0 :         m_nColumnCount = callIntMethod("getColumnCount",mID);
      83             :     } // if ( m_nColumnCount == -1 )
      84           0 :     return m_nColumnCount;
      85             : 
      86             : }
      87             : 
      88             : 
      89           0 : sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
      90             : {
      91             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isCaseSensitive" );
      92             :     static jmethodID mID(NULL);
      93           0 :     return callBooleanMethodWithIntArg( "isCaseSensitive", mID,column );
      94             : }
      95             : 
      96           0 : OUString SAL_CALL java_sql_ResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
      97             : {
      98             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getSchemaName" );
      99             :     static jmethodID mID(NULL);
     100           0 :     return callStringMethodWithIntArg("getSchemaName",mID,column);
     101             : }
     102             : 
     103             : 
     104           0 : OUString SAL_CALL java_sql_ResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     105             : {
     106             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getColumnName" );
     107             :     static jmethodID mID(NULL);
     108           0 :     return callStringMethodWithIntArg("getColumnName",mID,column);
     109             : }
     110             : 
     111           0 : OUString SAL_CALL java_sql_ResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     112             : {
     113             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getTableName" );
     114             :     static jmethodID mID(NULL);
     115           0 :     return callStringMethodWithIntArg("getTableName",mID,column);
     116             : }
     117             : 
     118           0 : OUString SAL_CALL java_sql_ResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     119             : {
     120             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getCatalogName" );
     121             :     static jmethodID mID(NULL);
     122           0 :     return callStringMethodWithIntArg("getCatalogName",mID,column);
     123             : }
     124             : 
     125           0 : OUString SAL_CALL java_sql_ResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     126             : {
     127             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getColumnTypeName" );
     128             :     static jmethodID mID(NULL);
     129           0 :     return callStringMethodWithIntArg("getColumnTypeName",mID,column);
     130             : }
     131             : 
     132           0 : OUString SAL_CALL java_sql_ResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     133             : {
     134             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getColumnLabel" );
     135             :     static jmethodID mID(NULL);
     136           0 :     return callStringMethodWithIntArg("getColumnLabel",mID,column);
     137             : }
     138             : 
     139           0 : OUString SAL_CALL java_sql_ResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     140             : {
     141             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getColumnServiceName" );
     142             :     static jmethodID mID(NULL);
     143           0 :     return callStringMethodWithIntArg("getColumnClassName",mID,column);
     144             : }
     145             : 
     146             : 
     147           0 : sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     148             : {
     149             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isCurrency" );
     150           0 :     if ( m_pConnection->isIgnoreCurrencyEnabled() )
     151           0 :         return sal_False;
     152             :     static jmethodID mID(NULL);
     153           0 :     return callBooleanMethodWithIntArg( "isCurrency", mID,column );
     154             : }
     155             : 
     156             : 
     157           0 : sal_Bool SAL_CALL java_sql_ResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     158             : {
     159             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isAutoIncrement" );
     160             :     static jmethodID mID(NULL);
     161           0 :     return callBooleanMethodWithIntArg( "isAutoIncrement", mID,column );
     162             : }
     163             : 
     164             : 
     165             : 
     166           0 : sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     167             : {
     168             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isSigned" );
     169             :     static jmethodID mID(NULL);
     170           0 :     return callBooleanMethodWithIntArg( "isSigned", mID,column );
     171             : }
     172             : 
     173           0 : sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     174             : {
     175             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getPrecision" );
     176             :     static jmethodID mID(NULL);
     177           0 :     return callIntMethodWithIntArg("getPrecision",mID,column);
     178             : }
     179             : 
     180           0 : sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
     181             : {
     182             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getScale" );
     183             :     static jmethodID mID(NULL);
     184           0 :     return callIntMethodWithIntArg("getScale",mID,column);
     185             : }
     186             : 
     187           0 : sal_Int32 SAL_CALL java_sql_ResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     188             : {
     189             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isNullable" );
     190             :     static jmethodID mID(NULL);
     191           0 :     return callIntMethodWithIntArg("isNullable",mID,column);
     192             : }
     193             : 
     194             : 
     195           0 : sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     196             : {
     197             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isSearchable" );
     198             :     static jmethodID mID(NULL);
     199           0 :     return callBooleanMethodWithIntArg( "isSearchable", mID,column );
     200             : }
     201             : 
     202             : 
     203           0 : sal_Bool SAL_CALL java_sql_ResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     204             : {
     205             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isReadOnly" );
     206             :     static jmethodID mID(NULL);
     207           0 :     return callBooleanMethodWithIntArg( "isReadOnly", mID,column );
     208             : }
     209             : 
     210             : 
     211           0 : sal_Bool SAL_CALL java_sql_ResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     212             : {
     213             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isDefinitelyWritable" );
     214             :     static jmethodID mID(NULL);
     215           0 :     return callBooleanMethodWithIntArg( "isDefinitelyWritable", mID,column );
     216             : }
     217             : 
     218           0 : sal_Bool SAL_CALL java_sql_ResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
     219             : {
     220             :     SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isWritable" );
     221             :     static jmethodID mID(NULL);
     222           0 :     return callBooleanMethodWithIntArg( "isWritable", mID,column );
     223             : }
     224             : 
     225             : 
     226             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10