LCOV - code coverage report
Current view: top level - libreoffice/connectivity/source/simpledbt - staticdbtools_s.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 1 100.0 %
Date: 2012-12-27 Functions: 2 2 100.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             : #ifndef CONNECTIVITY_STATIC_DBTOOLS_SIMPLE_HXX
      21             : #define CONNECTIVITY_STATIC_DBTOOLS_SIMPLE_HXX
      22             : 
      23             : #include <connectivity/virtualdbtools.hxx>
      24             : #include "refbase.hxx"
      25             : 
      26             : //........................................................................
      27             : namespace connectivity
      28             : {
      29             : //........................................................................
      30             : 
      31             :     //================================================================
      32             :     //= ODataAccessStaticTools
      33             :     //================================================================
      34           6 :     class ODataAccessStaticTools
      35             :             :public simple::IDataAccessTypeConversion
      36             :             ,public simple::IDataAccessTools
      37             :             ,public ORefBase
      38             :     {
      39             :     public:
      40             :         ODataAccessStaticTools();
      41             : 
      42             :         // IDataAccessTypeConversion
      43             :         // ------------------------------------------------
      44             :         virtual ::com::sun::star::util::Date getStandardDate() const;
      45             : 
      46             :         // ------------------------------------------------
      47             :         virtual double getValue(
      48             :             const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn>& _rxVariant,
      49             :             const ::com::sun::star::util::Date& rNullDate ) const;
      50             : 
      51             :         // ------------------------------------------------
      52             :         virtual ::rtl::OUString getFormattedValue(
      53             :             const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxColumn,
      54             :             const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
      55             :             const ::com::sun::star::util::Date& _rNullDate,
      56             :             sal_Int32 _nKey,
      57             :             sal_Int16 _nKeyType) const;
      58             : 
      59             :         // ------------------------------------------------
      60             :         virtual ::rtl::OUString getFormattedValue(
      61             :             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn,
      62             :             const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter>& _rxFormatter,
      63             :             const ::com::sun::star::lang::Locale& _rLocale,
      64             :             const ::com::sun::star::util::Date& _rNullDate
      65             :         ) const;
      66             : 
      67             :         // IDataAccessTools
      68             :         // ------------------------------------------------
      69             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection_withFeedback(
      70             :             const ::rtl::OUString& _rDataSourceName,
      71             :             const ::rtl::OUString& _rUser,
      72             :             const ::rtl::OUString& _rPwd,
      73             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext
      74             :         ) const SAL_THROW ( (::com::sun::star::sdbc::SQLException) );
      75             : 
      76             :         // ------------------------------------------------
      77             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> connectRowset(
      78             :             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet,
      79             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext,
      80             :             sal_Bool _bSetAsActiveConnection
      81             :         ) const SAL_THROW ( ( ::com::sun::star::sdbc::SQLException
      82             :                             , ::com::sun::star::lang::WrappedTargetException
      83             :                             , ::com::sun::star::uno::RuntimeException ) );
      84             : 
      85             :         // ------------------------------------------------
      86             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getRowSetConnection(
      87             :                 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet)
      88             :                 const SAL_THROW ( (::com::sun::star::uno::RuntimeException) );
      89             : 
      90             :         // ------------------------------------------------
      91             :         ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> getNumberFormats(
      92             :             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConn,
      93             :             sal_Bool _bAllowDefault
      94             :         ) const;
      95             : 
      96             :         // ------------------------------------------------
      97             :         virtual sal_Int32  getDefaultNumberFormat(
      98             :             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn,
      99             :             const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes >& _rxTypes,
     100             :             const ::com::sun::star::lang::Locale& _rLocale
     101             :         ) const;
     102             : 
     103             :         // ------------------------------------------------
     104             :         virtual void TransferFormComponentProperties(
     105             :             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxOld,
     106             :             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxNew,
     107             :             const ::com::sun::star::lang::Locale& _rLocale
     108             :         ) const;
     109             : 
     110             :         // ------------------------------------------------
     111             :         virtual ::rtl::OUString quoteName(
     112             :             const ::rtl::OUString& _rQuote,
     113             :             const ::rtl::OUString& _rName
     114             :         ) const;
     115             : 
     116             :         // ------------------------------------------------
     117             :         virtual ::rtl::OUString composeTableNameForSelect(
     118             :             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
     119             :             const ::rtl::OUString& _rCatalog,
     120             :             const ::rtl::OUString& _rSchema,
     121             :             const ::rtl::OUString& _rName
     122             :         ) const;
     123             : 
     124             :         // ------------------------------------------------
     125             :         virtual ::rtl::OUString composeTableNameForSelect(
     126             :             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
     127             :             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xTable
     128             :         ) const;
     129             : 
     130             :         // ------------------------------------------------
     131             :         virtual ::com::sun::star::sdb::SQLContext prependContextInfo(
     132             :             ::com::sun::star::sdbc::SQLException& _rException,
     133             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext,
     134             :             const ::rtl::OUString& _rContextDescription,
     135             :             const ::rtl::OUString& _rContextDetails
     136             :         ) const;
     137             : 
     138             :         // ------------------------------------------------
     139             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource(
     140             :             const ::rtl::OUString& _rsRegisteredName,
     141             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext
     142             :         ) const;
     143             : 
     144             :         // ------------------------------------------------
     145             :         /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::INSERT
     146             :             @param      _rxCursorSet    the property set
     147             :         */
     148             :         virtual sal_Bool canInsert(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const;
     149             : 
     150             :         // ------------------------------------------------
     151             :         /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::UPDATE
     152             :             @param      _rxCursorSet    the property set
     153             :         */
     154             :         virtual sal_Bool canUpdate(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const;
     155             : 
     156             :         // ------------------------------------------------
     157             :         /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::DELETE
     158             :             @param      _rxCursorSet    the property set
     159             :         */
     160             :         virtual sal_Bool canDelete(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const;
     161             : 
     162             :         // ------------------------------------------------
     163             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
     164             :             getFieldsByCommandDescriptor(
     165             :                 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
     166             :                 const sal_Int32 _nCommandType,
     167             :                 const ::rtl::OUString& _rCommand,
     168             :                 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxKeepFieldsAlive,
     169             :                 ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL
     170             :             )   SAL_THROW( ( ) );
     171             : 
     172             :         // ------------------------------------------------
     173             :         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
     174             :             getFieldNamesByCommandDescriptor(
     175             :                 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
     176             :                 const sal_Int32 _nCommandType,
     177             :                 const ::rtl::OUString& _rCommand,
     178             :                 ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL
     179             :             )   SAL_THROW( ( ) );
     180             : 
     181             :         // ------------------------------------------------
     182             :         virtual bool isEmbeddedInDatabase(
     183             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent,
     184             :             ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxActualConnection
     185             :         );
     186             : 
     187             :         // disambiguate IReference
     188             :         // ------------------------------------------------
     189             :         virtual oslInterlockedCount SAL_CALL acquire();
     190             :         virtual oslInterlockedCount SAL_CALL release();
     191             :     };
     192             : 
     193             : //........................................................................
     194             : }   // namespace connectivity
     195             : //........................................................................
     196             : 
     197             : #endif // CONNECTIVITY_STATIC_DBTOOLS_SIMPLE_HXX
     198             : 
     199             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10