Class CustomMenuItemDAO

java.lang.Object
fr.paris.lutece.plugins.menus.business.CustomMenuItemDAO
All Implemented Interfaces:
ICustomMenuItemDAO

@ApplicationScoped public final class CustomMenuItemDAO extends Object implements ICustomMenuItemDAO
This class provides Data Access methods for CustomMenuItem objects
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete a record from the table
    void
    deleteByMenuId(int nMenuId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete all items of a menu
    void
    deleteSubMenuItemBySubMenuId(int nMenuSourceId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete all subMenu item from all menu
    void
    insert(CustomMenuItem customMenuItem, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new record in the table.
    load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data from the table
    selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the customMenuItem objects and returns them as a collection
    selectAllIdsByMenuId(int nMenuId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the customMenuItem objects for a specific menu and returns their ids as a list
    selectByMenuId(int nMenuId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the customMenuItem objects for a specific menu and returns them as a list
    void
    store(CustomMenuItem customMenuItem, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update the record in the table

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomMenuItemDAO

      public CustomMenuItemDAO()
  • Method Details

    • insert

      public void insert(CustomMenuItem customMenuItem, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      Specified by:
      insert in interface ICustomMenuItemDAO
      Parameters:
      customMenuItem - instance of the CustomMenuItem object to insert
      plugin - the Plugin
    • load

      public CustomMenuItem load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      Specified by:
      load in interface ICustomMenuItemDAO
      Parameters:
      nKey - The identifier of the customMenuItem
      plugin - the Plugin
      Returns:
      The instance of the customMenuItem
    • delete

      public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      Specified by:
      delete in interface ICustomMenuItemDAO
      Parameters:
      nKey - The identifier of the CustomMenuItem to delete
      plugin - the Plugin
    • deleteByMenuId

      public void deleteByMenuId(int nMenuId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete all items of a menu
      Specified by:
      deleteByMenuId in interface ICustomMenuItemDAO
      Parameters:
      nMenuId - The identifier of the menu
      plugin - the Plugin
    • deleteSubMenuItemBySubMenuId

      public void deleteSubMenuItemBySubMenuId(int nMenuSourceId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Description copied from interface: ICustomMenuItemDAO
      Delete all subMenu item from all menu
      Specified by:
      deleteSubMenuItemBySubMenuId in interface ICustomMenuItemDAO
      plugin - the Plugin
    • store

      public void store(CustomMenuItem customMenuItem, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
      Specified by:
      store in interface ICustomMenuItemDAO
      Parameters:
      customMenuItem - the reference of the CustomMenuItem
      plugin - the Plugin
    • selectAll

      public List<CustomMenuItem> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the customMenuItem objects and returns them as a collection
      Specified by:
      selectAll in interface ICustomMenuItemDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The collection which contains the data of all the customMenuItem objects
    • selectByMenuId

      public List<CustomMenuItem> selectByMenuId(int nMenuId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the customMenuItem objects for a specific menu and returns them as a list
      Specified by:
      selectByMenuId in interface ICustomMenuItemDAO
      Parameters:
      nMenuId - The identifier of the menu
      plugin - the Plugin
      Returns:
      The list which contains the data of all the customMenuItem objects for the menu
    • selectAllIdsByMenuId

      public List<Integer> selectAllIdsByMenuId(int nMenuId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Description copied from interface: ICustomMenuItemDAO
      Load the data of all the customMenuItem objects for a specific menu and returns their ids as a list
      Specified by:
      selectAllIdsByMenuId in interface ICustomMenuItemDAO
      Parameters:
      nMenuId - The identifier of the menu
      Returns:
      The list which contains the id of all the customMenuItem objects for the menu