Class PortletTemplateDAO

java.lang.Object
fr.paris.lutece.portal.business.portlet.PortletTemplateDAO
All Implemented Interfaces:
IPortletTemplateDAO

@ApplicationScoped public final class PortletTemplateDAO extends Object implements IPortletTemplateDAO
Data access of the portlet templates
  • Constructor Details

    • PortletTemplateDAO

      public PortletTemplateDAO()
  • Method Details

    • insert

      public void insert(PortletTemplate template)
      Inserts a template and sets its generated identifier
      Specified by:
      insert in interface IPortletTemplateDAO
      Parameters:
      template - the template
    • store

      public void store(PortletTemplate template)
      Updates a template
      Specified by:
      store in interface IPortletTemplateDAO
      Parameters:
      template - the template
    • delete

      public void delete(int nIdTemplate)
      Deletes a template
      Specified by:
      delete in interface IPortletTemplateDAO
      Parameters:
      nIdTemplate - the template identifier
    • load

      public PortletTemplate load(int nIdTemplate)
      Loads a template
      Specified by:
      load in interface IPortletTemplateDAO
      Parameters:
      nIdTemplate - the template identifier
      Returns:
      the template, null when it does not exist
    • selectAll

      public List<PortletTemplate> selectAll()
      Loads every template
      Specified by:
      selectAll in interface IPortletTemplateDAO
      Returns:
      the templates, ordered by portlet type then identifier
    • selectByPortletType

      public List<PortletTemplate> selectByPortletType(String strPortletTypeId)
      Loads the templates registered for a portlet type
      Specified by:
      selectByPortletType in interface IPortletTemplateDAO
      Parameters:
      strPortletTypeId - the portlet type identifier
      Returns:
      the templates, ordered by identifier
    • selectByPrimaryKeyList

      public List<PortletTemplate> selectByPrimaryKeyList(List<Integer> listIdTemplates)
      Loads the templates whose identifiers are given
      Specified by:
      selectByPrimaryKeyList in interface IPortletTemplateDAO
      Parameters:
      listIdTemplates - the template identifiers
      Returns:
      the templates, ordered by portlet type then identifier
    • selectAllIds

      public List<Integer> selectAllIds()
      Loads the identifiers of every template
      Specified by:
      selectAllIds in interface IPortletTemplateDAO
      Returns:
      the identifiers, ordered by portlet type then identifier
    • selectIdsByPortletType

      public List<Integer> selectIdsByPortletType(String strPortletTypeId)
      Loads the identifiers of the templates registered for a portlet type
      Specified by:
      selectIdsByPortletType in interface IPortletTemplateDAO
      Parameters:
      strPortletTypeId - the portlet type identifier
      Returns:
      the identifiers, ordered by identifier
    • checkTemplateIsUsed

      public boolean checkTemplateIsUsed(int nIdTemplate)
      Tells whether at least one portlet uses a template
      Specified by:
      checkTemplateIsUsed in interface IPortletTemplateDAO
      Parameters:
      nIdTemplate - the template identifier
      Returns:
      true when a portlet uses the template