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
  • Field Summary Link icon

    Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO Link icon

    ENTITY
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    This method removes all the subscriptions associated to a deleted folder or document
    find(Long objectId, String type, String event, Long userId, Integer folderOption, Integer max)
    Retrieves all the subscriptions matching a set of criteria.
    findByAK(long userId, long objectId, String type)
    Retrieves all the subscriptions with the given alternate key.
    Retrieves the subscription by the given name
    findByObjectIdAndType(long objectId, String type, String event, Integer folderOption)
    Retrieves all the subscriptions with the given object id and the given type
    Retrieves all the subscriptions with the given type
    findByUserId(long userId)
    This method selects all subscriptions of a given user

    Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO Link icon

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

    • findByName Link icon

      Subscription findByName(String name) throws com.logicaldoc.core.PersistenceException
      Retrieves the subscription by the given name
      Parameters:
      name - The subscription name
      Returns:
      The subscription with the given name
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database
    • findByType Link icon

      List<Subscription> findByType(String type) throws com.logicaldoc.core.PersistenceException
      Retrieves all the subscriptions with the given type
      Parameters:
      type - The subscription type
      Returns:
      A list of subscriptions with the given type
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database
    • findByAK Link icon

      Subscription findByAK(long userId, long objectId, String type) throws com.logicaldoc.core.PersistenceException
      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
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database
    • findByUserId Link icon

      List<Subscription> findByUserId(long userId) throws com.logicaldoc.core.PersistenceException
      This method selects all subscriptions of a given user
      Parameters:
      userId - identifier of the user
      Returns:
      list of subscriptions ordered by date
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database
    • cleanPendingSubscriptions Link icon

      void cleanPendingSubscriptions() throws com.logicaldoc.core.PersistenceException
      This method removes all the subscriptions associated to a deleted folder or document
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database
    • findByObjectIdAndType Link icon

      List<Subscription> findByObjectIdAndType(long objectId, String type, String event, Integer folderOption) throws com.logicaldoc.core.PersistenceException
      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 - specification of the folder option.
      Returns:
      A list of subscriptions with the given objectId and the given type
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database
    • find Link icon

      List<Subscription> find(Long objectId, String type, String event, Long userId, Integer folderOption, Integer max) throws com.logicaldoc.core.PersistenceException
      Retrieves all the subscriptions matching a set of criteria.
      Parameters:
      objectId - The subscription object id
      type - The subscription type
      event - If used, indicates what type of events the returned subscriptions must refer to.
      userId - The identifier of the subscribed user
      folderOption - specification of the folder option.
      max - maximum number of elements.
      Returns:
      A list of subscriptions
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database