Class NewsletterBlogDAO
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidassociateNewsLetterDocumentPortlet(int nTopicId, int nPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Associate a new portlet to a newsletter topicvoidassociateNewsLetterDocumentTag(int nTopicId, int nCategoryId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Associate a new category to a newsletter topicvoidcreateDocumentTopic(NewsletterBlog topic, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new newsletter blogs topic into the databasevoiddeleteDocumentTopic(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove a newsletter blogs topic from the databasevoiddeleteNewsLetterDocumentPortlet(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove the relationship between a topic and the list of portletsvoiddeleteNewsLetterDocumentTags(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove the relationship between a topic and the list of blogsfindByPrimaryKey(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin) Get a newsletter blogs topic from its idbooleanfindTemplate(int nIdNewsletterTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin) Check if a template is used by a topicint[]selectNewsletterPortletsIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin) loads the list of blogs list portlets linked to the newsletterint[]selectNewsletterTagIds(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin) loads the list of tags linked to the newslettervoidupdateDocumentTopic(NewsletterBlog topic, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update a newsletter blogs topic
-
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:
findByPrimaryKeyin interfaceINewsletterBlogDAO- Parameters:
nIdTopic- the id of the topic to getplugin- 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:
updateDocumentTopicin interfaceINewsletterBlogDAO- Parameters:
topic- The topic to updateplugin- 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:
deleteDocumentTopicin interfaceINewsletterBlogDAO- Parameters:
nIdTopic- The id of the newsletter blogs topic to removeplugin- 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:
createDocumentTopicin interfaceINewsletterBlogDAO- Parameters:
topic- The newsletter blogs topic to insertplugin- 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:
associateNewsLetterDocumentTagin interfaceINewsletterBlogDAO- Parameters:
nTopicId- the topic idplugin- 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:
deleteNewsLetterDocumentTagsin interfaceINewsletterBlogDAO- Parameters:
nTopicId- the topic idplugin- 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:
selectNewsletterTagIdsin interfaceINewsletterBlogDAO- Parameters:
nTopicId- the topic idplugin- 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:
associateNewsLetterDocumentPortletin interfaceINewsletterBlogDAO- Parameters:
nTopicId- the topic idnPortletId- the portlet identifierplugin- 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:
deleteNewsLetterDocumentPortletin interfaceINewsletterBlogDAO- Parameters:
nTopicId- the topic idplugin- 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:
selectNewsletterPortletsIdsin interfaceINewsletterBlogDAO- Parameters:
nTopicId- the topic idplugin- 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:
findTemplatein interfaceINewsletterBlogDAO- Parameters:
nIdNewsletterTemplate- The id of the templateplugin- The newsletter plugin- Returns:
- True if the template is used by a topic, false otherwise
-