Class TopicVersionHome
- java.lang.Object
-
- fr.paris.lutece.plugins.wiki.business.TopicVersionHome
-
public final class TopicVersionHome extends Object
This class provides instances management methods (create, find, ...) for TopicVersion objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddTopicVersion(TopicVersion topicVersion)Modify the topic's contentstatic TopicVersioncreate(TopicVersion topicVersion)Create an instance of the topicVersion classstatic Collection<TopicVersion>findAllVersions(int idTopic)Find all versionsstatic TopicVersionfindByPrimaryKey(int nKey)Returns an instance of a topicVersion whose identifier is specified in parameterstatic TopicVersionfindLastVersion(int idTopic)Find the last versionstatic StringgetPageNameFromTitle(String pageTitle, String locale)Get the page_name with the page_titlestatic TopicVersiongetPublishedVersion(int topicId)Get the published version of a topicstatic Collection<TopicVersion>getTopicVersionsList()Load the data of all the topicVersion objects and returns them in form of a collectionstatic voidremove(int nTopicVersionId)Remove the topicVersion whose identifier is specified in parameterstatic voidupdatePublishedVersion(int idVersion, boolean isPublished)Update the published version of a topicstatic voidupdateTopicVersion(TopicVersion topicVersion)Overwrite the topic's version
-
-
-
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 idisPublished- The published status
-
-