Class TopicDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.wiki.business.TopicDAO
-
-
Constructor Summary
Constructors Constructor Description TopicDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tableMapgetLastEditAttempt(int nIdTopic)Get the last edit attemptvoidinsert(Topic topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.Topicload(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the tableTopicloadByName(String strTopicName, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load a topicintnewPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)Generates a new primary keyCollection<Topic>selectTopicsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the topic objects and returns them as a collectionvoidsetChildrenToEmptyParent(String strPageTitle)Set children to empty parentvoidstore(Topic topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the record in the tablevoidupdateLastEditAttempt(int nIdTopic, String strLuteceUserName)UPDATE wiki_last_edits
-
-
-
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.
-
load
public Topic load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table
-
delete
public void delete(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table
-
store
public void store(Topic topic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table
-
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:
selectTopicsListin interfaceITopicDAO- Parameters:
plugin- the Plugin- Returns:
- The collection which contains the data of all the topic objects
-
loadByName
public Topic loadByName(String strTopicName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load a topic- Specified by:
loadByNamein interfaceITopicDAO- Parameters:
strTopicName- The topic nameplugin- The plugin- Returns:
- The topic
-
updateLastEditAttempt
public void updateLastEditAttempt(int nIdTopic, String strLuteceUserName)Description copied from interface:ITopicDAOUPDATE wiki_last_edits- Specified by:
updateLastEditAttemptin interfaceITopicDAO- Parameters:
nIdTopic- The IdTopicstrLuteceUserName- The LuteceUserId
-
getLastEditAttempt
public Map getLastEditAttempt(int nIdTopic)
Description copied from interface:ITopicDAOGet the last edit attempt- Specified by:
getLastEditAttemptin interfaceITopicDAO- Parameters:
nIdTopic- The topic id- Returns:
- The last edit attempt
-
setChildrenToEmptyParent
public void setChildrenToEmptyParent(String strPageTitle)
Description copied from interface:ITopicDAOSet children to empty parent- Specified by:
setChildrenToEmptyParentin interfaceITopicDAO
-
-