Modifier and Type | Class and Description |
---|---|
static interface |
ArrayImpl.Factory
Factory that can create a ResultSet or Array based on a stream of values.
|
Constructor and Description |
---|
ArrayImpl(List<Object> list,
AbstractCursor.ArrayAccessor accessor) |
Modifier and Type | Method and Description |
---|---|
static boolean |
equalContents(Array left,
Array right)
Returns whether two arrays have the same contents.
|
void |
free() |
Object |
getArray() |
protected Object |
getArray(List<?> list,
AbstractCursor.ArrayAccessor arrayAccessor)
Converts a list into an array.
|
Object |
getArray(long index,
int count) |
Object |
getArray(long index,
int count,
Map<String,Class<?>> map) |
Object |
getArray(Map<String,Class<?>> map) |
int |
getBaseType() |
String |
getBaseTypeName() |
ResultSet |
getResultSet() |
ResultSet |
getResultSet(long index,
int count) |
ResultSet |
getResultSet(long index,
int count,
Map<String,Class<?>> map) |
ResultSet |
getResultSet(Map<String,Class<?>> map) |
String |
toString() |
public ArrayImpl(List<Object> list, AbstractCursor.ArrayAccessor accessor)
public String getBaseTypeName() throws SQLException
getBaseTypeName
in interface Array
SQLException
public int getBaseType() throws SQLException
getBaseType
in interface Array
SQLException
public Object getArray() throws SQLException
getArray
in interface Array
SQLException
protected Object getArray(List<?> list, AbstractCursor.ArrayAccessor arrayAccessor) throws SQLException
If the elements of the list are primitives, converts to an array of
primitives (e.g. boolean[]
.
list
- List of objectsClassCastException
- if any element is not of the box typeNullPointerException
- if any element is nullSQLException
public Object getArray(Map<String,Class<?>> map) throws SQLException
getArray
in interface Array
SQLException
public Object getArray(long index, int count) throws SQLException
getArray
in interface Array
SQLException
public Object getArray(long index, int count, Map<String,Class<?>> map) throws SQLException
getArray
in interface Array
SQLException
public ResultSet getResultSet() throws SQLException
getResultSet
in interface Array
SQLException
public ResultSet getResultSet(Map<String,Class<?>> map) throws SQLException
getResultSet
in interface Array
SQLException
public ResultSet getResultSet(long index, int count) throws SQLException
getResultSet
in interface Array
SQLException
public ResultSet getResultSet(long index, int count, Map<String,Class<?>> map) throws SQLException
getResultSet
in interface Array
SQLException
public void free() throws SQLException
free
in interface Array
SQLException
public static boolean equalContents(Array left, Array right) throws SQLException
Arrays must have the same size, and elements in the same order.
Elements are compared using Object.equals(Object)
, and null
values are equal to each other.
SQLException
Copyright © 2012-2025 Apache Software Foundation. All Rights Reserved.