Interface ISuggestedRevisionDAO

All Known Implementing Classes:
SuggestedRevisionDAO

public interface ISuggestedRevisionDAO
Data Access contract for SuggestedRevision objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    countPendingByEntities(List<Integer> entityIds, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Counts pending suggestions for a batch of entities in a single query.
    int
    countPendingByEntity(int nEntityId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Counts pending suggestions for a single entity.
    void
    delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Removes a suggestion by primary key.
    void
    insert(SuggestedRevision suggestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Inserts a new suggestion.
    load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Loads a suggestion by primary key.
    selectAllPending(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Returns every pending suggestion, ordered by creation date desc.
    selectByAuthor(String strAuthorGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Returns the suggestions submitted by the given author, ordered by creation date desc.
    selectPendingByEntityAndAuthor(int nEntityId, String strAuthorGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Returns the pending suggestion from a given author on a given entity, if any.
    void
    updateStatus(SuggestedRevision suggestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Updates the status, reviewer and review comment of a suggestion.
  • Method Details

    • insert

      void insert(SuggestedRevision suggestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Inserts a new suggestion.
      Parameters:
      suggestion - the suggestion to persist
      plugin - the wiki plugin
    • updateStatus

      void updateStatus(SuggestedRevision suggestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Updates the status, reviewer and review comment of a suggestion.
      Parameters:
      suggestion - the suggestion to update
      plugin - the wiki plugin
    • delete

      void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Removes a suggestion by primary key.
      Parameters:
      nKey - the suggestion id
      plugin - the wiki plugin
    • load

      Optional<SuggestedRevision> load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Loads a suggestion by primary key.
      Parameters:
      nKey - the suggestion id
      plugin - the wiki plugin
      Returns:
      the suggestion if found
    • selectAllPending

      List<SuggestedRevision> selectAllPending(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns every pending suggestion, ordered by creation date desc.
      Parameters:
      plugin - the wiki plugin
      Returns:
      all pending suggestions
    • selectByAuthor

      List<SuggestedRevision> selectByAuthor(String strAuthorGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns the suggestions submitted by the given author, ordered by creation date desc.
      Parameters:
      strAuthorGuid - the proposer's user guid
      plugin - the wiki plugin
      Returns:
      the suggestions submitted by this author
    • selectPendingByEntityAndAuthor

      Optional<SuggestedRevision> selectPendingByEntityAndAuthor(int nEntityId, String strAuthorGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns the pending suggestion from a given author on a given entity, if any.
      Parameters:
      nEntityId - the wiki item id
      strAuthorGuid - the proposer's user guid
      plugin - the wiki plugin
      Returns:
      the pending suggestion if exists
    • countPendingByEntity

      int countPendingByEntity(int nEntityId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Counts pending suggestions for a single entity.
      Parameters:
      nEntityId - the entity id
      plugin - the wiki plugin
      Returns:
      the number of pending suggestions on this entity
    • countPendingByEntities

      Map<Integer,Integer> countPendingByEntities(List<Integer> entityIds, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Counts pending suggestions for a batch of entities in a single query. Entities with no pending suggestion are absent from the result.
      Parameters:
      entityIds - the entity ids to count for
      plugin - the wiki plugin
      Returns:
      a map of entity id to pending count