substitutions.put(":expt_id:", exptId);
    private String addAssembly(String idType)        throws SQLException    {        String assemblyId;        String assemblyIdPrefix = idType + "-";        substitutions.put(":assembly_id_pattern:", assemblyIdPrefix + "____");        substitutions.put(":assembly_type:", idType);        DecimalFormat assemblyIdFormat =            new DecimalFormat(assemblyIdPrefix + "0000");        ResultSet rs =            executeQuery(stmt, dbp.getQuery(QUERY_MAX_ASSEMBLY_ID,                                            substitutions));        assemblyId = null;        if (rs.next()) {            String maxId = rs.getString(1);            if (maxId != null) {                try {                    int n = assemblyIdFormat.parse(maxId).intValue();                    assemblyId = assemblyIdFormat.format(n + 1);                } catch (Exception e) {                    e.printStackTrace();                    // Use default                }            }        }        if (assemblyId == null) assemblyId = assemblyIdFormat.format(1);        substitutions.put(":assembly_id:", sqlQuote(assemblyId));        substitutions.put(":expt_id:", exptId);        substitutions.put(":trial_id:", trialId);        executeUpdate(dbp.getQuery(INSERT_ASSEMBLY_ID, substitutions));        executeUpdate(dbp.getQuery(INSERT_TRIAL_ASSEMBLY, substitutions));        return assemblyId;    }