public void deleteWorkout(final Long id, final User user) throws WorkoutNotFoundException, AccessDeniedException { final Workout workout = fetchWorkout(id, user, true); separatePrivateMessagesFromWorkout(id); deletePublicMessageAboutWorkout(id); entityManager.remove(workout); }
public void deleteTrack(final User user, final Long id) throws TrackNotFoundException, AccessDeniedException { entityManager.remove(fetchTrackForUpdate(user, id.longValue())); }