Update ooo320-m1
[ooovba.git] / ucb / source / ucp / file / filrow.hxx
blob296de98b6c46ab13e229cfa45dc478f47cf90732
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: filrow.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _FILROW_HXX_
31 #define _FILROW_HXX_
33 #include <ucbhelper/macros.hxx>
35 #include "osl/mutex.hxx"
36 #include <cppuhelper/weak.hxx>
37 #include <com/sun/star/sdbc/XRow.hpp>
38 #include <com/sun/star/script/XTypeConverter.hpp>
39 #include <com/sun/star/lang/XTypeProvider.hpp>
40 #include <com/sun/star/ucb/XContentProvider.hpp>
42 namespace fileaccess {
44 class shell;
46 class XRow_impl:
47 public cppu::OWeakObject,
48 public com::sun::star::lang::XTypeProvider,
49 public com::sun::star::sdbc::XRow
51 public:
52 XRow_impl( shell* pShell,const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& __m_aValueMap );
53 ~XRow_impl();
55 virtual com::sun::star::uno::Any SAL_CALL
56 queryInterface(
57 const com::sun::star::uno::Type& aType )
58 throw( com::sun::star::uno::RuntimeException);
60 virtual void SAL_CALL
61 acquire(
62 void )
63 throw();
65 virtual void SAL_CALL
66 release(
67 void )
68 throw();
70 // XTypeProvider
72 XTYPEPROVIDER_DECL()
74 virtual sal_Bool SAL_CALL
75 wasNull(
76 void )
77 throw( com::sun::star::sdbc::SQLException,
78 com::sun::star::uno::RuntimeException );
80 virtual rtl::OUString SAL_CALL
81 getString(
82 sal_Int32 columnIndex )
83 throw( com::sun::star::sdbc::SQLException,
84 com::sun::star::uno::RuntimeException);
86 virtual sal_Bool SAL_CALL
87 getBoolean(
88 sal_Int32 columnIndex )
89 throw( com::sun::star::sdbc::SQLException,
90 com::sun::star::uno::RuntimeException);
92 virtual sal_Int8 SAL_CALL
93 getByte(
94 sal_Int32 columnIndex )
95 throw( com::sun::star::sdbc::SQLException,
96 com::sun::star::uno::RuntimeException);
98 virtual sal_Int16 SAL_CALL
99 getShort(
100 sal_Int32 columnIndex )
101 throw(
102 com::sun::star::sdbc::SQLException,
103 com::sun::star::uno::RuntimeException );
105 virtual sal_Int32 SAL_CALL
106 getInt(
107 sal_Int32 columnIndex )
108 throw( com::sun::star::sdbc::SQLException,
109 com::sun::star::uno::RuntimeException );
111 virtual sal_Int64 SAL_CALL
112 getLong(
113 sal_Int32 columnIndex )
114 throw( com::sun::star::sdbc::SQLException,
115 com::sun::star::uno::RuntimeException );
117 virtual float SAL_CALL
118 getFloat(
119 sal_Int32 columnIndex )
120 throw( com::sun::star::sdbc::SQLException,
121 com::sun::star::uno::RuntimeException);
123 virtual double SAL_CALL
124 getDouble(
125 sal_Int32 columnIndex )
126 throw( com::sun::star::sdbc::SQLException,
127 com::sun::star::uno::RuntimeException);
129 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
130 getBytes(
131 sal_Int32 columnIndex )
132 throw( com::sun::star::sdbc::SQLException,
133 com::sun::star::uno::RuntimeException);
135 virtual com::sun::star::util::Date SAL_CALL
136 getDate(
137 sal_Int32 columnIndex )
138 throw( com::sun::star::sdbc::SQLException,
139 com::sun::star::uno::RuntimeException);
141 virtual com::sun::star::util::Time SAL_CALL
142 getTime(
143 sal_Int32 columnIndex )
144 throw( com::sun::star::sdbc::SQLException,
145 com::sun::star::uno::RuntimeException);
147 virtual com::sun::star::util::DateTime SAL_CALL
148 getTimestamp(
149 sal_Int32 columnIndex )
150 throw( com::sun::star::sdbc::SQLException,
151 com::sun::star::uno::RuntimeException);
153 virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL
154 getBinaryStream(
155 sal_Int32 columnIndex )
156 throw( com::sun::star::sdbc::SQLException,
157 com::sun::star::uno::RuntimeException);
159 virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL
160 getCharacterStream(
161 sal_Int32 columnIndex )
162 throw( com::sun::star::sdbc::SQLException,
163 com::sun::star::uno::RuntimeException);
165 virtual com::sun::star::uno::Any SAL_CALL
166 getObject(
167 sal_Int32 columnIndex,
168 const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& typeMap )
169 throw( com::sun::star::sdbc::SQLException,
170 com::sun::star::uno::RuntimeException);
172 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRef > SAL_CALL
173 getRef(
174 sal_Int32 columnIndex )
175 throw( com::sun::star::sdbc::SQLException,
176 com::sun::star::uno::RuntimeException);
178 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XBlob > SAL_CALL
179 getBlob(
180 sal_Int32 columnIndex )
181 throw( com::sun::star::sdbc::SQLException,
182 com::sun::star::uno::RuntimeException);
184 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XClob > SAL_CALL
185 getClob(
186 sal_Int32 columnIndex )
187 throw( com::sun::star::sdbc::SQLException,
188 com::sun::star::uno::RuntimeException);
190 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XArray > SAL_CALL
191 getArray(
192 sal_Int32 columnIndex )
193 throw( com::sun::star::sdbc::SQLException,
194 com::sun::star::uno::RuntimeException);
196 private:
197 osl::Mutex m_aMutex;
198 com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_aValueMap;
199 sal_Bool m_nWasNull;
200 shell* m_pMyShell;
201 com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider > m_xProvider;
202 com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > m_xTypeConverter;
205 } // end namespace fileaccess
207 #endif