Class LinkPagesPortletDAO

java.lang.Object
fr.paris.lutece.plugins.linkpages.business.portlet.LinkPagesPortletDAO
All Implemented Interfaces:
ILinkPagesPortletDAO, fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO

public class LinkPagesPortletDAO extends Object implements ILinkPagesPortletDAO
This class provides Data Access methods for LinkPagesPortlet objects
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(int nPortletId)
    Deletes a record from the table
    void
    deleteAllLinkPages(int nPortletId)
    Remove all link pages from a specified portlet
    void
    deleteLinkPage(int nPortletId, int nLinkPageId)
    Remove a specified link page from a specified portlet
    void
    insert(fr.paris.lutece.portal.business.portlet.Portlet portlet)
     
    void
    insertLinkPage(int nPortletId, int nLinkPageId, int nOrder)
    Insert a new record in the table.
    fr.paris.lutece.portal.business.portlet.Portlet
    load(int nPortletId)
    Loads the data of a LinkdPagesPortlet whose identifier is specified in parameter from the table
    int
    selectLinkPageIdByOrder(int nPortletId, int nOrder)
    Returns the id of a link page wich has a specified order in a specified portlet
    int
    selectLinkPageOrder(int nPortletId, int nPageId)
    Return the order of a link page in a specified portlet
    List<fr.paris.lutece.portal.business.page.Page>
    Return a list of linkpages which belong to a specified portlet
    fr.paris.lutece.util.ReferenceList
    Load the list of all the pages of the website
    int
    selectMaxOrder(int nPortletId)
    Calculate a new primary key to add a new linkPage
    void
    store(fr.paris.lutece.portal.business.portlet.Portlet portlet)
     
    void
    storeLinkPageOrder(int nOrder, int nPortletId, int nLinkPageId)
    Update the order of a specified link page in a specified portlet
    boolean
    testDuplicate(int nPortletId, int nLinkPageId)
    Check if a specified link page is not already registered in a specified portlet

    Methods inherited from class java.lang.Object

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

    • LinkPagesPortletDAO

      public LinkPagesPortletDAO()
  • Method Details

    • insert

      public void insert(fr.paris.lutece.portal.business.portlet.Portlet portlet)
      Specified by:
      insert in interface ILinkPagesPortletDAO
      Specified by:
      insert in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
    • delete

      public void delete(int nPortletId)
      Deletes a record from the table
      Specified by:
      delete in interface ILinkPagesPortletDAO
      Specified by:
      delete in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
      Parameters:
      nPortletId - Identifier portlet
    • load

      public fr.paris.lutece.portal.business.portlet.Portlet load(int nPortletId)
      Loads the data of a LinkdPagesPortlet whose identifier is specified in parameter from the table
      Specified by:
      load in interface ILinkPagesPortletDAO
      Specified by:
      load in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
      Parameters:
      nPortletId - The LinkdPagesPortlet identifier
      Returns:
      the LinkdPagesPortlet object
    • store

      public void store(fr.paris.lutece.portal.business.portlet.Portlet portlet) throws fr.paris.lutece.portal.service.util.AppException
      Specified by:
      store in interface ILinkPagesPortletDAO
      Specified by:
      store in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
      Throws:
      fr.paris.lutece.portal.service.util.AppException
    • selectLinkPagesList

      public fr.paris.lutece.util.ReferenceList selectLinkPagesList()
      Load the list of all the pages of the website
      Specified by:
      selectLinkPagesList in interface ILinkPagesPortletDAO
      Returns:
      the list in form of a ReferenceList object
    • selectMaxOrder

      public int selectMaxOrder(int nPortletId)
      Calculate a new primary key to add a new linkPage
      Specified by:
      selectMaxOrder in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - The identifier of the portlet
      Returns:
      The new key.
    • selectLinkPagesInPortletList

      public List<fr.paris.lutece.portal.business.page.Page> selectLinkPagesInPortletList(int nPortletId)
      Return a list of linkpages which belong to a specified portlet
      Specified by:
      selectLinkPagesInPortletList in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - The identifier of the portlet
      Returns:
      A list of linkpages objects
    • selectLinkPageOrder

      public int selectLinkPageOrder(int nPortletId, int nPageId)
      Return the order of a link page in a specified portlet
      Specified by:
      selectLinkPageOrder in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - The identifier of the portlet to check
      nPageId - The identifier of the page
      Returns:
      The order of the page in the portlet
    • selectLinkPageIdByOrder

      public int selectLinkPageIdByOrder(int nPortletId, int nOrder)
      Returns the id of a link page wich has a specified order in a specified portlet
      Specified by:
      selectLinkPageIdByOrder in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - The identifier of the portlet
      nOrder - The link page's order
      Returns:
      The identifier of the link page
    • storeLinkPageOrder

      public void storeLinkPageOrder(int nOrder, int nPortletId, int nLinkPageId)
      Update the order of a specified link page in a specified portlet
      Specified by:
      storeLinkPageOrder in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - The identifier of the portlet
      nLinkPageId - The identifier of the link page
      nOrder - The new order
    • deleteLinkPage

      public void deleteLinkPage(int nPortletId, int nLinkPageId)
      Remove a specified link page from a specified portlet
      Specified by:
      deleteLinkPage in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - The identifier of the portlet
      nLinkPageId - The identifier of the link page
    • deleteAllLinkPages

      public void deleteAllLinkPages(int nPortletId)
      Remove all link pages from a specified portlet
      Specified by:
      deleteAllLinkPages in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - The identifier of the portlet
    • testDuplicate

      public boolean testDuplicate(int nPortletId, int nLinkPageId)
      Check if a specified link page is not already registered in a specified portlet
      Specified by:
      testDuplicate in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - The identifier of the portlet
      nLinkPageId - The identifier of the link page
      Returns:
      The result(boolean)
    • insertLinkPage

      public void insertLinkPage(int nPortletId, int nLinkPageId, int nOrder)
      Insert a new record in the table.
      Specified by:
      insertLinkPage in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - The identifier of the portlet
      nLinkPageId - The identifier of the link page
      nOrder - The order of the portlet to insert