Commits

Anonymous committed 144f050

Added a delete-by-key to OnmsDao.

Comments (0)

Files changed (2)

opennms-dao/src/main/java/org/opennms/netmgt/dao/OnmsDao.java

     void delete(T entity);
 
     /**
+     * <p>delete</p>
+     *
+     * @param key a K object.
+     */
+    void delete(K key);
+
+    /**
      * <p>findAll</p>
      *
      * @return a {@link java.util.List} object.

opennms-dao/src/main/java/org/opennms/netmgt/dao/hibernate/AbstractDaoHibernate.java

     }
     
     /**
+     * <p>delete</p>
+     *
+     * @param key a K object.
+     * @throws org.springframework.dao.DataAccessException if any.
+     */
+    public void delete(final K key) throws DataAccessException {
+        delete(get(key));
+    }
+    
+    /**
      * <p>deleteAll</p>
      *
      * @param entities a {@link java.util.Collection} object.