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

java.lang.Object
  extended by fr.paris.lutece.plugins.wiki.business.TopicVersionDAO
All Implemented Interfaces:
ITopicVersionDAO

public final class TopicVersionDAO
extends java.lang.Object
implements ITopicVersionDAO

This class provides Data Access methods for TopicVersion objects


Constructor Summary
TopicVersionDAO()
           
 
Method Summary
 void delete(int nTopicVersionId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(TopicVersion topicVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 TopicVersion load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the topicVersion from the table
 java.util.Collection<TopicVersion> loadAllVersions(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 TopicVersion loadLastVersion(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 void modifyTopicVersion(int nTopicId, java.lang.String strUserName, java.lang.String strComment, java.lang.String strContent, int nPreviousVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 java.util.Collection<TopicVersion> selectTopicVersionsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the topicVersions and returns them as a collection
 void store(TopicVersion topicVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 insert
plugin - The plugin

load

public TopicVersion load(int nId,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the topicVersion from the table

Specified by:
load in interface ITopicVersionDAO
Parameters:
nId - The identifier of the topicVersion
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 - The identifier of the topicVersion
plugin - The plugin

store

public void store(TopicVersion topicVersion,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
store in interface ITopicVersionDAO
Parameters:
topicVersion - The reference of the topicVersion
plugin - The plugin

selectTopicVersionsList

public java.util.Collection<TopicVersion> selectTopicVersionsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the topicVersions 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 topicVersions

modifyTopicVersion

public void modifyTopicVersion(int nTopicId,
                               java.lang.String strUserName,
                               java.lang.String strComment,
                               java.lang.String strContent,
                               int nPreviousVersion,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
modifyTopicVersion in interface ITopicVersionDAO

loadLastVersion

public TopicVersion loadLastVersion(int nIdTopic,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
loadLastVersion in interface ITopicVersionDAO

loadAllVersions

public java.util.Collection<TopicVersion> loadAllVersions(int nIdTopic,
                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
loadAllVersions in interface ITopicVersionDAO


Copyright © 2011 Mairie de Paris. All Rights Reserved.