this.validationEnabled = validationEnabled;
}
private DaoContext parseContext(Element contextElement, StandardDaoManager daoManager)
throws DaoException {
DaoContext daoContext = new DaoContext();
daoContext.setDaoManager(daoManager);
String id = contextElement.getAttribute("id");
if (id != null && id.length() > 0) {
daoContext.setId(id);
}
NodeList children = contextElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE) {
if (TRANS_MGR_ELEMENT.equals(child.getNodeName())) {
DaoTransactionManager txMgr = parseTransactionManager((Element) child);
daoContext.setTransactionManager(txMgr);
} else if (DAO_ELEMENT.equals(child.getNodeName())) {
DaoImpl daoImpl = parseDao((Element) child, daoManager, daoContext);
daoContext.addDao(daoImpl);
}
}
}
return daoContext;