/**
* Get the path to the ibatis configuration file for the given schema
*
* Each schema in the database will have it's own ibatis configuration file.
*
* @param schema the schema name. '' if there is no schema
* @return The path to the ibatis configuration file for the given schema
*/
function ibatisConfigFile(schema) {
var result = "";
template = templates.getTemplate("tmpSqlMapConfig");
r = new net.sf.sql2java.generator.ResourceNaming();
r.append(templates.getBasePackage());
r.append(template.getTargetPackage());
r.append(template.getTargetFilename());
naming = util.createParameterizedString(r.getAsFilePath());
s = "";
if (schema != null && schema instanceof net.sf.sql2java.common.beans.Schema)
s = convertor.convertToJava(schema.name);
naming.addParameter("schema", s);
result = naming.parse();
result += (template.getTargetExtension());
return result;
}
function dataSourceName(section) {
if ($database.schemas.size() == 0) {
return "dataSource";
} else {
return "dataSource-" + section.name;
}
}
function sqlMapClientName(section) {
if ($database.schemas.size() == 0) {
return "sqlMapClient";
} else {
return "sqlMapClient-" + section.name;
}
}