LibreOffice Module dbaccess (master) 1
PrivateRow.cxx
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#include "PrivateRow.hxx"
21
22using namespace dbaccess;
23using namespace ::com::sun::star::uno;
24using namespace ::com::sun::star::beans;
25using namespace ::com::sun::star::sdbc;
26using namespace ::com::sun::star::sdb;
27using namespace ::com::sun::star::sdbcx;
28using namespace ::com::sun::star::container;
29using namespace ::com::sun::star::lang;
30using namespace ::com::sun::star::util;
31using namespace ::com::sun::star;
32
33sal_Bool SAL_CALL OPrivateRow::wasNull( )
34 {
35 return m_aRow[m_nPos].isNull();
36 }
37 OUString SAL_CALL OPrivateRow::getString( ::sal_Int32 columnIndex )
38 {
39 m_nPos = columnIndex;
40 return m_aRow[m_nPos].getString();
41 }
42 sal_Bool SAL_CALL OPrivateRow::getBoolean( ::sal_Int32 columnIndex )
43 {
44 m_nPos = columnIndex;
45 return m_aRow[m_nPos].getBool();
46 }
47 ::sal_Int8 SAL_CALL OPrivateRow::getByte( ::sal_Int32 columnIndex )
48 {
49 m_nPos = columnIndex;
50 return m_aRow[m_nPos].getInt8();
51 }
52 ::sal_Int16 SAL_CALL OPrivateRow::getShort( ::sal_Int32 columnIndex )
53 {
54 m_nPos = columnIndex;
55 return m_aRow[m_nPos].getInt16();
56 }
57 ::sal_Int32 SAL_CALL OPrivateRow::getInt( ::sal_Int32 columnIndex )
58 {
59 m_nPos = columnIndex;
60 return m_aRow[m_nPos].getInt32();
61 }
62 ::sal_Int64 SAL_CALL OPrivateRow::getLong( ::sal_Int32 columnIndex )
63 {
64 m_nPos = columnIndex;
65 return m_aRow[m_nPos].getLong();
66 }
67 float SAL_CALL OPrivateRow::getFloat( ::sal_Int32 columnIndex )
68 {
69 m_nPos = columnIndex;
70 return m_aRow[m_nPos].getFloat();
71 }
72 double SAL_CALL OPrivateRow::getDouble( ::sal_Int32 columnIndex )
73 {
74 m_nPos = columnIndex;
75 return m_aRow[m_nPos].getDouble();
76 }
77 Sequence< ::sal_Int8 > SAL_CALL OPrivateRow::getBytes( ::sal_Int32 columnIndex )
78 {
79 m_nPos = columnIndex;
80 return m_aRow[m_nPos].getSequence();
81 }
82 css::util::Date SAL_CALL OPrivateRow::getDate( ::sal_Int32 columnIndex )
83 {
84 m_nPos = columnIndex;
85 return m_aRow[m_nPos].getDate();
86 }
87 css::util::Time SAL_CALL OPrivateRow::getTime( ::sal_Int32 columnIndex )
88 {
89 m_nPos = columnIndex;
90 return m_aRow[m_nPos].getTime();
91 }
92 css::util::DateTime SAL_CALL OPrivateRow::getTimestamp( ::sal_Int32 columnIndex )
93 {
94 m_nPos = columnIndex;
95 return m_aRow[m_nPos].getDateTime();
96 }
97 Reference< css::io::XInputStream > SAL_CALL OPrivateRow::getBinaryStream( ::sal_Int32 columnIndex )
98 {
99 m_nPos = columnIndex;
100 return Reference< css::io::XInputStream >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
101 }
102 Reference< css::io::XInputStream > SAL_CALL OPrivateRow::getCharacterStream( ::sal_Int32 columnIndex )
103 {
104 m_nPos = columnIndex;
105 return Reference< css::io::XInputStream >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
106 }
107 Any SAL_CALL OPrivateRow::getObject( ::sal_Int32 columnIndex, const Reference< css::container::XNameAccess >& )
108 {
109 m_nPos = columnIndex;
110 return m_aRow[m_nPos].makeAny();
111 }
112 Reference< XRef > SAL_CALL OPrivateRow::getRef( ::sal_Int32 columnIndex )
113 {
114 m_nPos = columnIndex;
115 return Reference< XRef >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
116 }
117 Reference< XBlob > SAL_CALL OPrivateRow::getBlob( ::sal_Int32 columnIndex )
118 {
119 m_nPos = columnIndex;
120 return Reference< XBlob >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
121 }
122 Reference< XClob > SAL_CALL OPrivateRow::getClob( ::sal_Int32 columnIndex )
123 {
124 m_nPos = columnIndex;
125 return Reference< XClob >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
126 }
127 Reference< XArray > SAL_CALL OPrivateRow::getArray( ::sal_Int32 columnIndex )
128 {
129 m_nPos = columnIndex;
130 return Reference< XArray >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
131 }
132
133/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:122
virtual css::uno::Any SAL_CALL getObject(::sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
Definition: PrivateRow.cxx:107
virtual css::util::Date SAL_CALL getDate(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:82
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getBytes(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:77
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:102
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:127
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:97
virtual css::util::DateTime SAL_CALL getTimestamp(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:92
virtual double SAL_CALL getDouble(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:72
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:112
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:117
virtual ::sal_Int16 SAL_CALL getShort(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:52
virtual sal_Bool SAL_CALL getBoolean(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:42
virtual float SAL_CALL getFloat(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:67
virtual ::sal_Int64 SAL_CALL getLong(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:62
virtual ::sal_Int32 SAL_CALL getInt(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:57
virtual ::sal_Int8 SAL_CALL getByte(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:47
virtual css::util::Time SAL_CALL getTime(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:87
ORowSetValueVector::Vector m_aRow
Definition: PrivateRow.hxx:29
virtual OUString SAL_CALL getString(::sal_Int32 columnIndex) override
Definition: PrivateRow.cxx:37
css::uno::Any SAL_CALL makeAny(const SharedUNOComponent< INTERFACE, COMPONENT > &value)
unsigned char sal_Bool
signed char sal_Int8