@Test @Transactional public void dwoTestGetNodeId(){ Integer nodeId = m_nodeLinkService.getNodeId(END_POINT1_LABEL); assertNotNull(nodeId); assertEquals(END_POINT1_ID, nodeId.intValue()); }
@Transactional(readOnly=true) public Integer getNodeId(String endPoint) { if (endPoint == null){ return null; } Collection<OnmsNode> nodes = m_nodeDao.findByLabel(endPoint); if(nodes.size() > 0){ return nodes.iterator().next().getId(); } return null; }
DefaultNodeLinkService implements NodeLinkService, InitializingBean { @Transactional(readOnly=true) public Integer getNodeId(String endPoint) { if (endPoint == null){ return null; } Collection<OnmsNode> nodes = m_nodeDao.findByLabel(endPoint); if(nodes.size() > 0){ return nodes.iterator().next().getId(); } return null; } }
DefaultNodeLinkService implements NodeLinkService, InitializingBean { @Transactional(readOnly=true) public Integer getNodeId(String endPoint) { if (endPoint == null){ return null; } Collection<OnmsNode> nodes = m_nodeDao.findByLabel(endPoint); if(nodes.size() > 0){ return nodes.iterator().next().getId(); } return null; }  }
DefaultNodeLinkService implements NodeLinkService, InitializingBean { @Transactional(readOnly=true) public Integer getNodeId(String endPoint) { if (endPoint == null){ return null; } Collection<OnmsNode> nodes = m_nodeDao.findByLabel(endPoint); if(nodes.size() > 0){ return nodes.iterator().next().getId(); } return null; }  @Override void afterPropertiesSet(); @Transactional void saveLinkState(OnmsLinkState state); @Transactional void createLink(final int nodeParentId, final int nodeId); @Transactional(readOnly=true) Integer getNodeId(String endPoint); @Transactional(readOnly=true) String getNodeLabel(int nodeId); @Transactional(readOnly=true) Collection<DataLinkInterface> getLinkContainingNodeId(int nodeId); @Transactional(readOnly=true) OnmsLinkState getLinkStateForInterface(DataLinkInterface dataLinkInterface); @Transactional void updateLinkStatus(int nodeParentId, int nodeId, String status); @Transactional(readOnly=true) String getPrimaryAddress(int nodeId); @Transactional(readOnly=true) boolean nodeHasEndPointService(int nodeId); @Transactional(readOnly=true) Boolean getEndPointStatus(int nodeId); }
DefaultNodeLinkService implements NodeLinkService, InitializingBean { @Transactional(readOnly=true) public Integer getNodeId(String endPoint) { if (endPoint == null){ return null; } Collection<OnmsNode> nodes = m_nodeDao.findByLabel(endPoint); if(nodes.size() > 0){ return nodes.iterator().next().getId(); } return null; }  @Override void afterPropertiesSet(); @Transactional void saveLinkState(OnmsLinkState state); @Transactional void createLink(final int nodeParentId, final int nodeId); @Transactional(readOnly=true) Integer getNodeId(String endPoint); @Transactional(readOnly=true) String getNodeLabel(int nodeId); @Transactional(readOnly=true) Collection<DataLinkInterface> getLinkContainingNodeId(int nodeId); @Transactional(readOnly=true) OnmsLinkState getLinkStateForInterface(DataLinkInterface dataLinkInterface); @Transactional void updateLinkStatus(int nodeParentId, int nodeId, String status); @Transactional(readOnly=true) String getPrimaryAddress(int nodeId); @Transactional(readOnly=true) boolean nodeHasEndPointService(int nodeId); @Transactional(readOnly=true) Boolean getEndPointStatus(int nodeId);  }