Class ReservationRuleDAO

  • All Implemented Interfaces:
    IReservationRuleDAO

    public final class ReservationRuleDAO
    extends Object
    implements IReservationRuleDAO
    This class provides Data Access methods for Reservation Rule objects
    Author:
    Laurent Payen
    • Constructor Detail

      • ReservationRuleDAO

        public ReservationRuleDAO()
    • Method Detail

      • insert

        public void insert​(ReservationRule reservationRule,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IReservationRuleDAO
        Insert a new record in the table
        Specified by:
        insert in interface IReservationRuleDAO
        Parameters:
        reservationRule - instance of the ReservationRule object to insert
        plugin - the plugin
      • delete

        public void delete​(int nIdReservationRule,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IReservationRuleDAO
        Delete a record from the table
        Specified by:
        delete in interface IReservationRuleDAO
        Parameters:
        nIdReservationRule - int identifier of the ReservationRule to delete
        plugin - the plugin
      • select

        public ReservationRule select​(int nIdReservationRule,
                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IReservationRuleDAO
        Load the data from the table
        Specified by:
        select in interface IReservationRuleDAO
        Parameters:
        nIdReservationRule - the identifier of the ReservationRule
        plugin - the plugin
        Returns:
        the instance of the ReservationRule
      • findByIdForm

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

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

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