1*6df1ea1fSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*6df1ea1fSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*6df1ea1fSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*6df1ea1fSAndrew Rist * distributed with this work for additional information 6*6df1ea1fSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*6df1ea1fSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*6df1ea1fSAndrew Rist * "License"); you may not use this file except in compliance 9*6df1ea1fSAndrew Rist * with the License. You may obtain a copy of the License at 10*6df1ea1fSAndrew Rist * 11*6df1ea1fSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*6df1ea1fSAndrew Rist * 13*6df1ea1fSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*6df1ea1fSAndrew Rist * software distributed under the License is distributed on an 15*6df1ea1fSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*6df1ea1fSAndrew Rist * KIND, either express or implied. See the License for the 17*6df1ea1fSAndrew Rist * specific language governing permissions and limitations 18*6df1ea1fSAndrew Rist * under the License. 19*6df1ea1fSAndrew Rist * 20*6df1ea1fSAndrew Rist *************************************************************/ 21*6df1ea1fSAndrew Rist 22*6df1ea1fSAndrew Rist 23cdf0e10cSrcweir #ifndef _FILROW_HXX_ 24cdf0e10cSrcweir #define _FILROW_HXX_ 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <ucbhelper/macros.hxx> 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include "osl/mutex.hxx" 29cdf0e10cSrcweir #include <cppuhelper/weak.hxx> 30cdf0e10cSrcweir #include <com/sun/star/sdbc/XRow.hpp> 31cdf0e10cSrcweir #include <com/sun/star/script/XTypeConverter.hpp> 32cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp> 33cdf0e10cSrcweir #include <com/sun/star/ucb/XContentProvider.hpp> 34cdf0e10cSrcweir 35cdf0e10cSrcweir namespace fileaccess { 36cdf0e10cSrcweir 37cdf0e10cSrcweir class shell; 38cdf0e10cSrcweir 39cdf0e10cSrcweir class XRow_impl: 40cdf0e10cSrcweir public cppu::OWeakObject, 41cdf0e10cSrcweir public com::sun::star::lang::XTypeProvider, 42cdf0e10cSrcweir public com::sun::star::sdbc::XRow 43cdf0e10cSrcweir { 44cdf0e10cSrcweir public: 45cdf0e10cSrcweir XRow_impl( shell* pShell,const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& __m_aValueMap ); 46cdf0e10cSrcweir ~XRow_impl(); 47cdf0e10cSrcweir 48cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL 49cdf0e10cSrcweir queryInterface( 50cdf0e10cSrcweir const com::sun::star::uno::Type& aType ) 51cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException); 52cdf0e10cSrcweir 53cdf0e10cSrcweir virtual void SAL_CALL 54cdf0e10cSrcweir acquire( 55cdf0e10cSrcweir void ) 56cdf0e10cSrcweir throw(); 57cdf0e10cSrcweir 58cdf0e10cSrcweir virtual void SAL_CALL 59cdf0e10cSrcweir release( 60cdf0e10cSrcweir void ) 61cdf0e10cSrcweir throw(); 62cdf0e10cSrcweir 63cdf0e10cSrcweir // XTypeProvider 64cdf0e10cSrcweir 65cdf0e10cSrcweir XTYPEPROVIDER_DECL() 66cdf0e10cSrcweir 67cdf0e10cSrcweir virtual sal_Bool SAL_CALL 68cdf0e10cSrcweir wasNull( 69cdf0e10cSrcweir void ) 70cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 71cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 72cdf0e10cSrcweir 73cdf0e10cSrcweir virtual rtl::OUString SAL_CALL 74cdf0e10cSrcweir getString( 75cdf0e10cSrcweir sal_Int32 columnIndex ) 76cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 77cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 78cdf0e10cSrcweir 79cdf0e10cSrcweir virtual sal_Bool SAL_CALL 80cdf0e10cSrcweir getBoolean( 81cdf0e10cSrcweir sal_Int32 columnIndex ) 82cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 83cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 84cdf0e10cSrcweir 85cdf0e10cSrcweir virtual sal_Int8 SAL_CALL 86cdf0e10cSrcweir getByte( 87cdf0e10cSrcweir sal_Int32 columnIndex ) 88cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 89cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 90cdf0e10cSrcweir 91cdf0e10cSrcweir virtual sal_Int16 SAL_CALL 92cdf0e10cSrcweir getShort( 93cdf0e10cSrcweir sal_Int32 columnIndex ) 94cdf0e10cSrcweir throw( 95cdf0e10cSrcweir com::sun::star::sdbc::SQLException, 96cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 97cdf0e10cSrcweir 98cdf0e10cSrcweir virtual sal_Int32 SAL_CALL 99cdf0e10cSrcweir getInt( 100cdf0e10cSrcweir sal_Int32 columnIndex ) 101cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 102cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 103cdf0e10cSrcweir 104cdf0e10cSrcweir virtual sal_Int64 SAL_CALL 105cdf0e10cSrcweir getLong( 106cdf0e10cSrcweir sal_Int32 columnIndex ) 107cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 108cdf0e10cSrcweir com::sun::star::uno::RuntimeException ); 109cdf0e10cSrcweir 110cdf0e10cSrcweir virtual float SAL_CALL 111cdf0e10cSrcweir getFloat( 112cdf0e10cSrcweir sal_Int32 columnIndex ) 113cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 114cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 115cdf0e10cSrcweir 116cdf0e10cSrcweir virtual double SAL_CALL 117cdf0e10cSrcweir getDouble( 118cdf0e10cSrcweir sal_Int32 columnIndex ) 119cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 120cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 121cdf0e10cSrcweir 122cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL 123cdf0e10cSrcweir getBytes( 124cdf0e10cSrcweir sal_Int32 columnIndex ) 125cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 126cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 127cdf0e10cSrcweir 128cdf0e10cSrcweir virtual com::sun::star::util::Date SAL_CALL 129cdf0e10cSrcweir getDate( 130cdf0e10cSrcweir sal_Int32 columnIndex ) 131cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 132cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 133cdf0e10cSrcweir 134cdf0e10cSrcweir virtual com::sun::star::util::Time SAL_CALL 135cdf0e10cSrcweir getTime( 136cdf0e10cSrcweir sal_Int32 columnIndex ) 137cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 138cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 139cdf0e10cSrcweir 140cdf0e10cSrcweir virtual com::sun::star::util::DateTime SAL_CALL 141cdf0e10cSrcweir getTimestamp( 142cdf0e10cSrcweir sal_Int32 columnIndex ) 143cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 144cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 145cdf0e10cSrcweir 146cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL 147cdf0e10cSrcweir getBinaryStream( 148cdf0e10cSrcweir sal_Int32 columnIndex ) 149cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 150cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 151cdf0e10cSrcweir 152cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL 153cdf0e10cSrcweir getCharacterStream( 154cdf0e10cSrcweir sal_Int32 columnIndex ) 155cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 156cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 157cdf0e10cSrcweir 158cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL 159cdf0e10cSrcweir getObject( 160cdf0e10cSrcweir sal_Int32 columnIndex, 161cdf0e10cSrcweir const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& typeMap ) 162cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 163cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 164cdf0e10cSrcweir 165cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRef > SAL_CALL 166cdf0e10cSrcweir getRef( 167cdf0e10cSrcweir sal_Int32 columnIndex ) 168cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 169cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 170cdf0e10cSrcweir 171cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XBlob > SAL_CALL 172cdf0e10cSrcweir getBlob( 173cdf0e10cSrcweir sal_Int32 columnIndex ) 174cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 175cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 176cdf0e10cSrcweir 177cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XClob > SAL_CALL 178cdf0e10cSrcweir getClob( 179cdf0e10cSrcweir sal_Int32 columnIndex ) 180cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 181cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 182cdf0e10cSrcweir 183cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XArray > SAL_CALL 184cdf0e10cSrcweir getArray( 185cdf0e10cSrcweir sal_Int32 columnIndex ) 186cdf0e10cSrcweir throw( com::sun::star::sdbc::SQLException, 187cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 188cdf0e10cSrcweir 189cdf0e10cSrcweir private: 190cdf0e10cSrcweir osl::Mutex m_aMutex; 191cdf0e10cSrcweir com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_aValueMap; 192cdf0e10cSrcweir sal_Bool m_nWasNull; 193cdf0e10cSrcweir shell* m_pMyShell; 194cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider > m_xProvider; 195cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > m_xTypeConverter; 196cdf0e10cSrcweir }; 197cdf0e10cSrcweir 198cdf0e10cSrcweir } // end namespace fileaccess 199cdf0e10cSrcweir 200cdf0e10cSrcweir #endif 201