Class TopicDAO

  • All Implemented Interfaces:
    ITopicDAO

    public final class TopicDAO
    extends Object
    implements ITopicDAO
    This class provides Data Access methods for Topic objects
    • Constructor Summary

      Constructors 
      Constructor Description
      TopicDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      void insert​(Topic topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      Topic load​(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      Topic load​(String strTopicName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load a topic
      int newPrimaryKey​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Generates a new primary key
      Collection<Topic> selectTopicsList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the topic objects and returns them as a collection
      void store​(Topic topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
    • Constructor Detail

      • TopicDAO

        public TopicDAO()
    • Method Detail

      • newPrimaryKey

        public int newPrimaryKey​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Generates a new primary key
        Parameters:
        plugin - The Plugin
        Returns:
        The new primary key
      • insert

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

        public Topic load​(int nId,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data from the table
        Specified by:
        load in interface ITopicDAO
        Parameters:
        nId - The key
        plugin - the Plugin
        Returns:
        The instance of the topic
      • delete

        public void delete​(int nTopicId,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete a record from the table
        Specified by:
        delete in interface ITopicDAO
        Parameters:
        nTopicId - int identifier of the Topic to delete
        plugin - the Plugin
      • store

        public void store​(Topic topic,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update the record in the table
        Specified by:
        store in interface ITopicDAO
        Parameters:
        topic - the reference of the Topic
        plugin - the Plugin
      • selectTopicsList

        public Collection<Topic> selectTopicsList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the topic objects and returns them as a collection
        Specified by:
        selectTopicsList in interface ITopicDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The collection which contains the data of all the topic objects
      • load

        public Topic load​(String strTopicName,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load a topic
        Specified by:
        load in interface ITopicDAO
        Parameters:
        strTopicName - The topic name
        plugin - The plugin
        Returns:
        The topic