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

java.lang.Object
  extended by fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionDAO
All Implemented Interfaces:
IDbPageDatabaseSectionDAO

public final class DbPageDatabaseSectionDAO
extends java.lang.Object
implements IDbPageDatabaseSectionDAO

This class provides Data Access methods for DbPageDatabaseSection objects


Constructor Summary
DbPageDatabaseSectionDAO()
           
 
Method Summary
 int countSections(int nDbPageId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Calculates the number of sections in a page
 void delete(int nDbPageDatabaseSectionId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void getModifySectionOrder(int nPageId, int nNewOrder, int nIdSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Modify the order of a section
 void insert(DbPageDatabaseSection dbPageDatabaseSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 boolean isSectionInPage(java.lang.String strPageName, java.lang.String strSectionTitle, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Calculates the number of section having the same title
 DbPageDatabaseSection load(int nDbPageDatabaseSectionId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of DbPageDatabaseSection from the table
 java.util.List<DbPageDatabaseSection> loadSectionsByPageId(int nDbPageId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the sections related to a page
 java.util.Collection<DbPageDatabaseSection> loadSectionsByRoleKey(java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          This method is used to find the sections of a dbpage
 void reorderSections(int nIdSection1, int nOrderSection1, int nIdSection2, int nOrderSection2, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 java.util.List<DbPageDatabaseSection> selectDbPageDatabaseSectionList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of dbPageDatabaseSections by page
 int selectIdByOrder(int nPageId, int nSectionOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the identifier of a section in a distinct order
 int selectMaxIdOrder(int nPageId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the highest order on a page
 fr.paris.lutece.util.ReferenceList selectOrderList(int nPageId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of orders
 void store(DbPageDatabaseSection dbPageDatabaseSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          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

DbPageDatabaseSectionDAO

public DbPageDatabaseSectionDAO()
Method Detail

insert

public void insert(DbPageDatabaseSection dbPageDatabaseSection,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IDbPageDatabaseSectionDAO
Parameters:
dbPageDatabaseSection - The dbPageDatabaseSection object
plugin - The plugin

load

public DbPageDatabaseSection load(int nDbPageDatabaseSectionId,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of DbPageDatabaseSection from the table

Specified by:
load in interface IDbPageDatabaseSectionDAO
Parameters:
plugin - The plugin
nDbPageDatabaseSectionId - The identifier of DbPageDatabaseSection
Returns:
the instance of the DbPageDatabaseSection

loadSectionsByPageId

public java.util.List<DbPageDatabaseSection> loadSectionsByPageId(int nDbPageId,
                                                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the sections related to a page

Specified by:
loadSectionsByPageId in interface IDbPageDatabaseSectionDAO
Parameters:
plugin - The plugin
nDbPageId - The identifier of DbPageDatabase
Returns:
the A List of the DbPageDatabaseSections

loadSectionsByRoleKey

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

Specified by:
loadSectionsByRoleKey in interface IDbPageDatabaseSectionDAO
Parameters:
strRoleKey - The role key
plugin - The plugin object
Returns:
Collection of DbPageDatabaseSection

delete

public void delete(int nDbPageDatabaseSectionId,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Specified by:
delete in interface IDbPageDatabaseSectionDAO
Parameters:
plugin - The plugin
nDbPageDatabaseSectionId - The DbPageDatabaseSection Id

store

public void store(DbPageDatabaseSection dbPageDatabaseSection,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
store in interface IDbPageDatabaseSectionDAO
Parameters:
plugin - The plugin
dbPageDatabaseSection - The reference of dbPageDatabaseSection

selectDbPageDatabaseSectionList

public java.util.List<DbPageDatabaseSection> selectDbPageDatabaseSectionList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of dbPageDatabaseSections by page

Specified by:
selectDbPageDatabaseSectionList in interface IDbPageDatabaseSectionDAO
Parameters:
plugin - The plugin
Returns:
The List of the DbPageDatabaseSections

countSections

public int countSections(int nDbPageId,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Calculates the number of sections in a page

Specified by:
countSections in interface IDbPageDatabaseSectionDAO
Parameters:
nDbPageId - The id of the page
plugin - The plugin
Returns:
The number of sections

isSectionInPage

public boolean isSectionInPage(java.lang.String strPageName,
                               java.lang.String strSectionTitle,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Calculates the number of section having the same title

Specified by:
isSectionInPage in interface IDbPageDatabaseSectionDAO
Parameters:
nDbPageId - The id of the page
plugin - The plugin
Returns:
The number of sections

selectOrderList

public fr.paris.lutece.util.ReferenceList selectOrderList(int nPageId,
                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of orders

Specified by:
selectOrderList in interface IDbPageDatabaseSectionDAO
Parameters:
plugin - The plugin
nPageId - The identifier of the page
Returns:
The ReferenceList of the Orders

getModifySectionOrder

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

Specified by:
getModifySectionOrder in interface IDbPageDatabaseSectionDAO
Parameters:
nPageId - The Page identifier
nNewOrder - The order number
nIdSection - The Section identifier
plugin - The plugin

selectIdByOrder

public int selectIdByOrder(int nPageId,
                           int nSectionOrder,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the identifier of a section in a distinct order

Specified by:
selectIdByOrder in interface IDbPageDatabaseSectionDAO
Parameters:
nPageId - The identifier of the page
nSectionOrder - The order number
plugin - The plugin
Returns:
The order of the Section

selectMaxIdOrder

public int selectMaxIdOrder(int nPageId,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the highest order on a page

Specified by:
selectMaxIdOrder in interface IDbPageDatabaseSectionDAO
Parameters:
nPageId - The identifier of the page
plugin - The plugin
Returns:
The order of the Section

reorderSections

public void reorderSections(int nIdSection1,
                            int nOrderSection1,
                            int nIdSection2,
                            int nOrderSection2,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
reorderSections in interface IDbPageDatabaseSectionDAO
Parameters:
nIdSection1 - the section order
nOrderSection1 - the section order
nIdSection2 - the section order
nOrderSection2 - the section order
plugin - The plugin


Copyright © 2010 Mairie de Paris. All Rights Reserved.