spec.benchmarks.derby
Class Utils

java.lang.Object
  extended by spec.benchmarks.derby.Utils

public class Utils
extends java.lang.Object


Field Summary
static int BYTES_IN_LONG
           
static int CALL_SPEC
           
static java.lang.String CREATE_ACCOUNTS_TABLE
           
static boolean DEBUG
           
static int INFO_LENGTH
           
static java.math.BigDecimal[][][] keys
           
static java.lang.String UPDATE_ACCOUNTS_TABLE
           
 
Constructor Summary
Utils()
           
 
Method Summary
static java.math.BigDecimal[] add(java.math.BigDecimal[] item1, java.math.BigDecimal[] item2)
           
static int[] bytesToInts(byte[] bytes, int shift, int[] spec)
           
static long bytesToLong(byte[] inbytes, int shift)
           
static java.util.HashMap createRatesMap(int dim1, int dim2, int dim3, java.math.BigDecimal value1)
           
static java.math.BigDecimal[] getArray()
           
static java.lang.String getCreateDurationsTableQuery(java.lang.String name, int scale)
           
static java.lang.String getInsertIntoDurationQuery(int scale, int tableNumber)
           
static java.lang.String getPreparedSelectQuery(int tableNumber)
           
static java.lang.String getSelectQuery(int tableNumber, int accountNumber)
           
static java.lang.String getUpdateAccountsQuery(java.math.BigDecimal[] result, int id)
           
static java.math.BigDecimal[] init(java.math.BigDecimal value)
           
static java.math.BigDecimal[][][] initMulti(java.math.BigDecimal value)
           
static void initRates()
           
static java.math.BigDecimal[] initResultsArray(java.math.BigDecimal[] array)
           
static void print(java.lang.String s)
           
static void releaseResources()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG

keys

public static java.math.BigDecimal[][][] keys

UPDATE_ACCOUNTS_TABLE

public static final java.lang.String UPDATE_ACCOUNTS_TABLE
See Also:
Constant Field Values

CREATE_ACCOUNTS_TABLE

public static final java.lang.String CREATE_ACCOUNTS_TABLE
See Also:
Constant Field Values

BYTES_IN_LONG

public static final int BYTES_IN_LONG
See Also:
Constant Field Values

CALL_SPEC

public static final int CALL_SPEC
See Also:
Constant Field Values

INFO_LENGTH

public static final int INFO_LENGTH
See Also:
Constant Field Values
Constructor Detail

Utils

public Utils()
Method Detail

getCreateDurationsTableQuery

public static java.lang.String getCreateDurationsTableQuery(java.lang.String name,
                                                            int scale)

getInsertIntoDurationQuery

public static java.lang.String getInsertIntoDurationQuery(int scale,
                                                          int tableNumber)

initRates

public static final void initRates()

createRatesMap

public static java.util.HashMap createRatesMap(int dim1,
                                               int dim2,
                                               int dim3,
                                               java.math.BigDecimal value1)

initMulti

public static java.math.BigDecimal[][][] initMulti(java.math.BigDecimal value)

init

public static java.math.BigDecimal[] init(java.math.BigDecimal value)

getPreparedSelectQuery

public static final java.lang.String getPreparedSelectQuery(int tableNumber)

getSelectQuery

public static final java.lang.String getSelectQuery(int tableNumber,
                                                    int accountNumber)

getUpdateAccountsQuery

public static final java.lang.String getUpdateAccountsQuery(java.math.BigDecimal[] result,
                                                            int id)

initResultsArray

public static java.math.BigDecimal[] initResultsArray(java.math.BigDecimal[] array)

getArray

public static final java.math.BigDecimal[] getArray()

add

public static java.math.BigDecimal[] add(java.math.BigDecimal[] item1,
                                         java.math.BigDecimal[] item2)

print

public static void print(java.lang.String s)

bytesToLong

public static long bytesToLong(byte[] inbytes,
                               int shift)

bytesToInts

public static int[] bytesToInts(byte[] bytes,
                                int shift,
                                int[] spec)

releaseResources

public static void releaseResources()