Interface INewsletterTopicDAO
-
- All Known Implementing Classes:
NewsletterTopicDao
public interface INewsletterTopicDAOInterface for NewsletterTopic DAO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfillBlankInOrder(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.java.util.List<NewsletterTopic>findAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list ofNewsletterTopicassociated with a given newsletter.java.util.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 sectionNewsletterTopicfindByPrimaryKey(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get aNewsletterTopicby its primary key from the databaseintgetLastOrder(int nIdNewsletter, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the highest order for a given newsletter and a given sectionintgetNewOrder(int nIdNewsletter, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the next available order value for topics of a newslettervoidinsert(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a newNewsletterTopicinto the databasevoidremove(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete aNewsletterTopicfrom the databasevoidremoveAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove every topic associated with a given newslettervoidupdate(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update aNewsletterTopicin the databasevoidupdateNewsletterTopicOrder(int nIdNewsletterTopic, int nNewOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the order of a newsletter topic
-
-
-
Method Detail
-
findByPrimaryKey
NewsletterTopic findByPrimaryKey(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get aNewsletterTopicby its primary key from the database- Parameters:
nId- The id of theNewsletterTopicto getplugin- The plugin- Returns:
- The
NewsletterTopicwith the given id, or null if noNewsletterTopichas this id.
-
insert
void insert(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a newNewsletterTopicinto the database- Parameters:
newsletterTopic- TheNewsletterTopicto insert.plugin- The plugin
-
update
void update(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update aNewsletterTopicin the database- Parameters:
newsletterTopic- The new values of theNewsletterTopic.plugin- The plugin
-
remove
void remove(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete aNewsletterTopicfrom the database- Parameters:
nId- The id of theNewsletterTopicto delete.plugin- The plugin
-
findAllByIdNewsletter
java.util.List<NewsletterTopic> findAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list ofNewsletterTopicassociated with a given newsletter.- Parameters:
nIdNewsletter- The id of the newsletterplugin- The plugin- Returns:
- The list of
NewsletterTopicfound.
-
updateNewsletterTopicOrder
void updateNewsletterTopicOrder(int nIdNewsletterTopic, int nNewOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the order of a newsletter topic- Parameters:
nIdNewsletterTopic- The id of the newsletter topic to updatenNewOrder- The new order of the topicplugin- The plugin
-
findByNewsletterIdAndOrder
java.util.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- Parameters:
nIdNewsletter- The id of the newsletter the topic must be associated with.nOrder- The order the topics must havenSection- The section of the Topicplugin- The plugin- Returns:
- The list of newsletter topics. The list should contain only one or zero element. If it has more, then it indicates that several topics have the same order and should be reordered.
-
getNewOrder
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- Parameters:
nIdNewsletter- The id of the newsletternSection- The section of the newsletterplugin- The plugin- Returns:
- The next available order value
-
getLastOrder
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- Parameters:
nIdNewsletter- The id of the newsletternSection- The id of the sectionplugin- The plugin- Returns:
- The highest order actually used for the given newsletter and the given section
-
fillBlankInOrder
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.- Parameters:
nIdNewsletter- The newsletter to update the topics ofnOrder- The order with no topicnSection- The section of topics to updateplugin- the plugin
-
removeAllByIdNewsletter
void removeAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove every topic associated with a given newsletter- Parameters:
nIdNewsletter- The id of the newsletter to remove the topics of.plugin- The plugin
-
-