fr.paris.lutece.plugins.wiki.business
Class TopicVersionHome

java.lang.Object
  extended by 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
static TopicVersion create(TopicVersion topicVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create an instance of the topicVersion class
static Collection<TopicVersion> findAllVersions(int idTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find all versions
static TopicVersion findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of a topicVersion whose identifier is specified in parameter
static TopicVersion findLastVersion(int idTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find the last version
static Collection<TopicVersion> getTopicVersionsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the topicVersion objects and returns them in form of a collection
static void modifyContentOnly(int nTopicId, String strUserName, String strComment, String strContent, int nPreviousVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Modify the topic's content
static void remove(int nTopicVersionId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the topicVersion whose identifier is specified in parameter
static TopicVersion update(TopicVersion topicVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update of the topicVersion which is specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static TopicVersion create(TopicVersion topicVersion,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create an instance of the topicVersion class

Parameters:
topicVersion - The instance of the TopicVersion which contains the informations to store
plugin - the Plugin
Returns:
The instance of topicVersion which has been created with its primary key.

update

public static TopicVersion update(TopicVersion topicVersion,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update of the topicVersion which is specified in parameter

Parameters:
topicVersion - The instance of the TopicVersion which contains the data to store
plugin - the Plugin
Returns:
The instance of the topicVersion which has been updated

remove

public static void remove(int nTopicVersionId,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the topicVersion whose identifier is specified in parameter

Parameters:
nTopicVersionId - The topicVersion Id
plugin - the Plugin

findByPrimaryKey

public static TopicVersion findByPrimaryKey(int nKey,
                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of a topicVersion whose identifier is specified in parameter

Parameters:
nKey - The topicVersion primary key
plugin - the Plugin
Returns:
an instance of TopicVersion

getTopicVersionsList

public static Collection<TopicVersion> getTopicVersionsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the topicVersion objects and returns them in form of a collection

Parameters:
plugin - the Plugin
Returns:
the collection which contains the data of all the topicVersion objects

modifyContentOnly

public static void modifyContentOnly(int nTopicId,
                                     String strUserName,
                                     String strComment,
                                     String strContent,
                                     int nPreviousVersion,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Modify the topic's content

Parameters:
nTopicId - The topic ID
strUserName - The username
strComment - The comment
strContent - The content
nPreviousVersion - The prvious version
plugin - The plugin

findLastVersion

public static TopicVersion findLastVersion(int idTopic,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find the last version

Parameters:
idTopic - The topic id
plugin - The plugin
Returns:
The topic version

findAllVersions

public static Collection<TopicVersion> findAllVersions(int idTopic,
                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find all versions

Parameters:
idTopic - The topic id
plugin - The plugin
Returns:
A collection of topic version


Copyright © 2014 Mairie de Paris. All Rights Reserved.