Class EventStorage

java.lang.Object
io.meeds.gamification.storage.EventStorage

public class EventStorage extends Object
  • Constructor Details

    • EventStorage

      public EventStorage(EventDAO eventDAO)
  • Method Details

    • findEventsByFilter

      public List<EventDTO> findEventsByFilter(EventFilter eventFilter, int offset, int limit)
      Get all gamification events by filter
      Parameters:
      eventFilter - EventFilter used to filter events
      offset - Offset of result
      limit - Limit of result
      Returns:
      List of EventDTO
    • countEventsByFilter

      public int countEventsByFilter(EventFilter eventFilter)
      Count gamification events by filter
      Parameters:
      eventFilter - EventFilter used to filter events
      Returns:
      count events by filter
    • getEventByTitleAndTrigger

      public EventDTO getEventByTitleAndTrigger(String title, String trigger)
      Get gamification event by event title and trigger name
      Parameters:
      title - event title
      trigger - trigger name
      Returns:
      EventDTO
    • getEventByTypeAndTitle

      public EventDTO getEventByTypeAndTitle(String type, String title)
      Get gamification event by event title and trigger name
      Parameters:
      type - event type
      title - event title
      Returns:
      EventDTO
    • getEventsByTitle

      public List<EventDTO> getEventsByTitle(String title, int offset, int limit)
    • saveEvent

      public EventDTO saveEvent(EventDTO eventDTO)
      save Event
      Parameters:
      eventDTO - EventDTO to create
    • getEventById

      public EventDTO getEventById(long eventId)
      Retrieves gamification event by event id
      Parameters:
      eventId - Event Identifier
      Returns:
      EventDTO
    • deleteEventById

      public EventDTO deleteEventById(long eventId) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Deletes event by id
      Parameters:
      eventId - Event Identifier
      Returns:
      EventDTO
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException