it.eng.spagobi.events.dao
Class EventDAOHibImpl

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.events.dao.EventDAOHibImpl
All Implemented Interfaces:
IEventDAO

public class EventDAOHibImpl
extends AbstractHibernateDAO
implements IEventDAO

Author:
Gioia

Constructor Summary
EventDAOHibImpl()
           
 
Method Summary
 Event loadEvent(java.lang.Integer eventId, java.lang.String user)
          Loads all detail information for a Event identified by its eventId and its user.
 java.util.List loadEvents(java.lang.String user)
          Loads a list of all events registered by the specified user.
 java.lang.Integer registerEvent(java.lang.String user)
          Register a new Event.
 void unregisterEvent(Event event)
          Unregister an event.
 void unregisterEvent(java.lang.Integer id, java.lang.String user)
          Unregister an event.
 void unregisterEvents(java.lang.String user)
          Unregiste all the events registered by the specificated user.
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
getSession, logException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventDAOHibImpl

public EventDAOHibImpl()
Method Detail

loadEvent

public Event loadEvent(java.lang.Integer eventId,
                       java.lang.String user)
                throws it.eng.spago.error.EMFUserError
Description copied from interface: IEventDAO
Loads all detail information for a Event identified by its eventId and its user. All these information, achived by a query to the DB, are stored into a Event object, which is returned.

Specified by:
loadEvent in interface IEventDAO
Parameters:
eventId - The id for the Event to load
user - The user that has registered the event
Returns:
A Event object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadEvents

public java.util.List loadEvents(java.lang.String user)
                          throws it.eng.spago.error.EMFUserError
Description copied from interface: IEventDAO
Loads a list of all events registered by the specified user.

Specified by:
loadEvents in interface IEventDAO
Parameters:
user - The user that has registered the events
Returns:
A List of Event containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

registerEvent

public java.lang.Integer registerEvent(java.lang.String user)
                                throws it.eng.spago.error.EMFUserError
Description copied from interface: IEventDAO
Register a new Event. Return the the newly created event unique identifier

Specified by:
registerEvent in interface IEventDAO
Parameters:
user - The user who want to register a new event
Returns:
the newly created event unique identifier
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

unregisterEvent

public void unregisterEvent(java.lang.Integer id,
                            java.lang.String user)
                     throws it.eng.spago.error.EMFUserError
Description copied from interface: IEventDAO
Unregister an event.

Specified by:
unregisterEvent in interface IEventDAO
Parameters:
id - The id for the Event to load
user - The user that has registered the event
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

unregisterEvent

public void unregisterEvent(Event event)
                     throws it.eng.spago.error.EMFUserError
Description copied from interface: IEventDAO
Unregister an event. Equals to

unregisterEvent(event.getEventId(), event.getUser())

Specified by:
unregisterEvent in interface IEventDAO
Parameters:
event - The object containing all delete information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

unregisterEvents

public void unregisterEvents(java.lang.String user)
                      throws it.eng.spago.error.EMFUserError
Description copied from interface: IEventDAO
Unregiste all the events registered by the specificated user.

Specified by:
unregisterEvents in interface IEventDAO
Parameters:
user - The user that has registered the events
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred