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

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

public final class TopicDAO
extends java.lang.Object
implements ITopicDAO

This class provides Data Access methods for Topic objects


Constructor Summary
TopicDAO()
           
 
Method Summary
 void delete(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(Topic topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Topic load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the topic from the table
 Topic load(java.lang.String strTopicName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 void modify(java.lang.String strTopicName, java.lang.String strContent, 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<Topic> selectTopicsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the topics and returns them as a collection
 void store(Topic topic, 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

TopicDAO

public TopicDAO()
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(Topic topic,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface ITopicDAO
Parameters:
topic - instance of the Topic object to insert
plugin - The plugin

load

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

Specified by:
load in interface ITopicDAO
Parameters:
nId - The identifier of the topic
plugin - The plugin
Returns:
the instance of the Topic

delete

public void delete(int nTopicId,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Specified by:
delete in interface ITopicDAO
Parameters:
nTopicId - The identifier of the topic
plugin - The plugin

store

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

Specified by:
store in interface ITopicDAO
Parameters:
topic - The reference of the topic
plugin - The plugin

selectTopicsList

public java.util.Collection<Topic> selectTopicsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the topics and returns them as a collection

Specified by:
selectTopicsList in interface ITopicDAO
Parameters:
plugin - The plugin
Returns:
The Collection which contains the data of all the topics

load

public Topic load(java.lang.String strTopicName,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
load in interface ITopicDAO

modify

public void modify(java.lang.String strTopicName,
                   java.lang.String strContent,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
modify in interface ITopicDAO


Copyright © 2011 Mairie de Paris. All Rights Reserved.