1 /*
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
164 * <p>
165 * <strong>Note:</strong> When <code>getArray</code> is used to materialize
166 * a base type that maps to a primitive data type, then it is
167 * implementation-defined whether the array returned is an array of
168 * that primitive data type or an array of <code>Object</code>.
169 *
170 * @param index the array index of the first element to retrieve;
171 * the first element is at index 1
172 * @param count the number of successive SQL array elements to retrieve
173 * @return an array containing up to <code>count</code> consecutive elements
174 * of the SQL array, beginning with element <code>index</code>
175 * @exception SQLException if an error occurs while attempting to
176 * access the array
177 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
178 * this method
179 * @since 1.2
180 */
181 Object getArray(long index, int count) throws SQLException;
182
183 /**
184 * Retreives a slice of the SQL <code>ARRAY</code> value
185 * designated by this <code>Array</code> object, beginning with the specified
186 * <code>index</code> and containing up to <code>count</code>
187 * successive elements of the SQL array.
188 * <P>
189 * This method uses
190 * the specified <code>map</code> for type map customizations
191 * unless the base type of the array does not match a user-defined
192 * type in <code>map</code>, in which case it
193 * uses the standard mapping. This version of the method
194 * <code>getArray</code> uses either the given type map or the standard mapping;
195 * it never uses the type map associated with the connection.
196 * <p>
197 * <strong>Note:</strong> When <code>getArray</code> is used to materialize
198 * a base type that maps to a primitive data type, then it is
199 * implementation-defined whether the array returned is an array of
200 * that primitive data type or an array of <code>Object</code>.
201 *
202 * @param index the array index of the first element to retrieve;
203 * the first element is at index 1
204 * @param count the number of successive SQL array elements to
|
1 /*
2 * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
164 * <p>
165 * <strong>Note:</strong> When <code>getArray</code> is used to materialize
166 * a base type that maps to a primitive data type, then it is
167 * implementation-defined whether the array returned is an array of
168 * that primitive data type or an array of <code>Object</code>.
169 *
170 * @param index the array index of the first element to retrieve;
171 * the first element is at index 1
172 * @param count the number of successive SQL array elements to retrieve
173 * @return an array containing up to <code>count</code> consecutive elements
174 * of the SQL array, beginning with element <code>index</code>
175 * @exception SQLException if an error occurs while attempting to
176 * access the array
177 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
178 * this method
179 * @since 1.2
180 */
181 Object getArray(long index, int count) throws SQLException;
182
183 /**
184 * Retrieves a slice of the SQL <code>ARRAY</code> value
185 * designated by this <code>Array</code> object, beginning with the specified
186 * <code>index</code> and containing up to <code>count</code>
187 * successive elements of the SQL array.
188 * <P>
189 * This method uses
190 * the specified <code>map</code> for type map customizations
191 * unless the base type of the array does not match a user-defined
192 * type in <code>map</code>, in which case it
193 * uses the standard mapping. This version of the method
194 * <code>getArray</code> uses either the given type map or the standard mapping;
195 * it never uses the type map associated with the connection.
196 * <p>
197 * <strong>Note:</strong> When <code>getArray</code> is used to materialize
198 * a base type that maps to a primitive data type, then it is
199 * implementation-defined whether the array returned is an array of
200 * that primitive data type or an array of <code>Object</code>.
201 *
202 * @param index the array index of the first element to retrieve;
203 * the first element is at index 1
204 * @param count the number of successive SQL array elements to
|