Interface SubscriptionDAO

  • All Superinterfaces:
    com.logicaldoc.core.PersistentObjectDAO<Subscription>
    All Known Implementing Classes:
    HibernateSubscriptionDAO

    public interface SubscriptionDAO
    extends com.logicaldoc.core.PersistentObjectDAO<Subscription>
    DAO for Subscriptions handling.
    Since:
    5.0
    Author:
    Matteo Caruso - LogicalDOC
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cleanPendingSubscriptions()
      This method removes all the subscriptions associated to a deleted folder or document
      Subscription findByAK​(long userId, long objectId, String type)
      Retrieves all the subscriptions with the given alternate key.
      Subscription findByName​(String name)
      Retrieves the subscription by the given name
      List<Subscription> findByObjectIdAndType​(long objectId, String type, String event, Integer folderOption)
      Retrieves all the subscriptions with the given object id and the given type
      List<Subscription> findByType​(String type)
      Retrieves all the subscriptions with the given type
      List<Subscription> findByUserId​(long userId)
      This method selects all subscriptions of a given user
      • Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO

        bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, store
    • Method Detail

      • findByName

        Subscription findByName​(String name)
        Retrieves the subscription by the given name
        Parameters:
        name - The subscription name
        Returns:
        The subscription with the given name
      • findByType

        List<Subscription> findByType​(String type)
        Retrieves all the subscriptions with the given type
        Parameters:
        type - The subscription type
        Returns:
        A list of subscriptions with the given type
      • findByAK

        Subscription findByAK​(long userId,
                              long objectId,
                              String type)
        Retrieves all the subscriptions with the given alternate key.
        Parameters:
        userId - The subscription user id
        objectId - The subscription object id
        type - The subscription type
        Returns:
        The subscription with the given userId, objectId and type
      • findByUserId

        List<Subscription> findByUserId​(long userId)
        This method selects all subscriptions of a given user
        Parameters:
        userId - identifier of the user
        Returns:
        list of subscriptions ordered by date
      • cleanPendingSubscriptions

        void cleanPendingSubscriptions()
        This method removes all the subscriptions associated to a deleted folder or document
      • findByObjectIdAndType

        List<Subscription> findByObjectIdAndType​(long objectId,
                                                 String type,
                                                 String event,
                                                 Integer folderOption)
        Retrieves all the subscriptions with the given object id and the given type
        Parameters:
        objectId - The subscription object id
        type - The subscription type
        event - If used, indicates what type of events the returned subscriptions must refer to.
        folderOption - Otional specification of the folder option.
        Returns:
        A list of subscriptions with the given objectId and the given type