@Test @JUnitTemporaryDatabase public void testFindById() throws Exception { int id = 64; DataLinkInterface dli = m_dataLinkInterfaceDao.findById(id); if (dli == null) { List<DataLinkInterface> dlis = m_dataLinkInterfaceDao.findAll(); StringBuffer ids = new StringBuffer(); for (DataLinkInterface current : dlis) { if (ids.length() > 0) { ids.append(", "); } ids.append(current.getId()); } fail("No DataLinkInterface record with ID " + id + " was found, the only IDs are: " + ids.toString()); } assertNotNull(dli); assertEquals(m_databasePopulator.getNode1().getId(), dli.getNode().getId()); assertEquals(Integer.valueOf(1), dli.getIfIndex()); assertEquals(dli.getSource(), "linkd"); }
public DataLinkInterface findById(final Integer id) { return findUnique("from DataLinkInterface as dli where dli.id = ?", id); }
DataLinkInterfaceDaoHibernate extends AbstractDaoHibernate<DataLinkInterface, Integer> implements DataLinkInterfaceDao { public DataLinkInterface findById(final Integer id) { return findUnique("from DataLinkInterface as dli where dli.id = ?", id); } }
DataLinkInterfaceDaoHibernate extends AbstractDaoHibernate<DataLinkInterface, Integer> implements DataLinkInterfaceDao { public DataLinkInterface findById(final Integer id) { return findUnique("from DataLinkInterface as dli where dli.id = ?", id); } DataLinkInterfaceDaoHibernate(); }
DataLinkInterfaceDaoHibernate extends AbstractDaoHibernate<DataLinkInterface, Integer> implements DataLinkInterfaceDao { public DataLinkInterface findById(final Integer id) { return findUnique("from DataLinkInterface as dli where dli.id = ?", id); } DataLinkInterfaceDaoHibernate(); @SuppressWarnings("unchecked") Collection<DataLinkInterface> findAll(final Integer offset, final Integer limit); DataLinkInterface findById(final Integer id); Collection<DataLinkInterface> findByNodeId(final Integer nodeId); Collection<DataLinkInterface> findByNodeParentId(final Integer nodeParentId); DataLinkInterface findByNodeIdAndIfIndex(final Integer nodeId, final Integer ifIndex); @Override void markDeletedIfNodeDeleted(); @Override void deactivateIfOlderThan(final Timestamp scanTime, String source); @Override void deleteIfOlderThan(final Timestamp scanTime, String source); @Override void setStatusForNode(final Integer nodeid, final Character action); @Override void setStatusForNode(final Integer nodeid, String source, final Character action); @Override void setStatusForNodeAndIfIndex(final Integer nodeid, final Integer ifIndex, final Character action); @Override void setStatusForNodeAndIfIndex(final Integer nodeid, final Integer ifIndex, String source, final Character action); }
DataLinkInterfaceDaoHibernate extends AbstractDaoHibernate<DataLinkInterface, Integer> implements DataLinkInterfaceDao { public DataLinkInterface findById(final Integer id) { return findUnique("from DataLinkInterface as dli where dli.id = ?", id); } DataLinkInterfaceDaoHibernate(); @SuppressWarnings("unchecked") Collection<DataLinkInterface> findAll(final Integer offset, final Integer limit); DataLinkInterface findById(final Integer id); Collection<DataLinkInterface> findByNodeId(final Integer nodeId); Collection<DataLinkInterface> findByNodeParentId(final Integer nodeParentId); DataLinkInterface findByNodeIdAndIfIndex(final Integer nodeId, final Integer ifIndex); @Override void markDeletedIfNodeDeleted(); @Override void deactivateIfOlderThan(final Timestamp scanTime, String source); @Override void deleteIfOlderThan(final Timestamp scanTime, String source); @Override void setStatusForNode(final Integer nodeid, final Character action); @Override void setStatusForNode(final Integer nodeid, String source, final Character action); @Override void setStatusForNodeAndIfIndex(final Integer nodeid, final Integer ifIndex, final Character action); @Override void setStatusForNodeAndIfIndex(final Integer nodeid, final Integer ifIndex, String source, final Character action);  }