Categories of event.
{@link EventCategory} is a simple entity, used to easier filtering of information by users.
104105106107108109110111112113114
} validationSuccess = true; Logger logger = Logger.getLogger("EventManager"); try { EventCategory ec = eventAction.getEventCategoryById(ecId); newEvent.setCategory(ec); newShelf.setName(newEvent.getName()); newShelf.setShared(true);
112113114115116117118119120121122
} return event; } public EventCategory getEventCategoryById(long id) { EventCategory ec = null; try { ec = (EventCategory) em.createNamedQuery("event-category").setParameter("id", id).getSingleResult(); } catch (NoResultException nre) { // do nothing }