public final class NewsletterTopicHome extends Object
Modifier and Type | Method and Description |
---|---|
static 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.
|
static List<NewsletterTopic> |
findAllByIdNewsletter(int nIdNewsletter,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of
NewsletterTopic associated with a given
newsletter. |
static NewsletterTopic |
findByPrimaryKey(int nId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get a
NewsletterTopic by its primary key from the database |
static 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
|
static 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
|
static void |
insertNewsletterTopic(NewsletterTopic newsletterTopic,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new
NewsletterTopic into the database |
static void |
removeAllByIdNewsletter(int nIdNewsletter,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of
NewsletterTopic associated with a given
newsletter. |
static void |
removeNewsletterTopic(int nId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a
NewsletterTopic from the database |
static void |
updateNewsletterTopic(NewsletterTopic newsletterTopic,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a
NewsletterTopic in the database |
static void |
updateNewsletterTopicOrder(NewsletterTopic newsletterTopic,
int nNewOrder,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update topic orders of a newsletter.
|
public static NewsletterTopic findByPrimaryKey(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic
by its primary key from the databasenId
- The id of the NewsletterTopic
to getplugin
- The pluginNewsletterTopic
with the given id, or null if no
NewsletterTopic
has this id.public static void insertNewsletterTopic(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic
into the databasenewsletterTopic
- The NewsletterTopic
to insert.plugin
- The pluginpublic static void updateNewsletterTopic(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic
in the databasenewsletterTopic
- The new values of the NewsletterTopic
.plugin
- The pluginpublic static void removeNewsletterTopic(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic
from the databasenId
- The id of the NewsletterTopic
to delete.plugin
- The pluginpublic static void removeAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic
associated with a given
newsletter.nIdNewsletter
- The id of the newsletterplugin
- The pluginpublic static List<NewsletterTopic> findAllByIdNewsletter(int nIdNewsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
NewsletterTopic
associated with a given
newsletter.nIdNewsletter
- The id of the newsletterplugin
- The pluginNewsletterTopic
found.public static void updateNewsletterTopicOrder(NewsletterTopic newsletterTopic, int nNewOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
newsletterTopic
- The topic to move. The order attribute of the
topic MUST be its old order.nNewOrder
- The new order of the topicplugin
- The pluginpublic static int getNewOrder(int nIdNewsletter, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdNewsletter
- The id of the newsletternSection
- The sectionplugin
- The pluginpublic static int getLastOrder(int nIdNewsletter, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdNewsletter
- The id of the newsletternSection
- The id of the sectionplugin
- The pluginpublic static void fillBlankInOrder(int nIdNewsletter, int nOrder, int nSection, fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdNewsletter
- The newsletter to update the topics ofnOrder
- The order with no topicnSection
- The section of topics to updateplugin
- the pluginCopyright © 2019 City of Paris. All rights reserved.