Class TopicVersionDAO

    • Constructor Detail

      • TopicVersionDAO

        public TopicVersionDAO()
    • 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​(TopicVersion topicVersion,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert a new record in the table.
        Specified by:
        insert in interface ITopicVersionDAO
        Parameters:
        topicVersion - instance of the TopicVersion object to inssert
        plugin - the Plugin
      • load

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

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

        public void deleteByTopic​(int nTopicId,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove all topicVersions for a given topic
        Specified by:
        deleteByTopic in interface ITopicVersionDAO
        Parameters:
        nTopicId - The Topic Id
        plugin - the Plugin
      • selectTopicVersionsList

        public Collection<TopicVersion> selectTopicVersionsList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the topicVersion objects and returns them as a collection
        Specified by:
        selectTopicVersionsList in interface ITopicVersionDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The collection which contains the data of all the topicVersion objects
      • addTopicVersion

        public void addTopicVersion​(TopicVersion topicVersion,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Modify the topic version
        Specified by:
        addTopicVersion in interface ITopicVersionDAO
        Parameters:
        topicVersion - The topic version
        plugin - The plugin
      • loadLastVersion

        public TopicVersion loadLastVersion​(int nIdTopic,
                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load last version
        Specified by:
        loadLastVersion in interface ITopicVersionDAO
        Parameters:
        nIdTopic - The topic ID
        plugin - The plugin
        Returns:
        The topic version
      • loadAllVersions

        public Collection<TopicVersion> loadAllVersions​(int nIdTopic,
                                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load all versions
        Specified by:
        loadAllVersions in interface ITopicVersionDAO
        Parameters:
        nIdTopic - The topic id
        plugin - The plugin
        Returns:
        The list of topics