1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XArray.idl,v $
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 __com_sun_star_sdbc_XArray_idl__
31 #define __com_sun_star_sdbc_XArray_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 module com
{ module sun
{ module star
{ module container
{
38 published
interface XNameAccess
;
41 #ifndef __com_sun_star_sdbc_SQLException_idl__
42 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
45 module com
{ module sun
{ module star
{ module sdbc
{
47 published
interface XResultSet
;
50 /** is used for mapping the SQL type
51 <member scope= "com::sun::star::sdbc">DataType::ARRAY</member>
55 is a transaction duration
56 reference to an SQL array. By default, an
60 is implemented using a SQL LOCATOR(array) internally.
62 published
interface XArray
: com
::sun
::star
::uno
::XInterface
65 /** returns the SQL type name of the elements in
66 the array designated by this
70 If the elements are a built-in type, it returns
71 the database-specific type name of the elements.
72 If the elements are a user-defined type (UDT),
73 this method returns the fully-qualified SQL type name.
76 a String that is the database-specific name for a built-in base type or the fully-qualified SQL type name for a base type that is a UDT
79 if a database access error occurs.
81 string getBaseTypeName
() raises
(SQLException
);
83 //-------------------------------------------------------------------------
85 /** returns the SDBC type of the elements in the array designated
90 a constant from the SDBC types that is the type code for the elements in the array designated by this Array object.
92 if a database access error occurs.
94 long getBaseType
() raises
(SQLException
);
96 //-------------------------------------------------------------------------
98 /** retrieves the contents of the SQL array designated by this
100 object, using the specified
102 for type map customizations.
104 If the base type of the array does not match a user-defined type
107 , the standard mapping is used instead.
110 is a map object that contains mappings of SQL type names to
116 associated with the connection for customizations of the type-mappings
120 an sequence that contains the ordered elements
121 of the SQL array designated by this object.
124 if an error occurs while attempting to access the array.
126 sequence
<any
> getArray
([in]com
::sun
::star
::container
::XNameAccess typeMap
)
127 raises
(SQLException
);
129 //-------------------------------------------------------------------------
131 /** returns an array containing a slice of the SQL array, beginning with the
136 successive elements of the SQL array.
139 is the array index of the first element to retrieve;
140 the first element is at index 1.
142 is the number of successive SQL array elements to retrieve.
144 is a map object that contains mappings of SQL type names to
150 associated with the connection for customizations of the type-mappings
153 an array containing up to
156 of the SQL array, beginning with element
160 if an error occurs while attempting to access the array.
162 sequence
<any
> getArrayAtIndex
([in]long index
,
164 [in]com
::sun
::star
::container
::XNameAccess
166 raises
(SQLException
);
168 //-------------------------------------------------------------------------
170 /** returns a result set that contains the elements of the array
173 object and uses the given
175 to map the array elements. If the base
176 type of the array does not match a user-defined type in
183 the connection type mapping is used instead.
187 The result set contains one row for each array element, with
188 two columns in each row. The second column stores the element
189 value; the first column stores the index into the array for
190 that element (with the first array element being at index 1).
191 The rows are in ascending order corresponding to
192 the order of the indices.
196 contains mapping of SQL user-defined types to classes in the UNO programming language
198 a ResultSet object containing one row for each of the elements in the array designated by this Array object,
199 with the rows in ascending order based on the indices.
201 if a database access error occurs.
203 XResultSet getResultSet
([in]com
::sun
::star
::container
::XNameAccess typeMap
)
204 raises
(SQLException
);
206 //-------------------------------------------------------------------------
208 /** returns a result set holding the elements of the subarray that
213 successive elements. This method uses the given
215 to map the array elements. If the base
216 type of the array does not match a user-defined type in
223 the connection type mapping is used instead.
227 The result set contains one row for each array element, with
228 two columns in each row. The second column stores the element
229 value; the first column stores the index into the array for
230 that element (with the first array element being at index 1).
231 The rows are in ascending order corresponding to
232 the order of the indices.
235 the array index of the first element to retrieve; the first element is at index 1.
237 the number of successive SQL array elements to retrieve,
239 the Map object that contains the mapping of SQL type names to classes in the UNO programming language.
241 a ResultSet object containing up to count consecutive elements of the SQL array
242 designated by this Array object, starting at index index.
244 if a database access error occurs.
246 XResultSet getResultSetAtIndex
([in]long index
,
248 [in]com
::sun
::star
::container
::XNameAccess typeMap
)
249 raises
(SQLException
);
252 //=============================================================================
256 /*===========================================================================
257 ===========================================================================*/