Class TopicVersionHome


  • public final class TopicVersionHome
    extends Object
    This class provides instances management methods (create, find, ...) for TopicVersion objects
    • Method Detail

      • create

        public static TopicVersion create​(TopicVersion topicVersion)
        Create an instance of the topicVersion class
        Parameters:
        topicVersion - The instance of the TopicVersion which contains the informations to store
        Returns:
        The instance of topicVersion which has been created with its primary key.
      • remove

        public static void remove​(int nTopicVersionId)
        Remove the topicVersion whose identifier is specified in parameter
        Parameters:
        nTopicVersionId - The topicVersion Id
      • findByPrimaryKey

        public static TopicVersion findByPrimaryKey​(int nKey)
        Returns an instance of a topicVersion whose identifier is specified in parameter
        Parameters:
        nKey - The topicVersion primary key
        Returns:
        an instance of TopicVersion
      • getTopicVersionsList

        public static Collection<TopicVersion> getTopicVersionsList()
        Load the data of all the topicVersion objects and returns them in form of a collection
        Returns:
        the collection which contains the data of all the topicVersion objects
      • addTopicVersion

        public static void addTopicVersion​(TopicVersion topicVersion)
        Modify the topic's content
        Parameters:
        topicVersion - The topic version
      • findLastVersion

        public static TopicVersion findLastVersion​(int idTopic)
        Find the last version
        Parameters:
        idTopic - The topic id
        Returns:
        The topic version
      • findAllVersions

        public static Collection<TopicVersion> findAllVersions​(int idTopic)
        Find all versions
        Parameters:
        idTopic - The topic id
        Returns:
        A collection of topic version
      • updateTopicVersion

        public static void updateTopicVersion​(TopicVersion topicVersion)
        Overwrite the topic's version
        Parameters:
        topicVersion - The topicVersion id
      • getPublishedVersion

        public static TopicVersion getPublishedVersion​(int topicId)
        Get the published version of a topic
        Parameters:
        topicId - The topic id
        Returns:
        void
      • updatePublishedVersion

        public static void updatePublishedVersion​(int idVersion,
                                                  boolean isPublished)
        Update the published version of a topic
        Parameters:
        idVersion - The topic version id
        isPublished - The published status
      • getPageNameFromTitle

        public static String getPageNameFromTitle​(String pageTitle,
                                                  String locale)
        Get the page_name with the page_title
        Parameters:
        pageTitle - The page title
        locale - The locale
        Returns:
        the page name