Class AbstractSubjectHome

java.lang.Object
fr.paris.lutece.plugins.helpdesk.business.AbstractSubjectHome
All Implemented Interfaces:
AbstractSubjectHomeInterface
Direct Known Subclasses:
SubjectHome, ThemeHome

public abstract class AbstractSubjectHome extends Object implements AbstractSubjectHomeInterface
This class provides instances management methods (create, find, ...) for AbstractSubject objects
  • Field Details

  • Constructor Details

    • AbstractSubjectHome

      public AbstractSubjectHome()
  • Method Details

    • create

      public AbstractSubject create(AbstractSubject abstractSubject, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Creation of an instance of an article AbstractSubject
      Parameters:
      abstractSubject - An instance of the AbstractSubject which contains the informations to store
      nIdFaq - The Faq Id
      plugin - The current plugin using this method
      Returns:
      The instance of the AbstractSubject which has been created
    • update

      public AbstractSubject update(AbstractSubject abstractSubject, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Updates of the AbstractSubject instance specified in parameter
      Parameters:
      abstractSubject - An instance of the AbstractSubject which contains the informations to store
      nIdFaq - The Faq Id
      plugin - The current plugin using this method
      Returns:
      The instance of the AbstractSubject which has been updated.
    • remove

      public void remove(int nIdAbstractSubject, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Deletes the AbstractSubject instance whose identifier is specified in parameter
      Parameters:
      nIdAbstractSubject - The identifier of the article AbstractSubject to delete in the database
      nIdFaq - The Faq Id
      plugin - The current plugin using this method
    • findByPrimaryKey

      public AbstractSubject findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns an instance of the AbstractSubject whose identifier is specified in parameter
      Parameters:
      nKey - The primary key of the AbstractSubject to find in the database
      plugin - The current plugin using this method
      Returns:
      An instance of the AbstractSubject which corresponds to the key
    • findAll

      public List<? extends AbstractSubject> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns AbstractSubject list
      Parameters:
      plugin - The current plugin using this method
      Returns:
      the list of the AbstractSubject of the database in form of a Subject Collection object
    • findByIdParent

      public Collection<? extends AbstractSubject> findByIdParent(int nIdParent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Finds all AbstractSubject specified by the parent id
      Parameters:
      nIdParent - The parent AbstractSubject id
      plugin - The Plugin using this data access service
      Returns:
      A collection of AbstractSubject
    • findByIdFaq

      public Collection<? extends AbstractSubject> findByIdFaq(int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Finds all Subject specified by the Faq id
      Parameters:
      nIdFaq - The faq subject id
      plugin - The Plugin using this data access service
      Returns:
      A collection of Subject
    • findByOrder

      public AbstractSubject findByOrder(int nIdParent, int nOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns an instance of the AbstractSubject whose identifier is specified in parameter
      Parameters:
      nIdParent - The primary key of the parent AbstractSubject
      nOrder - The order id
      plugin - The current plugin using this method
      Returns:
      An instance of the AbstractSubject which corresponds to the parent id and order id
    • findByFaqOrder

      public AbstractSubject findByFaqOrder(int nIdFaq, int nOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns an instance of the AbstractSubject whose identifier is specified in parameter
      Parameters:
      nIdFaq - The primary key of the faq AbstractSubject
      nOrder - The order id
      plugin - The current plugin using this method
      Returns:
      An instance of the AbstractSubject which corresponds to the faq id and order id
    • getMaxOrder

      public int getMaxOrder(int nIdParent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the max order of a parent AbstractSubject
      Parameters:
      nIdParent - The id of the parent AbstractSubject
      plugin - The Plugin
      Returns:
      the max order
    • goDown

      public void goDown(int nId, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Move down an AbstractSubject into the list
      Parameters:
      nId - The id of the AbstractSubject
      nIdFaq - The Faq Id
      plugin - The plugin
    • goUp

      public void goUp(int nId, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Move up an AbstractSubject into the list
      Parameters:
      nId - The id of the AbstractSubject
      nIdFaq - The Faq Id
      plugin - The plugin
    • goIn

      public void goIn(int nId, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Set the AbstractSubject into another parent AbstractSubject
      Parameters:
      nId - The AbstractSubject to move
      nIdFaq - The Faq Id
      plugin - The plugin
    • goOut

      public void goOut(int nId, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Set the AbstractSubject out of another parent AbstractSubject
      Parameters:
      nId - The AbstractSubject to move
      nIdFaq - The Faq Id
      plugin - The plugin
    • createLinkToFaq

      public void createLinkToFaq(int nIdAbstractSubject, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Create a new record in the table.
      Parameters:
      nIdAbstractSubject - The id of the object Subject
      nIdFaq - The parent id of the object Faq
      plugin - The Plugin using this data access service
    • removeLinkToFaq

      public void removeLinkToFaq(int nIdAbstractSubject, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove a record in the table.
      Parameters:
      nIdAbstractSubject - The id of the object Subject
      nIdFaq - The parent id of the object Faq
      plugin - The Plugin using this data access service
    • removeAllLinksToFaq

      public void removeAllLinksToFaq(int nIdAbstractSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove a record in the table.
      Parameters:
      nIdAbstractSubject - The id of the object Subject
      plugin - The Plugin using this data access service