Class TopicDAO

  • All Implemented Interfaces:
    ITopicDAO

    public final class TopicDAO
    extends Object
    implements ITopicDAO
    This class provides Data Access methods for Topic objects
    • 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
      • loadByName

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

        public void updateLastEditAttempt​(int nIdTopic,
                                          String strLuteceUserName)
        Description copied from interface: ITopicDAO
        UPDATE wiki_last_edits
        Specified by:
        updateLastEditAttempt in interface ITopicDAO
        Parameters:
        nIdTopic - The IdTopic
        strLuteceUserName - The LuteceUserId
      • getLastEditAttempt

        public Map getLastEditAttempt​(int nIdTopic)
        Description copied from interface: ITopicDAO
        Get the last edit attempt
        Specified by:
        getLastEditAttempt in interface ITopicDAO
        Parameters:
        nIdTopic - The topic id
        Returns:
        The last edit attempt