private Row(String[] data) { if (data != null) { this.ingredient_id = Str.toInt(data[0]); this.name = data[1]; this.priceNull = (data[2] == null); this.price = priceNull ? 0.0 : Str.toDouble(data[2]); this.stockNull = (data[3] == null); this.stock = stockNull ? 0 : Str.toInt(data[3]); this.expires = data[4]; dataLoadedFromDatabase = true; } }
/** Return an array of length zero if nothing found */ public static Row[] getRows(String column, int[] searchValues) throws SQLException { return imp.getRows(column, Str.toStringArray(searchValues)); }