public class NewsletterTopicDao extends Object implements INewsletterTopicDAO
NewsletterTopic| Constructor and Description |
|---|
NewsletterTopicDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
fillBlankInOrder(int nIdNewsletter,
int nOrder,
int nSection,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Fill a blank in the order of topics of a newsletter.
|
List<NewsletterTopic> |
findAllByIdNewsletter(int nIdNewsletter,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of
NewsletterTopic associated with a given
newsletter. |
List<NewsletterTopic> |
findByNewsletterIdAndOrder(int nIdNewsletter,
int nOrder,
int nSection,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of newsletter topics associated to a given newsletter and
with the given order in a section
|
NewsletterTopic |
findByPrimaryKey(int nId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get a
NewsletterTopic by its primary key from the database |
int |
getLastOrder(int nIdNewsletter,
int nSection,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the highest order for a given newsletter and a given section
|
int |
getNewOrder(int nIdNewsletter,
int nSection,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the next available order value for topics of a newsletter
|
void |
insert(NewsletterTopic newsletterTopic,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new
NewsletterTopic into the database |
void |
remove(int nId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a
NewsletterTopic from the database |
void |
removeAllByIdNewsletter(int nIdNewsletter,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove every topic associated with a given newsletter
|
void |
update(NewsletterTopic newsletterTopic,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a
NewsletterTopic in the database |
void |
updateNewsletterTopicOrder(int nIdNewsletterTopic,
int nNewOrder,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the order of a newsletter topic
|
public NewsletterTopic findByPrimaryKey(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic by its primary key from the databasefindByPrimaryKey in interface INewsletterTopicDAOnId - The id of the NewsletterTopic to getplugin - The pluginNewsletterTopic with the given id, or null if no
NewsletterTopic has this id.public void insert(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic into the databaseinsert in interface INewsletterTopicDAOnewsletterTopic - The NewsletterTopic to insert.plugin - The pluginpublic void update(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic in the databaseupdate in interface INewsletterTopicDAOnewsletterTopic - The new values of the NewsletterTopic.plugin - The pluginpublic void remove(int nId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic from the databaseremove in interface INewsletterTopicDAOnId - The id of the NewsletterTopic to delete.plugin - The pluginpublic List<NewsletterTopic> findAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic associated with a given
newsletter.findAllByIdNewsletter in interface INewsletterTopicDAOnIdNewsletter - The id of the newsletterplugin - The pluginNewsletterTopic found.public void updateNewsletterTopicOrder(int nIdNewsletterTopic,
int nNewOrder,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
updateNewsletterTopicOrder in interface INewsletterTopicDAOnIdNewsletterTopic - The id of the newsletter topic to updatenNewOrder - The new order of the topicplugin - The pluginpublic List<NewsletterTopic> findByNewsletterIdAndOrder(int nIdNewsletter, int nOrder, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findByNewsletterIdAndOrder in interface INewsletterTopicDAOnIdNewsletter - The id of the newsletter the topic must be
associated with.nOrder - The order the topics must havenSection - The section of the Topicplugin - The pluginpublic int getNewOrder(int nIdNewsletter,
int nSection,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
getNewOrder in interface INewsletterTopicDAOnIdNewsletter - The id of the newsletternSection - The section of the newsletterplugin - The pluginpublic int getLastOrder(int nIdNewsletter,
int nSection,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
getLastOrder in interface INewsletterTopicDAOnIdNewsletter - The id of the newsletternSection - The id of the sectionplugin - The pluginpublic void fillBlankInOrder(int nIdNewsletter,
int nOrder,
int nSection,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
fillBlankInOrder in interface INewsletterTopicDAOnIdNewsletter - The newsletter to update the topics ofnOrder - The order with no topicnSection - The section of topics to updateplugin - the pluginpublic void removeAllByIdNewsletter(int nIdNewsletter,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
removeAllByIdNewsletter in interface INewsletterTopicDAOnIdNewsletter - The id of the newsletter to remove the topics of.plugin - The pluginCopyright © 2014 Mairie de Paris. All rights reserved.