use of org.opennms.netmgt.mock.MockPathOutage in project opennms by OpenNMS.
the class MockDatabase method populate.
public void populate(MockNetwork network) {
MockVisitor dbCreater = new MockVisitorAdapter() {
@Override
public void visitNode(MockNode node) {
writeNode(node);
}
@Override
public void visitInterface(MockInterface iface) {
writeInterface(iface);
}
@Override
public void visitService(MockService svc) {
writeService(svc);
}
@Override
public void visitPathOutage(MockPathOutage out) {
writePathOutage(out);
}
};
network.visit(dbCreater);
getJdbcTemplate().queryForObject("SELECT setval('nodeNxtId', max(nodeid)) FROM node", Integer.class);
}
Aggregations