Class ReservationRuleDAO

  • All Implemented Interfaces:
    IReservationRuleDAO

    public final class ReservationRuleDAO
    extends java.lang.Object
    implements IReservationRuleDAO
    This class provides Data Access methods for Reservation Rule objects
    Author:
    Laurent Payen
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(int nIdReservationRule, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      java.util.List<ReservationRule> findByIdForm​(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns all the Reservation Rule of the form given
      ReservationRule findByIdFormAndDateOfApply​(int nIdForm, java.time.LocalDate dateOfApply, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns the Reservation Rule with the given search parameters
      ReservationRule findReservationRuleByIdFormAndClosestToDateOfApply​(int nIdForm, java.time.LocalDate dateOfApply, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find in database a reservation rule of a form closest to a date
      void insert​(ReservationRule reservationRule, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table
      ReservationRule select​(int nIdReservationRule, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      void update​(ReservationRule reservationRule, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 java.util.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,
                                                          java.time.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,
                                                                                  java.time.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