fr.paris.lutece.plugins.dbpage.business
Class DbPageDatabaseSectionHome

java.lang.Object
  extended by fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionHome

public final class DbPageDatabaseSectionHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for DbPageDatabaseSection objects


Method Summary
static int countNumberSections(int nDbPageId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the number of Sections in a DbPage
static DbPageDatabaseSection create(DbPageDatabaseSection dbPageDatabaseSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Creation of an instance of dbPageDatabaseSection
static DbPageDatabaseSection findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of a dbPageDatabaseSection whose identifier is specified in parameter
static java.util.List<DbPageDatabaseSection> findDbPageDatabaseSectionsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a list of dbPageDatabaseSections objects
static fr.paris.lutece.util.ReferenceList findOrderComboList(int nDbPageId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          This method allows to fetch a representation of the orders of a section in a dbpage
static java.util.List<DbPageDatabaseSection> findSectionsByPage(int nPageId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          This method is used to find the sections of a dbpage
static java.util.Collection<DbPageDatabaseSection> findSectionsByRoleKey(java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          This method is used to find the sections of a dbpage
static int getIdByOrder(int nPageId, int nItemOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Search the order of a section
static int getMaxIdByOrder(int nPageId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the maximum order on a page
static void getModifySectionOrder(int nPageId, int nNewOrder, int nIdSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the order of a section
static boolean isSectionInPage(java.lang.String strPageName, java.lang.String strSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
static void remove(int nDbPageDatabaseSectionId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the DbPageDatabaseSection whose identifier is specified in parameter
static void reorderSections(int nIdSection1, int nOrderSection1, int nIdSection2, int nOrderSection2, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Reorder two sections
static DbPageDatabaseSection update(DbPageDatabaseSection dbPageDatabaseSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update of the dbPageDatabaseSection which is specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static DbPageDatabaseSection create(DbPageDatabaseSection dbPageDatabaseSection,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Creation of an instance of dbPageDatabaseSection

Parameters:
plugin - The plugin object
dbPageDatabaseSection - The instance of the dbPageDatabaseSection which contains the informations to store
Returns:
The instance of dbPageDatabaseSection which has been created with its primary key.

update

public static DbPageDatabaseSection update(DbPageDatabaseSection dbPageDatabaseSection,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update of the dbPageDatabaseSection which is specified in parameter

Parameters:
plugin - The plugin object
dbPageDatabaseSection - The instance of the dbPageDatabaseSection which contains the data to store
Returns:
The instance of the dbPageDatabaseSection which has been updated

remove

public static void remove(int nDbPageDatabaseSectionId,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the DbPageDatabaseSection whose identifier is specified in parameter

Parameters:
plugin - The plugin object
nDbPageDatabaseSectionId - The DbPageDatabaseSection Id

findByPrimaryKey

public static DbPageDatabaseSection findByPrimaryKey(int nKey,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of a dbPageDatabaseSection whose identifier is specified in parameter

Parameters:
plugin - The plugin object
nKey - The Primary key of the dbPageDatabaseSection
Returns:
An instance of dbPageDatabaseSection

findDbPageDatabaseSectionsList

public static java.util.List<DbPageDatabaseSection> findDbPageDatabaseSectionsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a list of dbPageDatabaseSections objects

Parameters:
plugin - The plugin object
Returns:
A list of dbPageDatabaseSections

findSectionsByPage

public static java.util.List<DbPageDatabaseSection> findSectionsByPage(int nPageId,
                                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
This method is used to find the sections of a dbpage

Parameters:
nPageId - The id of the dbpage
plugin - The plugin object
Returns:
List of DbPageDatabaseSection

findSectionsByRoleKey

public static java.util.Collection<DbPageDatabaseSection> findSectionsByRoleKey(java.lang.String strRoleKey,
                                                                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
This method is used to find the sections of a dbpage

Parameters:
strRoleKey - The role key
plugin - The plugin object
Returns:
Collection of DbPageDatabaseSection

countNumberSections

public static int countNumberSections(int nDbPageId,
                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the number of Sections in a DbPage

Parameters:
plugin - The plugin
nDbPageId - The identifier of the DbPage
Returns:
The number of sections in the DbPage

findOrderComboList

public static fr.paris.lutece.util.ReferenceList findOrderComboList(int nDbPageId,
                                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
This method allows to fetch a representation of the orders of a section in a dbpage

Parameters:
nDbPageId - The dbPage identifier
plugin - The plugin object
Returns:
A list of sections representing the order

getModifySectionOrder

public static void getModifySectionOrder(int nPageId,
                                         int nNewOrder,
                                         int nIdSection,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the order of a section

Parameters:
plugin - The plugin object
nPageId - the identifier of the page
nNewOrder - the new number of order
nIdSection - the Identifier of a scetion

getIdByOrder

public static int getIdByOrder(int nPageId,
                               int nItemOrder,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Search the order of a section

Parameters:
plugin - The plugin object
nItemOrder - the number of orders of sections in the page
nPageId - the identifier of the page
Returns:
int the id by a given order

getMaxIdByOrder

public static int getMaxIdByOrder(int nPageId,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the maximum order on a page

Parameters:
plugin - The plugin object
nPageId - the identifier of the page
Returns:
int the id by a given order

reorderSections

public static void reorderSections(int nIdSection1,
                                   int nOrderSection1,
                                   int nIdSection2,
                                   int nOrderSection2,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Reorder two sections

Parameters:
nIdSection1 - The first section id
nOrderSection1 - first section order
nIdSection2 - second section id
nOrderSection2 - second section order
plugin - he plugin object

isSectionInPage

public static boolean isSectionInPage(java.lang.String strPageName,
                                      java.lang.String strSection,
                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)


Copyright © 2010 Mairie de Paris. All Rights Reserved.