Class ParticipantDAO
java.lang.Object
org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<ParticipantEntity, ParticipantId>
org.exoplatform.webconferencing.dao.ParticipantDAO
- All Implemented Interfaces:
org.exoplatform.commons.api.persistence.GenericDAO<ParticipantEntity, ParticipantId>
public class ParticipantDAO
extends org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<ParticipantEntity, ParticipantId>
Created by The eXo Platform SAS.
- Version:
- $Id: ParticipantDAO.java 00000 Dec 22, 2017 pnedonosko $
- Author:
- Peter Nedonosko
-
Field Summary
Fields inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl
modelClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the storage.intdeleteCallParts(String callId) Deprecated.findCallParts(String callId) Find call participants.findDeclinedParticipantIds(String callId) Finds the user participants of a call who declined it and whose caller was not notified yet, as stored: the ids are read from the database, whatever the participants this storage already loaded.intmarkParticipantDeclined(String callId, String partId) Marks a participant still invited to a call as having declined it, only while the call is still started: a participant who joined, missed the call or was already marked, or a call stopped meanwhile, leaves the participant unchanged.intmarkParticipantDeclinedNotified(String callId, String partId, Date latestStart) Marks a participant who declined a call as notified of the decline, only while still declined and the call from a start not later than the given date, whatever its state: a call started again has its participants alerted again.intmarkParticipantMissed(String callId, String partId, Date latestStart) Marks a call participant as having missed the call, only while the participant is still invited and the call still started, from a start not later than the given date: among concurrent writers (several cluster nodes, a join or a decline committed meanwhile, the call stopped or started again), the participant is marked at most once, and never for a start of the call later than the given date.intmarkParticipantMissedAtStop(String callId, String partId, Date latestStart) Marks a participant still invited to a stopped call as missed, only while the call is still stopped, from a start not later than the given date: a call started again has its participants alerted again.intupdateParticipantStateByCallId(String state, String callId) Update Participant state by call idMethods inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl
count, create, createAll, delete, deleteAll, deleteAll, find, findAll, getEntityManager, getHibernateDialect, isMSSQLDialect, isOrcaleDialect, update, updateAll
-
Constructor Details
-
ParticipantDAO
public ParticipantDAO()Instantiates a new participant DAO.
-
-
Method Details
-
findCallParts
public List<ParticipantEntity> findCallParts(String callId) throws jakarta.persistence.PersistenceException, IllegalStateException, IllegalArgumentException Find call participants.- Parameters:
callId- the call id- Returns:
- the list
- Throws:
jakarta.persistence.PersistenceException- the persistence exceptionIllegalStateException- the illegal state exceptionIllegalArgumentException- the illegal argument exception
-
deleteCallParts
@Deprecated public int deleteCallParts(String callId) throws jakarta.persistence.PersistenceException, IllegalStateException, IllegalArgumentException Deprecated.Delete call participants.- Parameters:
callId- the call id- Returns:
- the int
- Throws:
jakarta.persistence.PersistenceException- the persistence exceptionIllegalStateException- the illegal state exceptionIllegalArgumentException- the illegal argument exception
-
updateParticipantStateByCallId
-
markParticipantMissed
Marks a call participant as having missed the call, only while the participant is still invited and the call still started, from a start not later than the given date: among concurrent writers (several cluster nodes, a join or a decline committed meanwhile, the call stopped or started again), the participant is marked at most once, and never for a start of the call later than the given date.- Parameters:
callId- the call idpartId- the participant idlatestStart- the latest start date of the call the participant may have missed- Returns:
- the number of updated participants, 1 or 0
-
markParticipantMissedAtStop
Marks a participant still invited to a stopped call as missed, only while the call is still stopped, from a start not later than the given date: a call started again has its participants alerted again.- Parameters:
callId- the call idpartId- the participant idlatestStart- the latest start date of the call the participant may be marked for- Returns:
- the number of updated participants, 1 or 0
-
findDeclinedParticipantIds
Finds the user participants of a call who declined it and whose caller was not notified yet, as stored: the ids are read from the database, whatever the participants this storage already loaded.- Parameters:
callId- the call id- Returns:
- the participant ids
-
markParticipantDeclined
Marks a participant still invited to a call as having declined it, only while the call is still started: a participant who joined, missed the call or was already marked, or a call stopped meanwhile, leaves the participant unchanged.- Parameters:
callId- the call idpartId- the participant id- Returns:
- the number of updated participants, 1 or 0
-
markParticipantDeclinedNotified
Marks a participant who declined a call as notified of the decline, only while still declined and the call from a start not later than the given date, whatever its state: a call started again has its participants alerted again.- Parameters:
callId- the call idpartId- the participant idlatestStart- the latest start date of the call the participant may be marked for- Returns:
- the number of updated participants, 1 or 0
-
clear
public void clear()Clear the storage.
-