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 topicvoiddeleteByTopicVersion(int nTopicVersionId, fr.paris.lutece.portal.service.plugin.Plugin plugin)StringgetPageNameFromTitle(String pageTitle, String locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the page_name with the page_titleTopicVersiongetPublishedVersion(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)voidinsert(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 collectionTopicVersionsetTopicVersionWithDaoUtil(fr.paris.lutece.util.sql.DAOUtil daoUtil)set the content of a topic version with doaUtilvoidupdateIsPublished(int nIdTopicVersion, String comment, boolean bIsPublished, fr.paris.lutece.portal.service.plugin.Plugin plugin)voidupdatePublishedVersion(int idVersion, boolean isPublished, fr.paris.lutece.portal.service.plugin.Plugin plugin)update published versionvoidupdateTopicVersion(TopicVersion topicVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
-
-
-
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
-
deleteByTopicVersion
public void deleteByTopicVersion(int nTopicVersionId, fr.paris.lutece.portal.service.plugin.Plugin plugin)- Specified by:
deleteByTopicVersionin interfaceITopicVersionDAO
-
updateIsPublished
public void updateIsPublished(int nIdTopicVersion, String comment, boolean bIsPublished, fr.paris.lutece.portal.service.plugin.Plugin plugin)- Specified by:
updateIsPublishedin interfaceITopicVersionDAO
-
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
-
updateTopicVersion
public void updateTopicVersion(TopicVersion topicVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
- Specified by:
updateTopicVersionin interfaceITopicVersionDAO
-
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
-
getPublishedVersion
public TopicVersion getPublishedVersion(int nTopicId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
- Specified by:
getPublishedVersionin interfaceITopicVersionDAO
-
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
-
setTopicVersionWithDaoUtil
public TopicVersion setTopicVersionWithDaoUtil(fr.paris.lutece.util.sql.DAOUtil daoUtil)
set the content of a topic version with doaUtil
-
updatePublishedVersion
public void updatePublishedVersion(int idVersion, boolean isPublished, fr.paris.lutece.portal.service.plugin.Plugin plugin)update published version- Specified by:
updatePublishedVersionin interfaceITopicVersionDAO- Parameters:
idVersion-isPublished-
-
getPageNameFromTitle
public String getPageNameFromTitle(String pageTitle, String locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface:ITopicVersionDAOGet the page_name with the page_title- Specified by:
getPageNameFromTitlein interfaceITopicVersionDAO- Returns:
- the page name
-
-