Class LinkPagesPortletDAO
java.lang.Object
fr.paris.lutece.plugins.linkpages.business.portlet.LinkPagesPortletDAO
- All Implemented Interfaces:
ILinkPagesPortletDAO,fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
This class provides Data Access methods for LinkPagesPortlet objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nPortletId) Deletes a record from the tablevoiddeleteAllLinkPages(int nPortletId) Remove all link pages from a specified portletvoiddeleteLinkPage(int nPortletId, int nLinkPageId) Remove a specified link page from a specified portletvoidinsert(fr.paris.lutece.portal.business.portlet.Portlet portlet) voidinsertLinkPage(int nPortletId, int nLinkPageId, int nOrder) Insert a new record in the table.fr.paris.lutece.portal.business.portlet.Portletload(int nPortletId) Loads the data of a LinkdPagesPortlet whose identifier is specified in parameter from the tableintselectLinkPageIdByOrder(int nPortletId, int nOrder) Returns the id of a link page wich has a specified order in a specified portletintselectLinkPageOrder(int nPortletId, int nPageId) Return the order of a link page in a specified portletList<fr.paris.lutece.portal.business.page.Page>selectLinkPagesInPortletList(int nPortletId) Return a list of linkpages which belong to a specified portletfr.paris.lutece.util.ReferenceListLoad the list of all the pages of the websiteintselectMaxOrder(int nPortletId) Calculate a new primary key to add a new linkPagevoidstore(fr.paris.lutece.portal.business.portlet.Portlet portlet) voidstoreLinkPageOrder(int nOrder, int nPortletId, int nLinkPageId) Update the order of a specified link page in a specified portletbooleantestDuplicate(int nPortletId, int nLinkPageId) Check if a specified link page is not already registered in a specified portlet
-
Constructor Details
-
LinkPagesPortletDAO
public LinkPagesPortletDAO()
-
-
Method Details
-
insert
public void insert(fr.paris.lutece.portal.business.portlet.Portlet portlet) - Specified by:
insertin interfaceILinkPagesPortletDAO- Specified by:
insertin interfacefr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
-
delete
public void delete(int nPortletId) Deletes a record from the table- Specified by:
deletein interfaceILinkPagesPortletDAO- Specified by:
deletein interfacefr.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:
loadin interfaceILinkPagesPortletDAO- Specified by:
loadin interfacefr.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:
storein interfaceILinkPagesPortletDAO- Specified by:
storein interfacefr.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:
selectLinkPagesListin interfaceILinkPagesPortletDAO- 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:
selectMaxOrderin interfaceILinkPagesPortletDAO- Parameters:
nPortletId- The identifier of the portlet- Returns:
- The new key.
-
selectLinkPagesInPortletList
Return a list of linkpages which belong to a specified portlet- Specified by:
selectLinkPagesInPortletListin interfaceILinkPagesPortletDAO- 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:
selectLinkPageOrderin interfaceILinkPagesPortletDAO- Parameters:
nPortletId- The identifier of the portlet to checknPageId- 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:
selectLinkPageIdByOrderin interfaceILinkPagesPortletDAO- Parameters:
nPortletId- The identifier of the portletnOrder- 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:
storeLinkPageOrderin interfaceILinkPagesPortletDAO- Parameters:
nPortletId- The identifier of the portletnLinkPageId- The identifier of the link pagenOrder- The new order
-
deleteLinkPage
public void deleteLinkPage(int nPortletId, int nLinkPageId) Remove a specified link page from a specified portlet- Specified by:
deleteLinkPagein interfaceILinkPagesPortletDAO- Parameters:
nPortletId- The identifier of the portletnLinkPageId- The identifier of the link page
-
deleteAllLinkPages
public void deleteAllLinkPages(int nPortletId) Remove all link pages from a specified portlet- Specified by:
deleteAllLinkPagesin interfaceILinkPagesPortletDAO- 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:
testDuplicatein interfaceILinkPagesPortletDAO- Parameters:
nPortletId- The identifier of the portletnLinkPageId- 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:
insertLinkPagein interfaceILinkPagesPortletDAO- Parameters:
nPortletId- The identifier of the portletnLinkPageId- The identifier of the link pagenOrder- The order of the portlet to insert
-