Class ClosingDayService


  • public final class ClosingDayService
    extends java.lang.Object
    Service class for the closing day
    Author:
    Laurent Payen
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ClosingDay findClosingDayByIdFormAndDateOfClosingDay​(int nIdForm, java.time.LocalDate dateOfClosingDay)
      Find, if it exists, the closing day of a form for a given date
      static java.util.List<ClosingDay> findListClosingDay​(int nIdForm)
      Returns a list of the closing days of a form
      static java.util.List<java.time.LocalDate> findListDateOfClosingDayByIdForm​(int nIdForm)
      Find all the dates of the closing days of the form
      static java.util.List<java.time.LocalDate> findListDateOfClosingDayByIdFormAndDateRange​(int nIdForm, java.time.LocalDate startingDate, java.time.LocalDate endingDate)
      Find all the closing dates of the form on a given period
      static java.util.List<java.time.LocalDate> getImportClosingDays​(org.apache.commons.fileupload.FileItem item)
      Import the closing dates of a given file
      static void removeClosingDay​(ClosingDay closingDay)
      Remove a closing day
      static void saveClosingDay​(int nIdForm, java.time.LocalDate closingDate)
      Save a closing day of a form
      static void saveClosingDay​(ClosingDay closingDay)
      Save a closing day of a form
      static void saveListClosingDay​(int nIdForm, java.util.List<java.time.LocalDate> listClosingDate)
      Save the closing days of a form
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • findListDateOfClosingDayByIdFormAndDateRange

        public static java.util.List<java.time.LocalDate> findListDateOfClosingDayByIdFormAndDateRange​(int nIdForm,
                                                                                                       java.time.LocalDate startingDate,
                                                                                                       java.time.LocalDate endingDate)
        Find all the closing dates of the form on a given period
        Parameters:
        nIdForm - the form Id
        startingDate - the starting date
        endingDate - the ending date
        Returns:
        a list of closing dates
      • findClosingDayByIdFormAndDateOfClosingDay

        public static ClosingDay findClosingDayByIdFormAndDateOfClosingDay​(int nIdForm,
                                                                           java.time.LocalDate dateOfClosingDay)
        Find, if it exists, the closing day of a form for a given date
        Parameters:
        nIdForm - the form Id
        date - the date
        Returns:
        the closing day, if it exists
      • findListDateOfClosingDayByIdForm

        public static java.util.List<java.time.LocalDate> findListDateOfClosingDayByIdForm​(int nIdForm)
        Find all the dates of the closing days of the form
        Parameters:
        nIdForm - the form Id
        Returns:
        the list of closing dates
      • findListClosingDay

        public static java.util.List<ClosingDay> findListClosingDay​(int nIdForm)
        Returns a list of the closing days of a form
        Parameters:
        nIdForm - the form id
        Returns:
        a list of the closing days of the form
      • saveListClosingDay

        public static void saveListClosingDay​(int nIdForm,
                                              java.util.List<java.time.LocalDate> listClosingDate)
        Save the closing days of a form
        Parameters:
        nIdForm - the form id
        listClosingDate - the closing dates to save
      • saveClosingDay

        public static void saveClosingDay​(int nIdForm,
                                          java.time.LocalDate closingDate)
        Save a closing day of a form
        Parameters:
        nIdForm - the form Id
        closingDate - the closing date
      • saveClosingDay

        public static void saveClosingDay​(ClosingDay closingDay)
        Save a closing day of a form
        Parameters:
        closingDay - the closing day to save
      • removeClosingDay

        public static void removeClosingDay​(ClosingDay closingDay)
        Remove a closing day
        Parameters:
        closingDay - the closing day to remove
      • getImportClosingDays

        public static java.util.List<java.time.LocalDate> getImportClosingDays​(org.apache.commons.fileupload.FileItem item)
                                                                        throws java.io.IOException
        Import the closing dates of a given file
        Parameters:
        item - the file in input
        Returns:
        the list of the closing dates in the file
        Throws:
        java.io.IOException - if error during reading file