jxDBCon 0.9z

org.sourceforge.jxdbcon
Class DefaultArray

java.lang.Object
  |
  +--org.sourceforge.jxdbcon.DefaultArray
All Implemented Interfaces:
Array

public class DefaultArray
extends Object
implements Array

DefaulttArray is a default implementation of Array.
TODO:

Version:
$Revision: 1.6 $, $Date: 2002/04/13 16:45:46 $
Author:
Keve Müller

Field Summary
private  ConversionContext ctx
           
private  Object elements
           
private  AbstractType elementType
           
 
Constructor Summary
DefaultArray(AbstractType elementType, Object elements, ConversionContext ctx)
           
 
Method Summary
 Object getArray()
          Retrieves the contents of the SQL ARRAY value designated by this Array object in the form of an array in the Java programming language.
 Object getArray(long index, int count)
          Retrieves a slice of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
 Object getArray(long index, int count, Map map)
          Retrieves a slice of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
 Object getArray(Map map)
          Retrieves the contents of the SQL ARRAY value designated by this Array object in the form of an array in the Java programming language.
 int getBaseType()
          Retrieves the JDBC type of the elements in the array designated by this Array object.
 String getBaseTypeName()
          Retrieves the SQL type name of the elements in the array designated by this Array object.
 ResultSet getResultSet()
          Retrieves a result set that contains the elements of the SQL ARRAY value designated by this Array object.
 ResultSet getResultSet(long index, int count)
          Retrieves a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
 ResultSet getResultSet(long index, int count, Map map)
          Retrieves a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
 ResultSet getResultSet(Map map)
          Retrieves a result set that contains the elements of the SQL ARRAY value designated by this Array object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ctx

private ConversionContext ctx

elements

private Object elements

elementType

private AbstractType elementType
Constructor Detail

DefaultArray

public DefaultArray(AbstractType elementType,
                    Object elements,
                    ConversionContext ctx)
Method Detail

getArray

public Object getArray()
                throws SQLException
Retrieves the contents of the SQL ARRAY value designated by this Array object in the form of an array in the Java programming language. This implementation returns Object[] filled with elements returned by getObject.

Specified by:
getArray in interface Array
SQLException

getArray

public Object getArray(long index,
                       int count)
                throws SQLException
Retrieves a slice of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array. This implementation returns Object[] filled with elements returned by getObject(). It casts away the long to int.

Specified by:
getArray in interface Array
SQLException

getArray

public Object getArray(long index,
                       int count,
                       Map map)
                throws SQLException
Retrieves a slice of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array. This implementation returns Object[] filled with elements returned by getObject(Map). It casts away the long to int.

Specified by:
getArray in interface Array
SQLException

getArray

public Object getArray(Map map)
                throws SQLException
Retrieves the contents of the SQL ARRAY value designated by this Array object in the form of an array in the Java programming language. This implementation returns Object[] filled with elements returned by getObject(Map).

Specified by:
getArray in interface Array
SQLException

getBaseType

public final int getBaseType()
Retrieves the JDBC type of the elements in the array designated by this Array object.

Specified by:
getBaseType in interface Array

getBaseTypeName

public final String getBaseTypeName()
Retrieves the SQL type name of the elements in the array designated by this Array object.

Specified by:
getBaseTypeName in interface Array

getResultSet

public ResultSet getResultSet()
                       throws SQLException
Retrieves a result set that contains the elements of the SQL ARRAY value designated by this Array object. TODO: implement

Specified by:
getResultSet in interface Array
SQLException

getResultSet

public ResultSet getResultSet(long index,
                              int count)
                       throws SQLException
Retrieves a result set holding the elements of the subarray that starts at index index and contains up to count successive elements. TODO: implement

Specified by:
getResultSet in interface Array
SQLException

getResultSet

public ResultSet getResultSet(long index,
                              int count,
                              Map map)
                       throws SQLException
Retrieves a result set holding the elements of the subarray that starts at index index and contains up to count successive elements. TODO: implement

Specified by:
getResultSet in interface Array
SQLException

getResultSet

public ResultSet getResultSet(Map map)
                       throws SQLException
Retrieves a result set that contains the elements of the SQL ARRAY value designated by this Array object. TODO: implement

Specified by:
getResultSet in interface Array
SQLException

toString

public String toString()
Overrides:
toString in class Object

jxDBCon 0.9z

Copyright © 2001,2002 Keve Müller; see LICENSE file for details.