@Override public Event findById(Long id) { Event event = repository.findOne(id); if (event == null) { throw new EventNotFoundException("Could not find Event with ID [" + id + "]"); } return event; }
@PreAuthorize("hasRole('ROLE_ADMIN')") @Transactional(readOnly = false) @Override public void deleteById(Long id) { repository.delete(id); }
@PreAuthorize("hasRole('ROLE_ADMIN')") @Transactional(readOnly = false) @Override public Event save(Event event) { return repository.save(event); }
@Override public List<Event> findAll() { return repository.findAll(); }