com.simba.dsi.dataengine.interfaces
Interface IArray

All Known Implementing Classes:
DSIArray, DSISimpleArray

public interface IArray

Represents a SQL ARRAY data value from a result set.


Method Summary
 java.lang.Object createArray(long offset, int count)
          Creates either a subtype of Object[] or a primitive array (such as int[]), representing the materialized values of this IArray.
 IResultSet createResultSet(long offset, int count)
          Creates an IResult representing the contents of this IArray.
 void free()
          Frees resources consumed by the IArray.
 IColumn getBaseColumn()
          Returns the metadata that describes the base type of the array.
 java.lang.String getStringRepresentation()
          Returns a string representation of the Array.
 

Method Detail

createArray

java.lang.Object createArray(long offset,
                             int count)
                             throws com.simba.support.exceptions.ErrorException
Creates either a subtype of Object[] or a primitive array (such as int[]), representing the materialized values of this IArray. The type of the array shall be a correct Java array type that corresponds to the base type of the IArray.

If the IArray represents a multi-dimensional SQL ARRAY, then a Java array which subclasses IArray[] should be returned, instead of a multi-dimensional Java array. For example, String[][] should not be returned.

Parameters:
offset - The offset into the IArray, where a 0 offset corresponds to the startof the IArray.
count - The number of successive elements to fetch, or IResultSet.RETRIEVE_ALL_DATA if all of the elements be fetched.
Returns:
a Java array representing the materialized values of the IArray.
Throws:
com.simba.support.exceptions.ErrorException - If an error occurs.

createResultSet

IResultSet createResultSet(long offset,
                           int count)
Creates an IResult representing the contents of this IArray.

Each row of the IResult has two columns. The first column is the index of the data in the IArray, where 1 corresponds to the first element of the IArray, and increases by 1 for each successive row. The second column contains the data elements of this IArray, and if, the IArray is of a single dimension, its metadata is described by the getBaseColumn() call of this IArray.

If the IArray is multidimensional, then the type of the VALUE column of the ResultSet returned by this method should be java.sql.Types.ARRAY.

Parameters:
offset - The offset into the IArray, where a 0 offset corresponds to the start of the IArray.
count - The number of successive elements to fetch, or IResultSet.RETRIEVE_ALL_DATA if all of the elements should be fetched.
Returns:
an IResult containing the data elements of this IArray, with at most count rows if (count != IResultSet.RETRIEVE_ALL_DATA).

free

void free()
Frees resources consumed by the IArray.


getBaseColumn

IColumn getBaseColumn()
Returns the metadata that describes the base type of the array.

If the array is multidimensional, then metadata with the type Types.ARRAY should be returned.

Returns:
the metadata that describes the base type of the array.

getStringRepresentation

java.lang.String getStringRepresentation()
Returns a string representation of the Array.

Returns:
a string representation of the array.


Copyright © 2006-2014 Simba Technologies Incorporated. All Rights Reserved.