com.mycompany.service.impl
Class EventServiceImpl

java.lang.Object
  extended by com.mycompany.service.impl.AbstractService
      extended by com.mycompany.service.impl.EventServiceImpl
All Implemented Interfaces:
EventService

@Named(value="eventService")
public class EventServiceImpl
extends AbstractService
implements EventService

Event service implementation class.

Author:
Ian Hlavats (ian@tarantulaconsulting.com)

Constructor Summary
EventServiceImpl()
           
 
Method Summary
 java.util.List<Event> findAllEvents()
          Finds all Event objects.
 java.util.List<EventAttendance> findAllEventsAttendanceByUser(User user)
          Finds all EventAttendance objects for a particular User.
 EventAttendance findEventAttendance(Event event, User user)
          Finds the EventAttendance object for a particular Event and User.
 Event findEventById(java.lang.Integer id)
          Finds an Event by ID.
 java.util.List<Event> findEvents(City city, ProvinceState provinceState, EventType eventType, java.lang.String keyword)
          Finds a List of Event objects in a City and ProvinceState for a particular EventType and keyword.
 java.util.List<Event> findUserEvents(java.util.Date start, java.util.Date end, User user)
          Finds a List of Event objects between a start and end date created by a particular User.
 EventAttendance saveAttendance(EventAttendance attendance)
          Saves an EventAttendance object.
 Event saveEvent(Event event)
          Saves an Event.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventServiceImpl

public EventServiceImpl()
Method Detail

findAllEvents

public java.util.List<Event> findAllEvents()
Finds all Event objects.

Specified by:
findAllEvents in interface EventService
Returns:
A List of Event objects.

findAllEventsAttendanceByUser

public java.util.List<EventAttendance> findAllEventsAttendanceByUser(User user)
Finds all EventAttendance objects for a particular User.

Specified by:
findAllEventsAttendanceByUser in interface EventService
Parameters:
user - The User object.
Returns:
A List of EventAttendance objects.

findEventAttendance

public EventAttendance findEventAttendance(Event event,
                                           User user)
Finds the EventAttendance object for a particular Event and User.

Specified by:
findEventAttendance in interface EventService
Parameters:
event - The Event object.
user - The User object.
Returns:
An EventAttendance object.

findEventById

public Event findEventById(java.lang.Integer id)
Finds an Event by ID.

Specified by:
findEventById in interface EventService
Parameters:
id - The Event ID.
Returns:
An Event object.

findUserEvents

public java.util.List<Event> findUserEvents(java.util.Date start,
                                            java.util.Date end,
                                            User user)
Finds a List of Event objects between a start and end date created by a particular User.

Specified by:
findUserEvents in interface EventService
Parameters:
start - The start date.
end - The end date.
user - The User object.
Returns:
A List of Event objects.

saveAttendance

public EventAttendance saveAttendance(EventAttendance attendance)
Saves an EventAttendance object.

Specified by:
saveAttendance in interface EventService
Parameters:
attendance - The EventAttendance object.
Returns:
The saved object.

saveEvent

public Event saveEvent(Event event)
Saves an Event.

Specified by:
saveEvent in interface EventService
Parameters:
event - The Event object.
Returns:
The saved object.

findEvents

public java.util.List<Event> findEvents(City city,
                                        ProvinceState provinceState,
                                        EventType eventType,
                                        java.lang.String keyword)
Finds a List of Event objects in a City and ProvinceState for a particular EventType and keyword.

Specified by:
findEvents in interface EventService
Parameters:
city - The City object.
provinceState - The ProvinceState object.
eventType - The EventType object.
keyword - A keyword.
Returns:
A List of Event objects.