@Test @Transactional public void testFindMapByOwner() { Collection<OnmsMap> maps = m_onmsMapDao.findMapsByOwner("admin"); assertEquals(1, maps.size()); OnmsMap map = maps.iterator().next(); assertEquals("DB_Pop_Test_Map", map.getName()); assertEquals("fake_background.jpg", map.getBackground()); assertEquals(OnmsMap.ACCESS_MODE_ADMIN, map.getAccessMode()); assertEquals(OnmsMap.USER_GENERATED_MAP, map.getType()); }
public Collection<OnmsMap> findMapsByOwner(String owner) { return find("from OnmsMap as map where map.owner = ?", owner); }
OnmsMapDaoHibernate extends AbstractDaoHibernate<OnmsMap, Integer> implements OnmsMapDao { public Collection<OnmsMap> findMapsByOwner(String owner) { return find("from OnmsMap as map where map.owner = ?", owner); } }
OnmsMapDaoHibernate extends AbstractDaoHibernate<OnmsMap, Integer> implements OnmsMapDao { public Collection<OnmsMap> findMapsByOwner(String owner) { return find("from OnmsMap as map where map.owner = ?", owner); } OnmsMapDaoHibernate(); }
OnmsMapDaoHibernate extends AbstractDaoHibernate<OnmsMap, Integer> implements OnmsMapDao { public Collection<OnmsMap> findMapsByOwner(String owner) { return find("from OnmsMap as map where map.owner = ?", owner); } 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 Collection<OnmsMap> findMapsByOwner(String owner) { return find("from OnmsMap as map where map.owner = ?", owner); } 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);  }