Class EventAttendeeDAO
java.lang.Object
org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<EventAttendeeEntity, Long>
org.exoplatform.agenda.dao.EventAttendeeDAO
- All Implemented Interfaces:
org.exoplatform.commons.api.persistence.GenericDAO<EventAttendeeEntity, Long>
public class EventAttendeeDAO
extends org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<EventAttendeeEntity, Long>
-
Field Summary
Fields inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl
modelClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(EventAttendeeEntity entity) Deletes an attendee row and sends the delete at once.voiddeleteCalendarAttendees(long calendarId) voiddeleteEventAttendees(long eventId) getEventAttendees(long eventId) getEventAttendees(long eventId, long identityId) getEventAttendeesByResponses(long eventId, org.exoplatform.agenda.constant.EventAttendeeResponse... responses) getSeatRows(long eventId, org.exoplatform.agenda.constant.EventAttendeeResponse... responses) Reads the rows of an event that have one of the given answers, as scalar values: no entity is loaded, so the rows a seat decision counts do not enter the persistence context it writes through.getWaitingAttendees(long eventId) Reads the waiting rows of an event in the order they are promoted: the earliest answer date first, then the lowest id.Methods inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl
count, create, createAll, deleteAll, deleteAll, find, findAll, getEntityManager, getHibernateDialect, isMSSQLDialect, isOrcaleDialect, update, updateAll
-
Constructor Details
-
EventAttendeeDAO
public EventAttendeeDAO()
-
-
Method Details
-
delete
Deletes an attendee row and sends the delete at once. A decide step that replaces an answer deletes a row and inserts one with the same key in its one transaction: without the flush, the insert would reach the database first. On an identity column (MySQL) Hibernate sends the insert when the row is persisted, and on a sequence it sends a flush's inserts before its deletes.- Specified by:
deletein interfaceorg.exoplatform.commons.api.persistence.GenericDAO<EventAttendeeEntity, Long>- Overrides:
deletein classorg.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<EventAttendeeEntity, Long>- Parameters:
entity- the attendee row to delete
-
deleteCalendarAttendees
public void deleteCalendarAttendees(long calendarId) -
deleteEventAttendees
public void deleteEventAttendees(long eventId) -
getEventAttendees
-
getEventAttendeesByResponses
public List<EventAttendeeEntity> getEventAttendeesByResponses(long eventId, org.exoplatform.agenda.constant.EventAttendeeResponse... responses) -
getSeatRows
public List<Object[]> getSeatRows(long eventId, org.exoplatform.agenda.constant.EventAttendeeResponse... responses) Reads the rows of an event that have one of the given answers, as scalar values: no entity is loaded, so the rows a seat decision counts do not enter the persistence context it writes through.- Parameters:
eventId- event identifierresponses- the answers to read- Returns:
- per row: id, identity id, from occurrence id, until occurrence id, answer and answer date, in that order
-
getWaitingAttendees
Reads the waiting rows of an event in the order they are promoted: the earliest answer date first, then the lowest id. Every waiting row is written with its answer date, so none sorts on a null.- Parameters:
eventId- event identifier- Returns:
- the rows as
getSeatRows(long, EventAttendeeResponse...)returns them
-
getEventAttendees
-