コード例 #1
0
 @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;
 }
コード例 #2
0
 @PreAuthorize("hasRole('ROLE_ADMIN')")
 @Transactional(readOnly = false)
 @Override
 public void deleteById(Long id) {
   repository.delete(id);
 }
コード例 #3
0
 @PreAuthorize("hasRole('ROLE_ADMIN')")
 @Transactional(readOnly = false)
 @Override
 public Event save(Event event) {
   return repository.save(event);
 }
コード例 #4
0
 @Override
 public List<Event> findAll() {
   return repository.findAll();
 }