text
stringlengths 0
2.2M
|
---|
cnode.readTimeout = CastUtil::toFloat(nodes.at(ncc).getText());
|
} catch(const std::exception& e) {
|
}
|
}
|
else if(nodes.at(ncc).getTagName()=="connectionTimeout")
|
{
|
try {
|
cnode.connectionTimeout = CastUtil::toFloat(nodes.at(ncc).getText());
|
} catch(const std::exception& e) {
|
}
|
}
|
else if(nodes.at(ncc).getTagName()=="dsn")
|
{
|
cnode.dsn = nodes.at(ncc).getText();
|
}
|
else if(nodes.at(ncc).getTagName()=="databaseName")
|
{
|
cnode.databaseName = nodes.at(ncc).getText();
|
}
|
}
|
cprops.addNode(cnode);
|
}
|
}
|
else if(confs.at(cns).getTagName()=="pool-size")
|
{
|
if(confs.at(cns).getText()!="")
|
{
|
try {
|
psize = CastUtil::toInt(confs.at(cns).getText());
|
} catch(const std::exception& e) {
|
}
|
}
|
cprops.poolWriteSize = isSinglEVH?1:psize;
|
}
|
else if(confs.at(cns).getTagName()=="name")
|
{
|
cprops.name = confs.at(cns).getText();
|
}
|
else if(confs.at(cns).getTagName()=="type")
|
{
|
cprops.type = confs.at(cns).getText();
|
}
|
else
|
{
|
cprops.addProperty(confs.at(cns).getTagName(), confs.at(cns).getText());
|
}
|
}
|
}
|
else if(dbeles.at(dbs).getTagName()=="tables")
|
{
|
ElementList tabs = dbeles.at(dbs).getChildElements();
|
for (unsigned int dn = 0; dn < tabs.size(); dn++)
|
{
|
if(tabs.at(dn).getTagName()=="table")
|
{
|
DataSourceEntityMapping dsempg;
|
dsempg.tableName = tabs.at(dn).getAttribute("name");
|
dsempg.className = tabs.at(dn).getAttribute("class");
|
ElementList cols = tabs.at(dn).getChildElements();
|
for (unsigned int cn = 0; cn < cols.size(); cn++)
|
{
|
if(cols.at(cn).getTagName()=="hasOne")
|
{
|
DataSourceInternalRelation relation;
|
relation.clsName = cols.at(cn).getText();
|
relation.type = 1;
|
relation.dfk = cols.at(cn).getAttribute("dfk");
|
relation.dmappedBy = cols.at(cn).getAttribute("dmappedBy");
|
relation.field = cols.at(cn).getAttribute("field");
|
dsempg.addRelation(relation);
|
}
|
else if(cols.at(cn).getTagName()=="hasMany")
|
{
|
DataSourceInternalRelation relation;
|
relation.clsName = cols.at(cn).getText();
|
relation.type = 2;
|
relation.dfk = cols.at(cn).getAttribute("dfk");
|
relation.dmappedBy = cols.at(cn).getAttribute("dmappedBy");
|
relation.field = cols.at(cn).getAttribute("field");
|
dsempg.addRelation(relation);
|
}
|
else if(cols.at(cn).getTagName()=="col")
|
{
|
dsempg.addPropertyColumnMapping(cols.at(cn).getAttribute("obf"),
|
cols.at(cn).getAttribute("dbf"));
|
}
|
}
|
mapping.addDataSourceEntityMapping(dsempg);
|
}
|
}
|
}
|
}
|
StringUtil::trim(cprops.name);
|
if(cprops.name == "")
|
{
|
logger << "Data Source Name not defined, skipping.... " << std::endl;
|
continue;
|
}
|
allProps[cprops.name] = cprops;
|
allMapps[cprops.name] = mapping;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.