@Override public String getNodeLocation() { return getNode().getLocation(); }
public void writeNode(MockNode node) { LOG.info("Inserting node \"{}\" into database with ID {}", node.getLabel(), node.getNodeId()); Object[] values = { node.getLocation(), Integer.valueOf(node.getNodeId()), node.getLabel(), new Timestamp(System.currentTimeMillis()), "A" }; update("insert into node (location, nodeID, nodeLabel, nodeCreateTime, nodeType) values (?, ?, ?, ?, ?);", values); }
public void writeNode(MockNode node) { LOG.info("Inserting node \"{}\" into database with ID {}", node.getLabel(), node.getNodeId()); Object[] values = { node.getLocation(), Integer.valueOf(node.getNodeId()), node.getLabel(), new Timestamp(System.currentTimeMillis()), "A" }; update("insert into node (location, nodeID, nodeLabel, nodeCreateTime, nodeType) values (?, ?, ?, ?, ?);", values); }
@Override public String getNodeLocation(int nodeId) { MockNode node = m_network.getNode(nodeId); return (node == null ? null : node.getLocation()); }