LibreOffice Module dbaccess (master) 1
datacolumn.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <com/sun/star/sdbc/XRowUpdate.hpp>
23#include <com/sun/star/sdbc/XRow.hpp>
24#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
25#include <com/sun/star/sdb/XColumn.hpp>
26#include <com/sun/star/sdb/XColumnUpdate.hpp>
27#include "resultcolumn.hxx"
28namespace dbaccess
29{
30
31 // ODataColumn
32
33 class ODataColumn : public OResultColumn,
34 public css::sdb::XColumn,
35 public css::sdb::XColumnUpdate
36 {
37 css::uno::Reference < css::sdbc::XRow > m_xRow;
38 css::uno::Reference < css::sdbc::XRowUpdate > m_xRowUpdate;
39 protected:
40 virtual ~ODataColumn() override;
41 public:
42 ODataColumn (const css::uno::Reference < css::sdbc::XResultSetMetaData >& _xMetaData,
43 const css::uno::Reference < css::sdbc::XRow >& _xRow,
44 const css::uno::Reference < css::sdbc::XRowUpdate >& _xRowUpdate,
45 sal_Int32 _nPos,
46 const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rxDBMeta);
47
48 // css::lang::XTypeProvider
49 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
50 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
51
52 // css::uno::XInterface
53 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
54 virtual void SAL_CALL acquire() noexcept override { OResultColumn::acquire(); }
55 virtual void SAL_CALL release() noexcept override { OResultColumn::release(); }
56
57 // css::lang::XServiceInfo
58 virtual OUString SAL_CALL getImplementationName( ) override;
59 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
60
61 // cppu::OComponentHelper
62 virtual void SAL_CALL disposing() override;
63
64 // css::sdb::XColumn
65 virtual sal_Bool SAL_CALL wasNull( ) override;
66 virtual OUString SAL_CALL getString( ) override;
67 virtual sal_Bool SAL_CALL getBoolean( ) override;
68 virtual sal_Int8 SAL_CALL getByte( ) override;
69 virtual sal_Int16 SAL_CALL getShort( ) override;
70 virtual sal_Int32 SAL_CALL getInt( ) override;
71 virtual sal_Int64 SAL_CALL getLong( ) override;
72 virtual float SAL_CALL getFloat( ) override;
73 virtual double SAL_CALL getDouble( ) override;
74 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes( ) override;
75 virtual css::util::Date SAL_CALL getDate( ) override;
76 virtual css::util::Time SAL_CALL getTime( ) override;
77 virtual css::util::DateTime SAL_CALL getTimestamp( ) override;
78 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream( ) override;
79 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream( ) override;
80 virtual css::uno::Any SAL_CALL getObject( const css::uno::Reference< css::container::XNameAccess >& typeMap ) override;
81 virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef( ) override;
82 virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob( ) override;
83 virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob( ) override;
84 virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray( ) override;
85
86 // css::sdb::XColumnUpdate
87 virtual void SAL_CALL updateNull( ) override;
88 virtual void SAL_CALL updateBoolean( sal_Bool x ) override;
89 virtual void SAL_CALL updateByte( sal_Int8 x ) override;
90 virtual void SAL_CALL updateShort( sal_Int16 x ) override;
91 virtual void SAL_CALL updateInt( sal_Int32 x ) override;
92 virtual void SAL_CALL updateLong( sal_Int64 x ) override;
93 virtual void SAL_CALL updateFloat( float x ) override;
94 virtual void SAL_CALL updateDouble( double x ) override;
95 virtual void SAL_CALL updateString( const OUString& x ) override;
96 virtual void SAL_CALL updateBytes( const css::uno::Sequence< sal_Int8 >& x ) override;
97 virtual void SAL_CALL updateDate( const css::util::Date& x ) override;
98 virtual void SAL_CALL updateTime( const css::util::Time& x ) override;
99 virtual void SAL_CALL updateTimestamp( const css::util::DateTime& x ) override;
100 virtual void SAL_CALL updateBinaryStream( const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
101 virtual void SAL_CALL updateCharacterStream( const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
102 virtual void SAL_CALL updateObject( const css::uno::Any& x ) override;
103 virtual void SAL_CALL updateNumericObject( const css::uno::Any& x, sal_Int32 scale ) override;
104 };
105}
106
107/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray() override
Definition: datacolumn.cxx:251
virtual void SAL_CALL updateObject(const css::uno::Any &x) override
Definition: datacolumn.cxx:388
virtual void SAL_CALL release() noexcept override
Definition: datacolumn.hxx:55
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob() override
Definition: datacolumn.cxx:235
virtual sal_Int16 SAL_CALL getShort() override
Definition: datacolumn.cxx:131
virtual void SAL_CALL disposing() override
Definition: datacolumn.cxx:90
virtual void SAL_CALL updateNull() override
Definition: datacolumn.cxx:260
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob() override
Definition: datacolumn.cxx:243
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes() override
Definition: datacolumn.cxx:171
virtual css::util::Time SAL_CALL getTime() override
Definition: datacolumn.cxx:187
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef() override
Definition: datacolumn.cxx:227
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: datacolumn.cxx:84
virtual css::util::Date SAL_CALL getDate() override
Definition: datacolumn.cxx:179
virtual sal_Int64 SAL_CALL getLong() override
Definition: datacolumn.cxx:147
virtual void SAL_CALL updateTimestamp(const css::util::DateTime &x) override
Definition: datacolumn.cxx:356
virtual double SAL_CALL getDouble() override
Definition: datacolumn.cxx:163
virtual sal_Int8 SAL_CALL getByte() override
Definition: datacolumn.cxx:123
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: datacolumn.cxx:62
virtual sal_Bool SAL_CALL getBoolean() override
Definition: datacolumn.cxx:115
virtual void SAL_CALL updateShort(sal_Int16 x) override
Definition: datacolumn.cxx:284
virtual void SAL_CALL updateFloat(float x) override
Definition: datacolumn.cxx:308
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream() override
Definition: datacolumn.cxx:211
virtual ~ODataColumn() override
Definition: datacolumn.cxx:49
ODataColumn(const css::uno::Reference< css::sdbc::XResultSetMetaData > &_xMetaData, const css::uno::Reference< css::sdbc::XRow > &_xRow, const css::uno::Reference< css::sdbc::XRowUpdate > &_xRowUpdate, sal_Int32 _nPos, const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_rxDBMeta)
Definition: datacolumn.cxx:37
virtual void SAL_CALL updateTime(const css::util::Time &x) override
Definition: datacolumn.cxx:348
virtual void SAL_CALL updateInt(sal_Int32 x) override
Definition: datacolumn.cxx:292
virtual void SAL_CALL updateLong(sal_Int64 x) override
Definition: datacolumn.cxx:300
virtual css::uno::Any SAL_CALL getObject(const css::uno::Reference< css::container::XNameAccess > &typeMap) override
Definition: datacolumn.cxx:219
virtual void SAL_CALL updateByte(sal_Int8 x) override
Definition: datacolumn.cxx:276
virtual css::util::DateTime SAL_CALL getTimestamp() override
Definition: datacolumn.cxx:195
virtual void SAL_CALL updateBytes(const css::uno::Sequence< sal_Int8 > &x) override
Definition: datacolumn.cxx:332
virtual void SAL_CALL acquire() noexcept override
Definition: datacolumn.hxx:54
virtual sal_Int32 SAL_CALL getInt() override
Definition: datacolumn.cxx:139
virtual void SAL_CALL updateBinaryStream(const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
Definition: datacolumn.cxx:372
virtual OUString SAL_CALL getImplementationName() override
Definition: datacolumn.cxx:79
css::uno::Reference< css::sdbc::XRow > m_xRow
Definition: datacolumn.hxx:37
virtual sal_Bool SAL_CALL wasNull() override
Definition: datacolumn.cxx:99
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: datacolumn.cxx:54
virtual void SAL_CALL updateDouble(double x) override
Definition: datacolumn.cxx:316
virtual OUString SAL_CALL getString() override
Definition: datacolumn.cxx:107
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream() override
Definition: datacolumn.cxx:203
virtual void SAL_CALL updateCharacterStream(const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
Definition: datacolumn.cxx:364
virtual float SAL_CALL getFloat() override
Definition: datacolumn.cxx:155
virtual void SAL_CALL updateString(const OUString &x) override
Definition: datacolumn.cxx:324
virtual void SAL_CALL updateBoolean(sal_Bool x) override
Definition: datacolumn.cxx:268
css::uno::Reference< css::sdbc::XRowUpdate > m_xRowUpdate
Definition: datacolumn.hxx:38
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: datacolumn.cxx:67
virtual void SAL_CALL updateDate(const css::util::Date &x) override
Definition: datacolumn.cxx:340
virtual void SAL_CALL updateNumericObject(const css::uno::Any &x, sal_Int32 scale) override
Definition: datacolumn.cxx:380
unsigned char sal_Bool
signed char sal_Int8