Class LinkPagesPortletDAO

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

@ApplicationScoped public final class LinkPagesPortletDAO extends Object implements ILinkPagesPortletDAO
Provides data access for LinkPagesPortlet objects
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(int nPortletId)
    Deletes a portlet record
    void
    deleteAllLinkPages(int nPortletId)
    Removes all link pages from a portlet
    void
    deleteLinkPage(int nPortletId, int nLinkPageId)
    Removes a link page from a portlet
    void
    insert(fr.paris.lutece.portal.business.portlet.Portlet portlet)
    Inserts a portlet record
    void
    insertLinkPage(int nPortletId, int nLinkPageId, int nOrder)
    Inserts a link page in a portlet
    fr.paris.lutece.portal.business.portlet.Portlet
    load(int nPortletId)
    Loads a portlet by identifier
    int
    selectLinkPageIdByOrder(int nPortletId, int nOrder)
    Loads a link page identifier by order
    int
    selectLinkPageOrder(int nPortletId, int nPageId)
    Loads the order of a link page in a portlet
    List<fr.paris.lutece.portal.business.page.Page>
    Loads the link pages of a portlet
    fr.paris.lutece.util.ReferenceList
    Loads all website pages
    int
    selectMaxOrder(int nPortletId)
    Loads the max order of a portlet
    void
    store(fr.paris.lutece.portal.business.portlet.Portlet portlet)
    Stores a portlet record
    void
    storeLinkPageOrder(int nOrder, int nPortletId, int nLinkPageId)
    Updates the order of a link page
    boolean
    testDuplicate(int nPortletId, int nLinkPageId)
    Checks a link page duplicate in a 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)
      Inserts a portlet record
      Specified by:
      insert in interface ILinkPagesPortletDAO
      Specified by:
      insert in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
      Parameters:
      portlet - the portlet to insert
    • delete

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

      public fr.paris.lutece.portal.business.portlet.Portlet load(int nPortletId)
      Loads a portlet by identifier
      Specified by:
      load in interface ILinkPagesPortletDAO
      Specified by:
      load in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
      Parameters:
      nPortletId - the portlet identifier
      Returns:
      the portlet object
    • store

      public void store(fr.paris.lutece.portal.business.portlet.Portlet portlet) throws fr.paris.lutece.portal.service.util.AppException
      Stores a portlet record
      Specified by:
      store in interface ILinkPagesPortletDAO
      Specified by:
      store in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
      Parameters:
      portlet - the portlet to store
      Throws:
      fr.paris.lutece.portal.service.util.AppException - on storage error
    • selectLinkPagesList

      public fr.paris.lutece.util.ReferenceList selectLinkPagesList()
      Loads all website pages
      Specified by:
      selectLinkPagesList in interface ILinkPagesPortletDAO
      Returns:
      the page list
    • selectMaxOrder

      public int selectMaxOrder(int nPortletId)
      Loads the max order of a portlet
      Specified by:
      selectMaxOrder in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - the portlet identifier
      Returns:
      the max order
    • selectLinkPagesInPortletList

      public List<fr.paris.lutece.portal.business.page.Page> selectLinkPagesInPortletList(int nPortletId)
      Loads the link pages of a portlet
      Specified by:
      selectLinkPagesInPortletList in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - the portlet identifier
      Returns:
      the page list
    • selectLinkPageOrder

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

      public int selectLinkPageIdByOrder(int nPortletId, int nOrder)
      Loads a link page identifier by order
      Specified by:
      selectLinkPageIdByOrder in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - the portlet identifier
      nOrder - the page order
      Returns:
      the page identifier
    • storeLinkPageOrder

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

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

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

      public boolean testDuplicate(int nPortletId, int nLinkPageId)
      Checks a link page duplicate in a portlet
      Specified by:
      testDuplicate in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - the portlet identifier
      nLinkPageId - the link page identifier
      Returns:
      true when already registered
    • insertLinkPage

      public void insertLinkPage(int nPortletId, int nLinkPageId, int nOrder)
      Inserts a link page in a portlet
      Specified by:
      insertLinkPage in interface ILinkPagesPortletDAO
      Parameters:
      nPortletId - the portlet identifier
      nLinkPageId - the link page identifier
      nOrder - the page order