Class BlogPublicationDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.blog.business.portlet.BlogPublicationDAO
-
- All Implemented Interfaces:
IBlogPublicationDAO
public class BlogPublicationDAO extends java.lang.Object implements IBlogPublicationDAO
-
-
Constructor Summary
Constructors Constructor Description BlogPublicationDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountPublicationByIdBlogAndDate(int nIdBlog, java.util.Date date, fr.paris.lutece.portal.service.plugin.Plugin plugin)Counts the number of valid publication of a blog at a given date.voiddeleteBlogByIdPortlet(int nIdPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete the BLOGPublication by portlet idvoiddeleteBlogsId(int nDocId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete docs for the specified portletjava.util.List<java.lang.Integer>getLastPublishedBlogsIdsListByPortletIds(int[] nPortletsIds, java.util.Date dateUpdated, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of published Blogs associated with given collection of portlets.java.util.List<java.lang.Integer>getPublishedBlogsIdsListByPortletIds(int[] nPortletsIds, java.util.Date datePublishing, java.util.Date dateEndPublishing, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of id of published BLOGs associated with a given collection of portlets.voidinsertBlogsId(BlogPublication blogPublication, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a list of doc for a specified blogPublicationjava.util.List<BlogPublication>loadAllBlogsPublication(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load all BLOGPublicationjava.util.List<BlogPublication>loadBlogsByPortlet(int nIdPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)load a list BLOGPublication by the portlet idjava.util.List<BlogPublication>loadBlogsByPortletAndPublicationDate(int nIdPortlet, java.util.Date datePublishing, java.util.Date dateEndPublishing, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load a list BLOGPublication by the portlet id, and published at or after the specified date.java.util.List<BlogPublication>loadBlogsId(int nDocId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load a list of BLOGPublicationBlogPublicationloadBlogsPublication(int nPortletId, int nDocId, fr.paris.lutece.portal.service.plugin.Plugin plugin)load a BLOGPublication by BLOG id and portlet idvoidremove(int nDocId, int nIdPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove BLOGPublication by primary kleyjava.util.Collection<BlogPublication>selectSinceDatePublishingAndStatus(java.util.Date datePublishing, java.util.Date dateEndPublication, int nStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin)Find the list ofBlogPublicationobjects specified the status and published at or after the specified datevoidstore(BlogPublication blogPublication, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update an instance of the BLOGPublication
-
-
-
Method Detail
-
insertBlogsId
public void insertBlogsId(BlogPublication blogPublication, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a list of doc for a specified blogPublication- Specified by:
insertBlogsIdin interfaceIBlogPublicationDAO- Parameters:
blogPublication- the blogPublication to insertplugin- the plugin
-
store
public void store(BlogPublication blogPublication, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update an instance of the BLOGPublication- Specified by:
storein interfaceIBlogPublicationDAO- Parameters:
blogPublication- the publication dataplugin- the plugin
-
deleteBlogsId
public void deleteBlogsId(int nDocId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete docs for the specified portlet- Specified by:
deleteBlogsIdin interfaceIBlogPublicationDAO- Parameters:
nDocId- The doc identifierplugin- the plugin
-
deleteBlogByIdPortlet
public void deleteBlogByIdPortlet(int nIdPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete the BLOGPublication by portlet id- Specified by:
deleteBlogByIdPortletin interfaceIBlogPublicationDAO- Parameters:
nIdPortlet- The portlet idplugin- the plugin
-
remove
public void remove(int nDocId, int nIdPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove BLOGPublication by primary kley- Specified by:
removein interfaceIBlogPublicationDAOplugin- the plugin
-
loadBlogsId
public java.util.List<BlogPublication> loadBlogsId(int nDocId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load a list of BLOGPublication- Specified by:
loadBlogsIdin interfaceIBlogPublicationDAOplugin- the plugin- Returns:
- List of IdDoc
-
loadBlogsByPortlet
public java.util.List<BlogPublication> loadBlogsByPortlet(int nIdPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)
load a list BLOGPublication by the portlet id- Specified by:
loadBlogsByPortletin interfaceIBlogPublicationDAO- Parameters:
nIdPortlet- The protlet idplugin- the plugin- Returns:
- list of BLOGPublication
-
loadBlogsByPortletAndPublicationDate
public java.util.List<BlogPublication> loadBlogsByPortletAndPublicationDate(int nIdPortlet, java.util.Date datePublishing, java.util.Date dateEndPublishing, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load a list BLOGPublication by the portlet id, and published at or after the specified date.- Specified by:
loadBlogsByPortletAndPublicationDatein interfaceIBlogPublicationDAO- Parameters:
nIdPortlet- The portlet iddatePublishing- The publication end datedateEndPublishing- The publication dateplugin- the plugin- Returns:
- list of BLOGPublication
-
loadBlogsPublication
public BlogPublication loadBlogsPublication(int nPortletId, int nDocId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
load a BLOGPublication by BLOG id and portlet id- Specified by:
loadBlogsPublicationin interfaceIBlogPublicationDAO- Parameters:
nPortletId- The portlet idnDocId- The blogs idplugin- the plugin- Returns:
- blogPublication
-
loadAllBlogsPublication
public java.util.List<BlogPublication> loadAllBlogsPublication(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load all BLOGPublication- Specified by:
loadAllBlogsPublicationin interfaceIBlogPublicationDAO- Returns:
- The list of BLOGPublication
-
selectSinceDatePublishingAndStatus
public java.util.Collection<BlogPublication> selectSinceDatePublishingAndStatus(java.util.Date datePublishing, java.util.Date dateEndPublication, int nStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find the list ofBlogPublicationobjects specified the status and published at or after the specified date- Specified by:
selectSinceDatePublishingAndStatusin interfaceIBlogPublicationDAO- Parameters:
datePublishing- The publication end datedateEndPublication- The publication datenStatus- The statusplugin- the plugin- Returns:
- The
BlogPublicationobjectsCollectionordered by BlogOrder ascending. The list is empty if no objects found.
-
getPublishedBlogsIdsListByPortletIds
public java.util.List<java.lang.Integer> getPublishedBlogsIdsListByPortletIds(int[] nPortletsIds, java.util.Date datePublishing, java.util.Date dateEndPublishing, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of id of published BLOGs associated with a given collection of portlets.- Specified by:
getPublishedBlogsIdsListByPortletIdsin interfaceIBlogPublicationDAO- Parameters:
nPortletsIds- The list of portlet ids.datePublishing- The publication datedateEndPublishing- The publication end dateplugin- The blog plugin- Returns:
- The list of blogs id.
-
getLastPublishedBlogsIdsListByPortletIds
public java.util.List<java.lang.Integer> getLastPublishedBlogsIdsListByPortletIds(int[] nPortletsIds, java.util.Date dateUpdated, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of published Blogs associated with given collection of portlets. Returns only the blogs updated after given dateUpdated- Specified by:
getLastPublishedBlogsIdsListByPortletIdsin interfaceIBlogPublicationDAO- Parameters:
nPortletsIds- The list of portlets idsdateUpdated- The date from the blogs had been updatedplugin- the plugin- Returns:
- the list of blogs id
-
countPublicationByIdBlogAndDate
public int countPublicationByIdBlogAndDate(int nIdBlog, java.util.Date date, fr.paris.lutece.portal.service.plugin.Plugin plugin)Description copied from interface:IBlogPublicationDAOCounts the number of valid publication of a blog at a given date.- Specified by:
countPublicationByIdBlogAndDatein interfaceIBlogPublicationDAO- Returns:
-
-