Interface INewsletterTopicDAO

All Known Implementing Classes:
NewsletterTopicDao

public interface INewsletterTopicDAO
Interface for NewsletterTopic DAO
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    fillBlankInOrder(int nIdNewsletter, int nOrder, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Fill a blank in the order of topics of a newsletter.
    findAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the list of NewsletterTopic associated with a given newsletter.
    findByNewsletterIdAndOrder(int nIdNewsletter, int nOrder, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the list of newsletter topics associated to a given newsletter and with the given order in a section
    findByPrimaryKey(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get a NewsletterTopic by its primary key from the database
    int
    getLastOrder(int nIdNewsletter, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the highest order for a given newsletter and a given section
    int
    getNewOrder(int nIdNewsletter, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the next available order value for topics of a newsletter
    void
    insert(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new NewsletterTopic into the database
    void
    remove(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete a NewsletterTopic from the database
    void
    removeAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Remove every topic associated with a given newsletter
    void
    update(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update a NewsletterTopic in the database
    void
    updateNewsletterTopicOrder(int nIdNewsletterTopic, int nNewOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update the order of a newsletter topic
  • Method Details

    • findByPrimaryKey

      NewsletterTopic findByPrimaryKey(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get a NewsletterTopic by its primary key from the database
      Parameters:
      nId - The id of the NewsletterTopic to get
      plugin - The plugin
      Returns:
      The NewsletterTopic with the given id, or null if no NewsletterTopic has this id.
    • insert

      void insert(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new NewsletterTopic into the database
      Parameters:
      newsletterTopic - The NewsletterTopic to insert.
      plugin - The plugin
    • update

      void update(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update a NewsletterTopic in the database
      Parameters:
      newsletterTopic - The new values of the NewsletterTopic.
      plugin - The plugin
    • remove

      void remove(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a NewsletterTopic from the database
      Parameters:
      nId - The id of the NewsletterTopic to delete.
      plugin - The plugin
    • findAllByIdNewsletter

      List<NewsletterTopic> findAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of NewsletterTopic associated with a given newsletter.
      Parameters:
      nIdNewsletter - The id of the newsletter
      plugin - The plugin
      Returns:
      The list of NewsletterTopic found.
    • updateNewsletterTopicOrder

      void updateNewsletterTopicOrder(int nIdNewsletterTopic, int nNewOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the order of a newsletter topic
      Parameters:
      nIdNewsletterTopic - The id of the newsletter topic to update
      nNewOrder - The new order of the topic
      plugin - The plugin
    • findByNewsletterIdAndOrder

      List<NewsletterTopic> findByNewsletterIdAndOrder(int nIdNewsletter, int nOrder, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of newsletter topics associated to a given newsletter and with the given order in a section
      Parameters:
      nIdNewsletter - The id of the newsletter the topic must be associated with.
      nOrder - The order the topics must have
      nSection - The section of the Topic
      plugin - The plugin
      Returns:
      The list of newsletter topics. The list should contain only one or zero element. If it has more, then it indicates that several topics have the same order and should be reordered.
    • getNewOrder

      int getNewOrder(int nIdNewsletter, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the next available order value for topics of a newsletter
      Parameters:
      nIdNewsletter - The id of the newsletter
      nSection - The section of the newsletter
      plugin - The plugin
      Returns:
      The next available order value
    • getLastOrder

      int getLastOrder(int nIdNewsletter, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the highest order for a given newsletter and a given section
      Parameters:
      nIdNewsletter - The id of the newsletter
      nSection - The id of the section
      plugin - The plugin
      Returns:
      The highest order actually used for the given newsletter and the given section
    • fillBlankInOrder

      void fillBlankInOrder(int nIdNewsletter, int nOrder, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Fill a blank in the order of topics of a newsletter.
      Parameters:
      nIdNewsletter - The newsletter to update the topics of
      nOrder - The order with no topic
      nSection - The section of topics to update
      plugin - the plugin
    • removeAllByIdNewsletter

      void removeAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove every topic associated with a given newsletter
      Parameters:
      nIdNewsletter - The id of the newsletter to remove the topics of.
      plugin - The plugin