java.lang.Object
fr.paris.lutece.plugins.newsletter.modules.blog.business.NewsletterBlogDAO
All Implemented Interfaces:
INewsletterBlogDAO

@ApplicationScoped @Named("newsletter-blog.newsletterBlogDAO") public class NewsletterBlogDAO extends Object implements INewsletterBlogDAO
DAO implementation for newsletter document
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    associateNewsLetterDocumentPortlet(int nTopicId, int nPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Associate a new portlet to a newsletter topic
    void
    associateNewsLetterDocumentTag(int nTopicId, int nCategoryId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Associate a new category to a newsletter topic
    void
    createDocumentTopic(NewsletterBlog topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new newsletter blogs topic into the database
    void
    deleteDocumentTopic(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Remove a newsletter blogs topic from the database
    void
    deleteNewsLetterDocumentPortlet(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Remove the relationship between a topic and the list of portlets
    void
    deleteNewsLetterDocumentTags(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Remove the relationship between a topic and the list of blogs
    findByPrimaryKey(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get a newsletter blogs topic from its id
    boolean
    findTemplate(int nIdNewsletterTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Check if a template is used by a topic
    int[]
    selectNewsletterPortletsIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    loads the list of blogs list portlets linked to the newsletter
    int[]
    selectNewsletterTagIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    loads the list of tags linked to the newsletter
    void
    updateDocumentTopic(NewsletterBlog topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update a newsletter blogs topic

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NewsletterBlogDAO

      public NewsletterBlogDAO()
  • Method Details

    • findByPrimaryKey

      public NewsletterBlog findByPrimaryKey(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get a newsletter blogs topic from its id
      Specified by:
      findByPrimaryKey in interface INewsletterBlogDAO
      Parameters:
      nIdTopic - the id of the topic to get
      plugin - The plugin
      Returns:
      The topic, or null if no topic was found
    • updateDocumentTopic

      public void updateDocumentTopic(NewsletterBlog topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update a newsletter blogs topic
      Specified by:
      updateDocumentTopic in interface INewsletterBlogDAO
      Parameters:
      topic - The topic to update
      plugin - The plugin
    • deleteDocumentTopic

      public void deleteDocumentTopic(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove a newsletter blogs topic from the database
      Specified by:
      deleteDocumentTopic in interface INewsletterBlogDAO
      Parameters:
      nIdTopic - The id of the newsletter blogs topic to remove
      plugin - The plugin
    • createDocumentTopic

      public void createDocumentTopic(NewsletterBlog topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new newsletter blogs topic into the database
      Specified by:
      createDocumentTopic in interface INewsletterBlogDAO
      Parameters:
      topic - The newsletter blogs topic to insert
      plugin - the plugin
    • associateNewsLetterDocumentTag

      public void associateNewsLetterDocumentTag(int nTopicId, int nCategoryId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Associate a new category to a newsletter topic
      Specified by:
      associateNewsLetterDocumentTag in interface INewsletterBlogDAO
      Parameters:
      nTopicId - the topic id
      plugin - the newsletter blogs plugin
    • deleteNewsLetterDocumentTags

      public void deleteNewsLetterDocumentTags(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove the relationship between a topic and the list of blogs
      Specified by:
      deleteNewsLetterDocumentTags in interface INewsletterBlogDAO
      Parameters:
      nTopicId - the topic id
      plugin - the newsletter blogs plugin
    • selectNewsletterTagIds

      public int[] selectNewsletterTagIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      loads the list of tags linked to the newsletter
      Specified by:
      selectNewsletterTagIds in interface INewsletterBlogDAO
      Parameters:
      nTopicId - the topic id
      plugin - the newsletter blogs plugin
      Returns:
      the array of tag id
    • associateNewsLetterDocumentPortlet

      public void associateNewsLetterDocumentPortlet(int nTopicId, int nPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Associate a new portlet to a newsletter topic
      Specified by:
      associateNewsLetterDocumentPortlet in interface INewsletterBlogDAO
      Parameters:
      nTopicId - the topic id
      nPortletId - the portlet identifier
      plugin - the newsletter blogs plugin
    • deleteNewsLetterDocumentPortlet

      public void deleteNewsLetterDocumentPortlet(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove the relationship between a topic and the list of portlets
      Specified by:
      deleteNewsLetterDocumentPortlet in interface INewsletterBlogDAO
      Parameters:
      nTopicId - the topic id
      plugin - the newsletter blogs plugin
    • selectNewsletterPortletsIds

      public int[] selectNewsletterPortletsIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      loads the list of blogs list portlets linked to the newsletter
      Specified by:
      selectNewsletterPortletsIds in interface INewsletterBlogDAO
      Parameters:
      nTopicId - the topic id
      plugin - the newsletter blogs plugin
      Returns:
      the array of categories id
    • findTemplate

      public boolean findTemplate(int nIdNewsletterTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if a template is used by a topic
      Specified by:
      findTemplate in interface INewsletterBlogDAO
      Parameters:
      nIdNewsletterTemplate - The id of the template
      plugin - The newsletter plugin
      Returns:
      True if the template is used by a topic, false otherwise