Class CommentService


  • public class CommentService
    extends java.lang.Object
    • Method Detail

      • finListComments

        public static java.util.List<Comment> finListComments​(java.sql.Date startingDate,
                                                              java.sql.Date endingDate,
                                                              int nIdForm)
        fin List Comments between two dates
        Parameters:
        startingDate - the date start
        endingDate - the date end
      • findListCommentsInclusive

        public static java.util.List<Comment> findListCommentsInclusive​(java.sql.Date startingDate,
                                                                        java.sql.Date endingDate,
                                                                        int nIdForm)
        fin List Comments between two dates
        Parameters:
        startingDate - the date start
        endingDate - the date end
      • createAndNotifyMailingList

        public static Comment createAndNotifyMailingList​(Comment comment,
                                                         int idMailingList,
                                                         java.util.Locale locale)
        Create an instance of the comment class and notify the mailing list
        Parameters:
        comment - The instance of the Comment which contains the informations to store
        idMailingList - the mailing list id to notify
        Returns:
        The instance of comment which has been created with its primary key.
      • updateAndNotifyMailingList

        public static Comment updateAndNotifyMailingList​(Comment comment,
                                                         int idMailingList,
                                                         java.util.Locale locale)
        Update of the comment which is specified in parameter and notify the mailing list
        Parameters:
        comment - The instance of the Comment which contains the data to store
        idMailingList - the mailing list id to notify
        Returns:
        The instance of the comment which has been updated
      • removeAndNotifyMailingList

        public static void removeAndNotifyMailingList​(int nKey,
                                                      int idMailingList,
                                                      java.util.Locale locale)
        Remove the comment whose identifier is specified in parameter and notify the mailing list
        Parameters:
        nKey - The comment Id
        idMailingList - the mailing list id to notify
      • sendNotification

        public static void sendNotification​(Comment comment,
                                            int idMailingList,
                                            CommentNotificationConfig.NotificationType type,
                                            java.util.Locale locale)
        Parameters:
        comment -
        idMailingList - the mailing list id to notify
        locale -
      • buildCommentDTO

        public static java.util.List<CommentDTO> buildCommentDTO​(java.util.List<Comment> listComment)