84858687888990919293
public User updateUser(User user) throws PhotoAlbumException { try { em.merge(user); em.flush(); } catch (Exception e) { throw new PhotoAlbumException(e.getMessage()); } userBean.refreshUser(); return userBean.getUser(); }
4849505152535455
public void addEvent(Event event) throws PhotoAlbumException { try { em.persist(event); em.flush(); } catch (Exception e) { throw new PhotoAlbumException(e.getMessage()); } }
6364656667686970
public void deleteEvent(Event event) throws PhotoAlbumException { try { em.remove(em.merge(event)); em.flush(); } catch (Exception e) { throw new PhotoAlbumException(e.getMessage()); } }
7879808182838485
public void editEvent(Event event) throws PhotoAlbumException { try { em.merge(event); em.flush(); } catch (Exception e) { throw new PhotoAlbumException(e.getMessage()); } }