Class TopicVersionDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.wiki.business.TopicVersionDAO
-
- All Implemented Interfaces:
ITopicVersionDAO
public final class TopicVersionDAO extends Object implements ITopicVersionDAO
This class provides Data Access methods for TopicVersion objects
-
-
Constructor Summary
Constructors Constructor Description TopicVersionDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTopicVersion(TopicVersion topicVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)Modify the topic versionvoiddelete(int nTopicVersionId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tablevoiddeleteByTopic(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all topicVersions for a given topicvoidinsert(TopicVersion topicVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.TopicVersionload(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the tableCollection<TopicVersion>loadAllVersions(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load all versionsTopicVersionloadLastVersion(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load last versionintnewPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)Generates a new primary keyCollection<TopicVersion>selectTopicVersionsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the topicVersion objects and returns them as a collection
-
-
-
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:
insertin interfaceITopicVersionDAO- Parameters:
topicVersion- instance of the TopicVersion object to inssertplugin- the Plugin
-
load
public TopicVersion load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table- Specified by:
loadin interfaceITopicVersionDAO- Parameters:
nId- The keyplugin- 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:
deletein interfaceITopicVersionDAO- Parameters:
nTopicVersionId- int identifier of the TopicVersion to deleteplugin- 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:
deleteByTopicin interfaceITopicVersionDAO- Parameters:
nTopicId- The Topic Idplugin- 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:
selectTopicVersionsListin interfaceITopicVersionDAO- 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:
addTopicVersionin interfaceITopicVersionDAO- Parameters:
topicVersion- The topic versionplugin- The plugin
-
loadLastVersion
public TopicVersion loadLastVersion(int nIdTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load last version- Specified by:
loadLastVersionin interfaceITopicVersionDAO- Parameters:
nIdTopic- The topic IDplugin- 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:
loadAllVersionsin interfaceITopicVersionDAO- Parameters:
nIdTopic- The topic idplugin- The plugin- Returns:
- The list of topics
-
-