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 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 from the table
 Topic load(String strTopicName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load a topic
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 Collection<Topic> selectTopicsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the topic objects 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 inssert
plugin - the Plugin

load

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

Specified by:
load in interface ITopicDAO
Parameters:
nId - The key
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 - int identifier of the Topic to delete
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 Collection<Topic> selectTopicsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the topic objects 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 topic objects

load

public Topic load(String strTopicName,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load a topic

Specified by:
load in interface ITopicDAO
Parameters:
strTopicName - The topic name
plugin - The plugin
Returns:
The topic


Copyright © 2014 Mairie de Paris. All Rights Reserved.