Interface IReservationRuleDAO

  • All Known Implementing Classes:
    ReservationRuleDAO

    public interface IReservationRuleDAO
    ReservationRule DAO Interface
    Author:
    Laurent Payen
    • Method Detail

      • insert

        void insert​(ReservationRule reservationRule,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert a new record in the table
        Parameters:
        reservationRule - instance of the ReservationRule object to insert
        plugin - the plugin
      • update

        void update​(ReservationRule appointment,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update the record in the table
        Parameters:
        reservationRule - the reference of the ReservationRule
        plugin - the plugin
      • delete

        void delete​(int nIdReservationRule,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete a record from the table
        Parameters:
        nIdReservationRule - int identifier of the ReservationRule to delete
        plugin - the plugin
      • select

        ReservationRule select​(int nIdReservationRule,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data from the table
        Parameters:
        nIdReservationRule - the identifier of the ReservationRule
        plugin - the plugin
        Returns:
        the instance of the ReservationRule
      • findByIdForm

        List<ReservationRule> findByIdForm​(int nIdForm,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns all the Reservation Rule of the form given
        Parameters:
        nIdForm - the Form Id
        plugin - the plugin
        Returns:
        a list of reservation rule of the form
      • findByIdFormAndDateOfApply

        ReservationRule findByIdFormAndDateOfApply​(int nIdForm,
                                                   LocalDate dateOfApply,
                                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns the Reservation Rule with the given search parameters
        Parameters:
        nIdForm - the Form Id
        dateOfApply - the date of apply
        plugin - the plugin
        Returns:
        the reservation rule that matches
      • findReservationRuleByIdFormAndClosestToDateOfApply

        ReservationRule findReservationRuleByIdFormAndClosestToDateOfApply​(int nIdForm,
                                                                           LocalDate dateOfApply,
                                                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Find in database a reservation rule of a form closest to a date
        Parameters:
        nIdForm - the Form Id
        dateOfApply - the date of apply
        plugin - the plugin
        Returns:
        the reservation rule that matches