### Question:
OnmsMapElementDaoHibernate extends AbstractDaoHibernate<OnmsMapElement, Integer> implements OnmsMapElementDao { public void deleteElementsByElementIdAndType(final int id,final String type) { getHibernateTemplate().execute(new HibernateCallback<Void>() { public Void doInHibernate(Session session) throws HibernateException, SQLException { String hql = "delete from OnmsMapElement as element where element.elementId = :id and element.type = :type"; Query query = session.createQuery(hql); query.setInteger("id",id); query.setString("type",type); query.executeUpdate(); return null; } }); } OnmsMapElementDaoHibernate(); @SuppressWarnings("unchecked") Collection<OnmsMapElement> findAll(final Integer offset, final Integer limit); OnmsMapElement findElementById(int id); Collection<OnmsMapElement> findElementsByMapId(OnmsMap map); Collection<OnmsMapElement> findElementsByNodeId(int nodeid); void deleteElementsByMapId(final OnmsMap map); void deleteElementsByNodeid(final int nodeid); void deleteElementsByType(final String type); void deleteElementsByElementIdAndType(final int id,final String type); Collection<OnmsMapElement> findElementsByElementIdAndType(
            int elementId, String type); Collection<OnmsMapElement> findElementsByType(String type); OnmsMapElement findElement(int elementId, String type, OnmsMap map); void deleteElementsByMapType(final String mapType); Collection<OnmsMapElement> findElementsByMapIdAndType(int mapId,
            String type); Collection<OnmsMapElement> findMapElementsOnMap(int mapId); Collection<OnmsMapElement> findNodeElementsOnMap(int mapId); int countElementsOnMap(final int mapid);  }### Answer:
@Test @Transactional public void testDeleteElementsByElementIdAndType() { m_onmsMapElementDao.deleteElementsByElementIdAndType(1, OnmsMapElement.NODE_TYPE); assertNull(m_onmsMapElementDao.findElementById(59)); }