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
    Constructor
    Description
    Instantiates a new participant DAO.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clear the storage.
    int
    Deprecated.
    Find call participants.
    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.
    int
    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.
    int
    markParticipantDeclinedNotified(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.
    int
    markParticipantMissed(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.
    int
    markParticipantMissedAtStop(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.
    int
    Update Participant state by call id

    Methods inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl

    count, create, createAll, delete, deleteAll, deleteAll, find, findAll, getEntityManager, getHibernateDialect, isMSSQLDialect, isOrcaleDialect, update, updateAll

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 exception
      IllegalStateException - the illegal state exception
      IllegalArgumentException - 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 exception
      IllegalStateException - the illegal state exception
      IllegalArgumentException - the illegal argument exception
    • updateParticipantStateByCallId

      public int updateParticipantStateByCallId(String state, String callId)
      Update Participant state by call id
      Parameters:
      state -
      Returns:
      Number of updated participants
    • markParticipantMissed

      public int markParticipantMissed(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.
      Parameters:
      callId - the call id
      partId - the participant id
      latestStart - the latest start date of the call the participant may have missed
      Returns:
      the number of updated participants, 1 or 0
    • markParticipantMissedAtStop

      public int markParticipantMissedAtStop(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.
      Parameters:
      callId - the call id
      partId - the participant id
      latestStart - the latest start date of the call the participant may be marked for
      Returns:
      the number of updated participants, 1 or 0
    • findDeclinedParticipantIds

      public List<String> 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.
      Parameters:
      callId - the call id
      Returns:
      the participant ids
    • markParticipantDeclined

      public int markParticipantDeclined(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.
      Parameters:
      callId - the call id
      partId - the participant id
      Returns:
      the number of updated participants, 1 or 0
    • markParticipantDeclinedNotified

      public int markParticipantDeclinedNotified(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.
      Parameters:
      callId - the call id
      partId - the participant id
      latestStart - 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.