fr.paris.lutece.portal.business.page
Class PageDAO

java.lang.Object
  extended by fr.paris.lutece.portal.business.page.PageDAO
All Implemented Interfaces:
IPageDAO

public final class PageDAO
extends java.lang.Object
implements IPageDAO

This class porvides Data Access methods for Page objects


Constructor Summary
PageDAO()
           
 
Method Summary
 boolean checkPageExist(int nPageId)
          Tests if page exist
 void delete(int nPageId)
          Delete a record from the table
 java.util.Collection<Page> getPagesByRoleKey(java.lang.String strRoleKey)
          Return the list of all the pages filtered by Lutece Role specified in parameter
 ReferenceList getPagesList()
          Load the Referencelist of documentTypes
 void insert(Page page)
          Insert a new record in the table.
 void invalidatePage(int nPageId)
          Invalidate the page after a modification
 Page load(int nPageId, boolean bPortlets)
          load the data of Level from the table
 ImageResource loadImageResource(int nIdPage)
          Load a image corresponding to an Page
 Page loadPageByIdPortlet(int nPorletId)
          load a page associated to a portlet
 java.util.List<Page> selectAllPages()
          Loads all the pages for a portal
 java.util.Collection<Page> selectChildPages(int nParentPageId)
          Select all the child pages for a page which is specified in parameter
 int selectNewChildPageOrder(int nParentPageId)
          Search the last order of child page list
 void store(Page page)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageDAO

public PageDAO()
Method Detail

insert

public void insert(Page page)
Insert a new record in the table.

Specified by:
insert in interface IPageDAO
Parameters:
page - The Page object

load

public Page load(int nPageId,
                 boolean bPortlets)
load the data of Level from the table

Specified by:
load in interface IPageDAO
Parameters:
nPageId - The indentifier of the object Page
bPortlets - The boolean
Returns:
The Instance of the object Page

loadPageByIdPortlet

public Page loadPageByIdPortlet(int nPorletId)
load a page associated to a portlet

Specified by:
loadPageByIdPortlet in interface IPageDAO
Parameters:
nPorletId - The indentifier of the object portlet associate to the page
Returns:
The Instance of the object Page

delete

public void delete(int nPageId)
Delete a record from the table

Specified by:
delete in interface IPageDAO
Parameters:
nPageId - The indentifier of the object nPageId

store

public void store(Page page)
Update the record in the table

Specified by:
store in interface IPageDAO
Parameters:
page - The instance of the page to update

selectChildPages

public java.util.Collection<Page> selectChildPages(int nParentPageId)
Select all the child pages for a page which is specified in parameter

Specified by:
selectChildPages in interface IPageDAO
Parameters:
nParentPageId - The parent page identifier
Returns:
The list of objects Page (without portlets list)

selectAllPages

public java.util.List<Page> selectAllPages()
Loads all the pages for a portal

Specified by:
selectAllPages in interface IPageDAO
Returns:
The pages of the current portal (without portlets list, of course !)

invalidatePage

public void invalidatePage(int nPageId)
Invalidate the page after a modification

Specified by:
invalidatePage in interface IPageDAO
Parameters:
nPageId - the page identifier

getPagesList

public ReferenceList getPagesList()
Load the Referencelist of documentTypes

Specified by:
getPagesList in interface IPageDAO
Returns:
listDocumentTypes

getPagesByRoleKey

public java.util.Collection<Page> getPagesByRoleKey(java.lang.String strRoleKey)
Return the list of all the pages filtered by Lutece Role specified in parameter

Specified by:
getPagesByRoleKey in interface IPageDAO
Parameters:
strRoleKey - The Lutece Role key
Returns:
a collection of pages

selectNewChildPageOrder

public int selectNewChildPageOrder(int nParentPageId)
Search the last order of child page list

Specified by:
selectNewChildPageOrder in interface IPageDAO
Parameters:
nParentPageId - The parent page Id
Returns:
The new page order

loadImageResource

public ImageResource loadImageResource(int nIdPage)
Load a image corresponding to an Page

Specified by:
loadImageResource in interface IPageDAO
Parameters:
nIdPage - The Page Id
Returns:
the instance of the ImageContent

checkPageExist

public boolean checkPageExist(int nPageId)
Tests if page exist

Specified by:
checkPageExist in interface IPageDAO
Parameters:
nPageId - The identifier of the document
Returns:
true if the page existed, false otherwise


Copyright © 2009 Mairie de Paris. All Rights Reserved.