private com.relteq.sirius.jaxb.Outputs restoreOutputs(Nodes db_node) throws TorqueException { Criteria crit = new Criteria(); crit.add(LinksPeer.NETWORK_ID, db_node.getNetworkId()); crit.add(LinksPeer.BEG_NODE_ID, db_node.getId()); @SuppressWarnings("unchecked") List<Links> db_link_l = LinksPeer.doSelect(crit); com.relteq.sirius.jaxb.Outputs outputs = factory.createOutputs(); for (Links db_link : db_link_l) outputs.getOutput().add(restoreOutput(db_link)); return outputs; }
private com.relteq.sirius.jaxb.Node restoreNode(Nodes db_node) throws TorqueException { com.relteq.sirius.jaxb.Node node = factory.createNode(); node.setId(id2str(db_node.getId())); node.setInSynch(db_node.getInSynch()); NodeType db_nodetype = NodeTypePeer.retrieveByPK(db_node.getId(), db_node.getNetworkId()); node.setType(db_nodetype.getType()); node.setRoadwayMarkers(restoreRoadwayMarkers(db_node)); node.setInputs(restoreInputs(db_node)); node.setOutputs(restoreOutputs(db_node)); node.setPosition(restorePosition(db_node.getGeom())); return node; }
private com.relteq.sirius.jaxb.RoadwayMarkers restoreRoadwayMarkers(Nodes db_node) throws TorqueException { @SuppressWarnings("unchecked") List<NodeName> db_nname_l = db_node.getNodeNames(); @SuppressWarnings("unchecked") List<Postmiles> db_postmile_l = db_node.getPostmiless(); if (db_nname_l.isEmpty() && db_postmile_l.isEmpty()) return null; com.relteq.sirius.jaxb.RoadwayMarkers markers = factory.createRoadwayMarkers(); for (NodeName db_nname : db_nname_l) { com.relteq.sirius.jaxb.Marker marker = factory.createMarker(); marker.setName(db_nname.getName()); markers.getMarker().add(marker); } for (Postmiles db_postmile : db_postmile_l) { com.relteq.sirius.jaxb.Marker marker = factory.createMarker(); marker.setName(db_postmile.getPostmileHighways().getHighwayName()); marker.setPostmile(db_postmile.getPostmile()); markers.getMarker().add(marker); } return markers; }