@Test @Transactional public void testSaveDataLinkInterface() { DataLinkInterface dli = new DataLinkInterface(m_databasePopulator.getNode2(), 2, m_databasePopulator.getNode1().getId(), 1, "?", new Date()); dli.setLinkTypeId(101); m_dataLinkInterfaceDao.save(dli); m_dataLinkInterfaceDao.flush(); assertNotNull(m_dataLinkInterfaceDao.get(dli.getId())); DataLinkInterface dli2 = m_dataLinkInterfaceDao.findById(dli.getId()); assertSame(dli, dli2); assertEquals(dli.getId(), dli2.getId()); assertEquals(dli.getNode().getId(), dli2.getNode().getId()); assertEquals(dli.getIfIndex(), dli2.getIfIndex()); assertEquals(dli.getNodeParentId(), dli2.getNodeParentId()); assertEquals(dli.getParentIfIndex(), dli2.getParentIfIndex()); assertEquals(dli.getStatus(), dli2.getStatus()); assertEquals(dli.getLinkTypeId(), dli2.getLinkTypeId()); assertEquals(dli.getLastPollTime(), dli2.getLastPollTime()); 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);  }