Aaron Hamid - 2002-08-02

Logged In: YES
user_id=1290

I should add, that columns could easily be specified by
something more strict typed like numeral values by simply
auto-generating column constants:

static final int COL_COLUMN1 = 0;
static final int COL_COLUMN2 = 1;
static final int COL_COLUMN3 = 2;

public String getKeyConditions(int col) {
switch (col) {
case COL_COLUMN1: return "Column1 = " + _Column1;
break;
case COL_COLUMN2: return "Column2 = " + _Column2;
break;
...
}
}

Hard coded column name literals of course could also easily
be replaced by auto-generating an array of literal strings to
match the column constants:

static final String[] COLUMN_NAMES = new String
[column_count];

static {
COLUMN_NAMES[COL_COLUMN1] = "Column1";
COLUMN_NAMES[COL_COLUMN2] = "Column2";
...
}

case COL_COLUMN1:
return COLUMN_NAMES[COL_COLUMN1] + " = " +
_Column1;