Update ooo320-m1
[ooovba.git] / connectivity / source / drivers / postgresql / pq_array.hxx
blob5784ba9517ff8c3351d2cac1ce660154a31f738a
1 /*************************************************************************
3 * $RCSfile: pq_array.hxx,v $
5 * $Revision: 1.1.2.1 $
7 * last change: $Author: jbu $ $Date: 2004/08/29 08:33:28 $
9 * The Contents of this file are made available subject to the terms of
10 * either of the following licenses
12 * - GNU Lesser General Public License Version 2.1
13 * - Sun Industry Standards Source License Version 1.1
15 * Sun Microsystems Inc., October, 2000
17 * GNU Lesser General Public License Version 2.1
18 * =============================================
19 * Copyright 2000 by Sun Microsystems, Inc.
20 * 901 San Antonio Road, Palo Alto, CA 94303, USA
22 * This library is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU Lesser General Public
24 * License version 2.1, as published by the Free Software Foundation.
26 * This library is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 * Lesser General Public License for more details.
31 * You should have received a copy of the GNU Lesser General Public
32 * License along with this library; if not, write to the Free Software
33 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
34 * MA 02111-1307 USA
37 * Sun Industry Standards Source License Version 1.1
38 * =================================================
39 * The contents of this file are subject to the Sun Industry Standards
40 * Source License Version 1.1 (the "License"); You may not use this file
41 * except in compliance with the License. You may obtain a copy of the
42 * License at http://www.openoffice.org/license.html.
44 * Software provided under this License is provided on an "AS IS" basis,
45 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
46 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
47 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
48 * See the License for the specific provisions governing your rights and
49 * obligations concerning the Software.
51 * The Initial Developer of the Original Code is: Joerg Budischewski
53 * Copyright: 2000 by Sun Microsystems, Inc.
55 * All Rights Reserved.
57 * Contributor(s): Joerg Budischewski
60 ************************************************************************/
62 #ifndef HEADER_PQ_ARRAY_HXX
63 #define HEADER_PQ_ARRAY_HXX
64 #include <cppuhelper/implbase1.hxx>
65 #include <com/sun/star/sdbc/XArray.hpp>
67 #include "pq_connection.hxx"
69 namespace pq_sdbc_driver
72 class Array : public cppu::WeakImplHelper1< com::sun::star::sdbc::XArray >
74 com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_data;
75 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_owner;
76 com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > m_tc;
77 rtl::Reference< RefCountedMutex > m_refMutex;
79 public:
80 Array(
81 const rtl::Reference< RefCountedMutex > & mutex,
82 const com::sun::star::uno::Sequence< com::sun::star::uno::Any > & data,
83 const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > & owner,
84 const com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > &tc) :
85 m_refMutex( mutex ),
86 m_data( data ),
87 m_owner( owner ),
88 m_tc( tc )
91 public: // XArray
93 // Methods
94 virtual ::rtl::OUString SAL_CALL getBaseTypeName( )
95 throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
97 virtual sal_Int32 SAL_CALL getBaseType( )
98 throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
100 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getArray(
101 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap )
102 throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
104 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getArrayAtIndex(
105 sal_Int32 index,
106 sal_Int32 count,
107 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap )
108 throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
110 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL
111 getResultSet(
112 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap )
113 throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
115 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getResultSetAtIndex(
116 sal_Int32 index,
117 sal_Int32 count,
118 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap )
119 throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
121 private:
122 void checkRange( sal_Int32 index, sal_Int32 count );
128 #endif