info.put("dbs.keyName", keyName);
info.put("dbs.valueName", valueName);
info.put("dbs.typeName", typeName);
info.put("dbs.encodingName", encodingName);
InfoHelper helper = new InfoHelper(info);
tmp = "CREATE TABLE ${dbs.table} (${dbs.contextName} VARCHAR(255), ${dbs.keyName} VARCHAR(255), ${dbs.valueName} VARCHAR(255), ${dbs.typeName} VARCHAR(16), ${dbs.encodingName} VARCHAR(16), PRIMARY KEY (${dbs.contextName}, ${dbs.keyName}))";
createSql = helper.replace(info.get("dbs.createSql", tmp));
createTableOrReadColumnNames(originalNames, info);
log.fine("create statement: '" + createSql + "'");
tmp = "UPDATE ${dbs.table} SET ${dbs.valueName}=?, ${dbs.typeName}=?, ${dbs.encodingName}=? WHERE ${dbs.contextName}=? AND ${dbs.keyName}=?";
modifySql = helper.replace(info.get("dbs.mofifySql", tmp));
log.fine("modify statement: '" + modifySql + "'");
tmp = "INSERT INTO ${dbs.table} VALUES(?, ?, ?, ?, ?)";
addSql = helper.replace(info.get("dbs.addSql", tmp));
log.fine("add statement: '" + addSql + "'");
tmp = "SELECT * FROM ${dbs.table} WHERE ${dbs.contextName}=? AND ${dbs.keyName}=?";
getSql = helper.replace(info.get("dbs.getSql", tmp));
log.fine("get statement: '" + getSql + "'");
tmp = "DELETE FROM ${dbs.table} WHERE ${dbs.contextName}='${dbs.context}'";
cleanSql = helper.replace(info.get("dbs.cleanSql", tmp));
log.fine("clean statement: '" + cleanSql + "'");
tmp = "SELECT ${dbs.keyName} FROM ${dbs.table} WHERE ${dbs.contextName}=?";
getKeysSql = helper.replace(info.get("db.getKeysSql", tmp));
log.fine("getKeys statement: '" + getKeysSql + "'");
tmp = "DELETE FROM ${dbs.table} WHERE ${dbs.contextName}='${dbs.context}' AND ${dbs.keyName}=?";
deleteSql = helper.replace(info.get("dbs.deleteSql", tmp));
log.fine("delete statement: '" + deleteSql + "'");
/*
this.createSql = "CREATE TABLE " + table + " (context VARCHAR(255), " + KEY_TXT + " VARCHAR(255), value VARCHAR(255), type VARCHAR(16), encoding VARCHAR(16), PRIMARY KEY (context, " + KEY_TXT + "))";
this.modifySql = "UPDATE " + table + " SET value=?, type=?, encoding=? WHERE context=? AND " + KEY_TXT + "=?";
this.addSql = "INSERT INTO " + table + " VALUES(?, ?, ?, ?, ?)";