@Test @Transactional public void testFindMapsByNameAndTypeKo() { Collection<OnmsMap> maps = m_onmsMapDao.findMapsByNameAndType("DB_Pop_Test_Map",OnmsMap.AUTOMATICALLY_GENERATED_MAP); assertEquals(0, maps.size()); }
public Collection<OnmsMap> findMapsByNameAndType(String mapName, String mapType) { Object[] values = {mapName, mapType}; return find("from OnmsMap as map where map.name = ? and map.type = ?", values); }
OnmsMapDaoHibernate extends AbstractDaoHibernate<OnmsMap, Integer> implements OnmsMapDao { public Collection<OnmsMap> findMapsByNameAndType(String mapName, String mapType) { Object[] values = {mapName, mapType}; return find("from OnmsMap as map where map.name = ? and map.type = ?", values); } }
OnmsMapDaoHibernate extends AbstractDaoHibernate<OnmsMap, Integer> implements OnmsMapDao { public Collection<OnmsMap> findMapsByNameAndType(String mapName, String mapType) { Object[] values = {mapName, mapType}; return find("from OnmsMap as map where map.name = ? and map.type = ?", values); } OnmsMapDaoHibernate(); }
OnmsMapDaoHibernate extends AbstractDaoHibernate<OnmsMap, Integer> implements OnmsMapDao { public Collection<OnmsMap> findMapsByNameAndType(String mapName, String mapType) { Object[] values = {mapName, mapType}; return find("from OnmsMap as map where map.name = ? and map.type = ?", values); } 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> findMapsByNameAndType(String mapName, String mapType) { Object[] values = {mapName, mapType}; return find("from OnmsMap as map where map.name = ? and map.type = ?", values); } 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);  }