/** * Removes an entity from the database. * * @param entity The entity to remove. */ public void remove(T entity) { preRemove(entity); // TODO check access entityManager.remove(entity); }
/** * Deletes an entity on the database without performing the normal user level access check. Should only be used by * sublcasses in special cases where you know exactly what you are doing. * * @param entity The entity to remove */ protected void removeWithoutAccessCheck(T entity) { preRemove(entity); entityManager.remove(entity); }