isql.util
Class ArrayBuilder

java.lang.Object
  extended by isql.util.ArrayBuilder

public class ArrayBuilder
extends java.lang.Object

Utility functions for the arrays composing the columns of the SQL query

Author:
SHZ Oct 26, 2007

Constructor Summary
ArrayBuilder()
           
 
Method Summary
static java.lang.Object[] buildArray(ColumnType type, int size)
          Builds an array of a certain type
static java.lang.Object[] convertToBig(ColumnType type, java.lang.Object small)
          Converts an array of primitives (double, boolean) to an array of objects (Double, Boolean)
static java.lang.Object[] convertToBigInteger(int[] arrSmall)
          Converts an array of int to an array of Integer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayBuilder

public ArrayBuilder()
Method Detail

buildArray

public static java.lang.Object[] buildArray(ColumnType type,
                                            int size)
Builds an array of a certain type

Parameters:
type - the type of the array (NUMERIC, TEXT...)
size - the size of the array
Returns:
the arrays

convertToBig

public static java.lang.Object[] convertToBig(ColumnType type,
                                              java.lang.Object small)
Converts an array of primitives (double, boolean) to an array of objects (Double, Boolean)

Parameters:
type - the type of the array (NUMERIC, BOOLEAN...)
small - the array of primitives
Returns:
the array of objects

convertToBigInteger

public static java.lang.Object[] convertToBigInteger(int[] arrSmall)
Converts an array of int to an array of Integer

Parameters:
arrSmall - the int[] array
Returns:
the Integer[] array