@Test @Transactional public void testSaveOnmsMap2() { OnmsMap map = new OnmsMap("onmsMapDaoHibernateTestMap2", "admin",969,726); m_onmsMapDao.save(map); m_onmsMapDao.flush(); m_onmsMapDao.clear(); OnmsMap map2 = m_onmsMapDao.findMapById(map.getId()); assertNotSame(map, map2); assertEquals(map.getName(), map2.getName()); assertEquals(map.getOwner(), map2.getOwner()); assertEquals(map.getType(), OnmsMap.USER_GENERATED_MAP); assertEquals(map.getAccessMode().trim(), map2.getAccessMode().trim()); assertEquals(map.getUserLastModifies(), map2.getUserLastModifies()); assertEquals(map.getLastModifiedTime(), map2.getLastModifiedTime()); assertEquals(map.getCreateTime(), map2.getCreateTime()); assertEquals(map.getWidth(), map2.getWidth()); assertEquals(map.getHeight(), map2.getHeight()); }
public OnmsMap findMapById(int id) { return findUnique("from OnmsMap as map where map.id = ?", id); }
OnmsMapDaoHibernate extends AbstractDaoHibernate<OnmsMap, Integer> implements OnmsMapDao { public OnmsMap findMapById(int id) { return findUnique("from OnmsMap as map where map.id = ?", id); } }
OnmsMapDaoHibernate extends AbstractDaoHibernate<OnmsMap, Integer> implements OnmsMapDao { public OnmsMap findMapById(int id) { return findUnique("from OnmsMap as map where map.id = ?", id); } OnmsMapDaoHibernate(); }
OnmsMapDaoHibernate extends AbstractDaoHibernate<OnmsMap, Integer> implements OnmsMapDao { public OnmsMap findMapById(int id) { return findUnique("from OnmsMap as map where map.id = ?", id); } OnmsMapDaoHibernate(); @SuppressWarnings("unchecked") Collection<OnmsMap> findAll(final Integer offset, final Integer limit); Collection<OnmsMap> findMapsLike(String mapLabel); Collection<OnmsMap> findMapsByName(String mapLabel); OnmsMap findMapById(int id); Collection<OnmsMap> findMapsByNameAndType(String mapName, String mapType); Collection<OnmsMap> findMapsByType(String mapType); Collection<OnmsMap> findAutoMaps(); Collection<OnmsMap> findUserMaps(); Collection<OnmsMap> findSaveMaps(); Collection<OnmsMap> findMapsByGroup(String group); Collection<OnmsMap> findMapsByOwner(String owner); Collection<OnmsMap> findVisibleMapsByGroup(String group); Collection<OnmsMap> findAutoAndSaveMaps(); int updateAllAutomatedMap(final Date time); }
OnmsMapDaoHibernate extends AbstractDaoHibernate<OnmsMap, Integer> implements OnmsMapDao { public OnmsMap findMapById(int id) { return findUnique("from OnmsMap as map where map.id = ?", id); } OnmsMapDaoHibernate(); @SuppressWarnings("unchecked") Collection<OnmsMap> findAll(final Integer offset, final Integer limit); Collection<OnmsMap> findMapsLike(String mapLabel); Collection<OnmsMap> findMapsByName(String mapLabel); OnmsMap findMapById(int id); Collection<OnmsMap> findMapsByNameAndType(String mapName, String mapType); Collection<OnmsMap> findMapsByType(String mapType); Collection<OnmsMap> findAutoMaps(); Collection<OnmsMap> findUserMaps(); Collection<OnmsMap> findSaveMaps(); Collection<OnmsMap> findMapsByGroup(String group); Collection<OnmsMap> findMapsByOwner(String owner); Collection<OnmsMap> findVisibleMapsByGroup(String group); Collection<OnmsMap> findAutoAndSaveMaps(); int updateAllAutomatedMap(final Date time);  }