Menu

[r2]: / etc / scripts / springScript.js  Maximize  Restore  History

Download this file

49 lines (38 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* 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;
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.