Class BlogDAO

java.lang.Object
fr.paris.lutece.plugins.blog.business.BlogDAO
All Implemented Interfaces:
IBlogDAO

@ApplicationScoped public final class BlogDAO extends Object implements IBlogDAO
This class provides Data Access methods for Blog objects
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete a record from the table
    void
    deleteSpecificVersion(int nIdBlog, int nVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete a blog's specific version record from the table
    void
    deleteVersions(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete a record from the table
    int
    getActualVersionNumber(Timestamp strUpdateDate, int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Returns the actual version number of a blog It get the version number witch has is the closest to the update date
    void
    insert(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new record in the table.
    void
    insertVersion(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new record in the table.
    load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data from the table
    loadBlogByIdTag(int nIdTag, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the list of Blogs objects and returns them as a list
    loadByName(String strName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data from the table
    loadVersion(int nId, int nVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data from the table
    selectAllUsersEditedBlog(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the users edited the blog and returns them as a list
    selectBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the blog objects and returns them as a list
    selectBlogsListByArchiveStatus(boolean isArchived, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    fr.paris.lutece.util.ReferenceList
    selectBlogsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the Blog objects and returns them as a referenceList
    selectBlogsVersionsList(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the blog objects and returns them as a list
    Load the list of blogs
    selectIdBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the id of all the Blog objects and returns them as a list
    selectLastBlogVersionsList(int nId, int nLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of nLimit last versions of a specific blog and returns them as a list
    selectlastModifiedBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nLimit)
    Load the data of nLimit last modified blog objects and returns them as a list
    selectWithoutBinaries(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    void
    store(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update the record in the table
    void
    updateBlogArchiveId(int nIdBlog, boolean bArchive, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update the blog archive

    Methods inherited from class java.lang.Object

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

    • BlogDAO

      public BlogDAO()
  • Method Details

    • insert

      public void insert(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      Specified by:
      insert in interface IBlogDAO
      Parameters:
      blog - instance of the Blog object to insert
      plugin - the Plugin
    • insertVersion

      public void insertVersion(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      Specified by:
      insertVersion in interface IBlogDAO
      Parameters:
      blog - instance of the blog object to insert
      plugin - the Plugin
    • load

      public Blog load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      Specified by:
      load in interface IBlogDAO
      Parameters:
      nKey - The identifier of the blog
      plugin - the Plugin
      Returns:
      The instance of the blog
    • loadByName

      public Blog loadByName(String strName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      Specified by:
      loadByName in interface IBlogDAO
      Parameters:
      strName - The name of the blog
      plugin - the Plugin
      Returns:
      The instance of the blog
    • loadVersion

      public Blog loadVersion(int nId, int nVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      Specified by:
      loadVersion in interface IBlogDAO
      Parameters:
      nId - The identifier of the blog
      nVersion - The version
      plugin - the Plugin
      Returns:
      The instance of the blog
    • delete

      public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      Specified by:
      delete in interface IBlogDAO
      Parameters:
      nKey - The identifier of the blog to delete
      plugin - the Plugin
    • deleteVersions

      public void deleteVersions(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      Specified by:
      deleteVersions in interface IBlogDAO
      Parameters:
      nKey - The identifier of the blog to delete
      plugin - the Plugin
    • deleteSpecificVersion

      public void deleteSpecificVersion(int nIdBlog, int nVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a blog's specific version record from the table
      Specified by:
      deleteSpecificVersion in interface IBlogDAO
      Parameters:
      nIdBlog - The identifier of the blog to process
      nVersion - The value of the version to delete
      plugin - the Plugin
    • store

      public void store(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
      Specified by:
      store in interface IBlogDAO
      Parameters:
      blog - the reference of the blog
      plugin - the Plugin
    • selectBlogsList

      public List<Blog> selectBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the blog objects and returns them as a list
      Specified by:
      selectBlogsList in interface IBlogDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The list which contains the data of all the blog objects
    • selectBlogsListByArchiveStatus

      public List<Blog> selectBlogsListByArchiveStatus(boolean isArchived, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Specified by:
      selectBlogsListByArchiveStatus in interface IBlogDAO
    • selectlastModifiedBlogsList

      public List<Blog> selectlastModifiedBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nLimit)
      Load the data of nLimit last modified blog objects and returns them as a list
      Specified by:
      selectlastModifiedBlogsList in interface IBlogDAO
      Parameters:
      plugin - the Plugin
      nLimit - number of blogument
      Returns:
      The list which contains the data of of nLimit last modified blog objects
    • selectBlogsVersionsList

      public List<Blog> selectBlogsVersionsList(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the blog objects and returns them as a list
      Specified by:
      selectBlogsVersionsList in interface IBlogDAO
      plugin - the Plugin
      Returns:
      The list which contains the data of all the blog objects
    • selectAllUsersEditedBlog

      public List<String> selectAllUsersEditedBlog(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the users edited the blog and returns them as a list
      Specified by:
      selectAllUsersEditedBlog in interface IBlogDAO
      plugin - the Plugin
      Returns:
      The list which contains the data of all the users edited blog objects
    • selectIdBlogsList

      public List<Integer> selectIdBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the id of all the Blog objects and returns them as a list
      Specified by:
      selectIdBlogsList in interface IBlogDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The list which contains the id of all the Blog objects
    • selectBlogsReferenceList

      public fr.paris.lutece.util.ReferenceList selectBlogsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the Blog objects and returns them as a referenceList
      Specified by:
      selectBlogsReferenceList in interface IBlogDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The referenceList which contains the data of all the Blog objects
    • selectByFilter

      public List<Blog> selectByFilter(BlogFilter filter)
      Load the list of blogs
      Specified by:
      selectByFilter in interface IBlogDAO
      Parameters:
      filter - The blogFilter Object
      Returns:
      The Collection of the blogs
    • loadBlogByIdTag

      public List<Blog> loadBlogByIdTag(int nIdTag, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the list of Blogs objects and returns them as a list
      Specified by:
      loadBlogByIdTag in interface IBlogDAO
      plugin - the Plugin
      Returns:
      the list of Blogs objects
    • selectWithoutBinaries

      public List<Blog> selectWithoutBinaries(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Specified by:
      selectWithoutBinaries in interface IBlogDAO
    • selectLastBlogVersionsList

      public List<Blog> selectLastBlogVersionsList(int nId, int nLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of nLimit last versions of a specific blog and returns them as a list
      Specified by:
      selectLastBlogVersionsList in interface IBlogDAO
      Parameters:
      nId - The blog's primary key
      nLimit - Maximum amount of Blog Object versions to return
      Returns:
      The list which contains the data of nLimit last versions of the blog
    • getActualVersionNumber

      public int getActualVersionNumber(Timestamp strUpdateDate, int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns the actual version number of a blog It get the version number witch has is the closest to the update date
      Specified by:
      getActualVersionNumber in interface IBlogDAO
      Parameters:
      strUpdateDate - the update date
      nId - the blog id
      Returns:
      the version number
    • updateBlogArchiveId

      public void updateBlogArchiveId(int nIdBlog, boolean bArchive, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the blog archive
      Specified by:
      updateBlogArchiveId in interface IBlogDAO
      Parameters:
      nIdBlog - The blog id