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

Generated by: LCOV version 1.10