Class WikiItemDAO

java.lang.Object
fr.paris.lutece.plugins.wiki.business.item.WikiItemDAO
All Implemented Interfaces:
IWikiItemDAO

@ApplicationScoped public class WikiItemDAO extends Object implements IWikiItemDAO
  • Constructor Details

    • WikiItemDAO

      public WikiItemDAO()
  • Method Details

    • insert

      public void insert(AbstractWikiItem wikiItem, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new wiki item
      Specified by:
      insert in interface IWikiItemDAO
      Parameters:
      wikiItem - the wiki item to insert
      plugin - the plugin
    • load

      public Optional<AbstractWikiItem> load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load a wiki item by its key
      Specified by:
      load in interface IWikiItemDAO
      Parameters:
      nKey - the wiki item key
      plugin - the plugin
      Returns:
      an Optional containing the wiki item if found, empty otherwise
    • delete

      public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a wiki item by its key
      Specified by:
      delete in interface IWikiItemDAO
      Parameters:
      nKey - the wiki item key
      plugin - the plugin
    • store

      public void store(AbstractWikiItem wikiItem, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update an existing wiki item
      Specified by:
      store in interface IWikiItemDAO
      Parameters:
      wikiItem - the wiki item to update
      plugin - the plugin
    • selectWikiItemsByType

      public List<AbstractWikiItem> selectWikiItemsByType(WikiItemType type, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Select all wiki items by type
      Specified by:
      selectWikiItemsByType in interface IWikiItemDAO
      Parameters:
      type - the wiki item type
      plugin - the plugin
      Returns:
      the list of wiki items matching the type
    • selectWikiItemsByParent

      public List<AbstractWikiItem> selectWikiItemsByParent(int nIdParent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Select all wiki items by parent id
      Specified by:
      selectWikiItemsByParent in interface IWikiItemDAO
      Parameters:
      nIdParent - the parent id
      plugin - the plugin
      Returns:
      the list of wiki items having the specified parent
    • selectWikiItemsByParentAndType

      public List<AbstractWikiItem> selectWikiItemsByParentAndType(int nIdParent, WikiItemType type, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Select all wiki items by parent id and type
      Specified by:
      selectWikiItemsByParentAndType in interface IWikiItemDAO
      Parameters:
      nIdParent - the parent id
      type - the wiki item type
      plugin - the plugin
      Returns:
      the list of wiki items matching the parent and type
    • selectByCode

      public Optional<AbstractWikiItem> selectByCode(String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Select a wiki item by its code
      Specified by:
      selectByCode in interface IWikiItemDAO
      Parameters:
      strCode - the wiki item code
      plugin - the plugin
      Returns:
      an Optional containing the wiki item if found, empty otherwise
    • selectWikiItemsByParentIds

      public List<AbstractWikiItem> selectWikiItemsByParentIds(List<Integer> listParentIds, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Select all wiki items whose parent id is in the given list
      Specified by:
      selectWikiItemsByParentIds in interface IWikiItemDAO
      Parameters:
      listParentIds - the list of parent ids
      plugin - the plugin
      Returns:
      the list of wiki items having a parent in the specified list
    • selectWikiItemsByIds

      public List<AbstractWikiItem> selectWikiItemsByIds(List<Integer> listIds, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Select all wiki items whose primary key is in the given list
      Specified by:
      selectWikiItemsByIds in interface IWikiItemDAO
      Parameters:
      listIds - the list of wiki item ids
      plugin - the plugin
      Returns:
      the list of wiki items matching the given ids