public final class ReservationRuleService extends Object
Modifier and Type | Method and Description |
---|---|
static ReservationRule |
createReservationRule(AppointmentFormDTO appointmentForm,
int nIdForm,
LocalDate dateOfApply)
Create in database a reservation rule object from an appointmentForm DTO
|
static void |
fillInReservationRule(ReservationRule reservationRule,
AppointmentFormDTO appointmentForm,
int nIdForm,
LocalDate dateOfApply)
Fill the reservation rule object with the corresponding values of an appointmentForm DTO
|
static fr.paris.lutece.util.ReferenceList |
findAllDateOfReservationRule(int nIdForm)
Build a reference list of all the dates of all the reservation rules of a form
|
static HashMap<LocalDate,ReservationRule> |
findAllReservationRule(int nIdForm)
Find all the reservation rule of a form
|
static List<ReservationRule> |
findListReservationRule(int nIdForm)
Returns a list of the reservation rules of a form
|
static ReservationRule |
findReservationRuleById(int nIdReservationRule)
Find a reservation rule with its primary key
|
static ReservationRule |
findReservationRuleByIdFormAndClosestToDateOfApply(int nIdForm,
LocalDate dateOfApply)
Find in database a reservation rule of a form closest to a date
|
static ReservationRule |
findReservationRuleByIdFormAndDateOfApply(int nIdForm,
LocalDate dateOfApply)
Find the reservation rule of a form on a specific date
|
static void |
removeReservationRule(ReservationRule reservationRule)
Delete a reservation rule by its id
|
static void |
saveReservationRule(ReservationRule reservationRule)
save a reservation rule
|
static ReservationRule |
updateReservationRule(AppointmentFormDTO appointmentForm,
int nIdForm,
LocalDate dateOfApply)
Update in database a reservation rule with the values of an appointmentForm DTO
|
public static ReservationRule createReservationRule(AppointmentFormDTO appointmentForm, int nIdForm, LocalDate dateOfApply)
appointmentForm
- the appointmentForm DTOnIdForm
- the form IddateOfApply
- the date of the reservation rulepublic static void removeReservationRule(ReservationRule reservationRule)
reservationRule
- the reservation rule to deletepublic static void saveReservationRule(ReservationRule reservationRule)
reservationRule
- the reservation rule to savepublic static ReservationRule updateReservationRule(AppointmentFormDTO appointmentForm, int nIdForm, LocalDate dateOfApply)
appointmentForm
- the appointmentForm DTOnIdForm
- the form IddateOfApply
- the date of the updatepublic static void fillInReservationRule(ReservationRule reservationRule, AppointmentFormDTO appointmentForm, int nIdForm, LocalDate dateOfApply)
reservationRule
- the reservation rule object to fill inappointmentForm
- the appointmentForm DTOnIdForm
- the form IddateOfApply
- the date of the reservation rulepublic static ReservationRule findReservationRuleByIdFormAndClosestToDateOfApply(int nIdForm, LocalDate dateOfApply)
nIdForm
- the form IddateOfApply
- the datepublic static ReservationRule findReservationRuleByIdFormAndDateOfApply(int nIdForm, LocalDate dateOfApply)
nIdForm
- the form IddateOfApply
- the date of the reservation rulepublic static ReservationRule findReservationRuleById(int nIdReservationRule)
nIdReservationRule
- the reservation rule Idpublic static fr.paris.lutece.util.ReferenceList findAllDateOfReservationRule(int nIdForm)
nIdForm
- the form Idpublic static HashMap<LocalDate,ReservationRule> findAllReservationRule(int nIdForm)
nIdForm
- the form Idpublic static List<ReservationRule> findListReservationRule(int nIdForm)
nIdForm
- the form idCopyright © 2020 City of Paris. All rights reserved.