public final class ReservationRuleService extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
copyReservationRule(int nIdReservationRule)
Make a copy of typical week, with all its values
|
static ReservationRule |
createReservationRule(AppointmentFormDTO appointmentForm,
int nIdForm)
Create in database a reservation rule object from an appointmentForm DTO
|
static int |
createTypicalWeek(AppointmentFormDTO appointmentForm)
Create in database a reservation rule object from an appointmentForm DTO
|
static void |
fillInReservationRule(ReservationRule reservationRule,
AppointmentFormDTO appointmentForm,
int nIdForm)
Fill the reservation rule object with the corresponding values of an appointmentForm DTO
|
static fr.paris.lutece.util.ReferenceList |
findAllReservationRule(int nIdForm)
Build a reference list of all reservation rules of a form
|
static Map<WeekDefinition,ReservationRule> |
findAllReservationRule(int nIdForm,
Collection<WeekDefinition> listWeekDefinition)
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 List<ReservationRule> |
findListReservationRule(int nIdForm,
Collection<WeekDefinition> listWeekDefinition)
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(int nIdReservationRule)
Delete a reservation rule by its id
|
static void |
saveReservationRule(ReservationRule reservationRule)
save a reservation rule
|
static void |
updateAdvancedParameters(AppointmentFormDTO appointmentForm)
Update a form with the new values of an appointmentForm DTO Advanced Parameters (with a date of application) --> new Typical Week
|
static ReservationRule |
updateReservationRule(AppointmentFormDTO appointmentForm,
int nIdForm)
Update in database a reservation rule with the values of an appointmentForm DTO
|
public static ReservationRule createReservationRule(AppointmentFormDTO appointmentForm, int nIdForm)
appointmentForm - the appointmentForm DTOnIdForm - the form IddateOfApply - the date of the reservation rulepublic static int createTypicalWeek(AppointmentFormDTO appointmentForm)
appointmentForm - the appointmentForm DTOpublic static int copyReservationRule(int nIdReservationRule)
nIdReservationRule - the reservationRule Id to copypublic static void updateAdvancedParameters(AppointmentFormDTO appointmentForm)
appointmentForm - the appointmentForm DTOpublic static void removeReservationRule(int nIdReservationRule)
reservationRule - the reservation rule to deletepublic static void saveReservationRule(ReservationRule reservationRule)
reservationRule - the reservation rule to savepublic static ReservationRule updateReservationRule(AppointmentFormDTO appointmentForm, int nIdForm)
appointmentForm - the appointmentForm DTOnIdForm - the form Idpublic static void fillInReservationRule(ReservationRule reservationRule, AppointmentFormDTO appointmentForm, int nIdForm)
reservationRule - the reservation rule object to fill inappointmentForm - the appointmentForm DTOnIdForm - the form Idpublic 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 findAllReservationRule(int nIdForm)
nIdForm - the form Idpublic static Map<WeekDefinition,ReservationRule> findAllReservationRule(int nIdForm, Collection<WeekDefinition> listWeekDefinition)
nIdForm - the form Idpublic static List<ReservationRule> findListReservationRule(int nIdForm)
nIdForm - the form idpublic static List<ReservationRule> findListReservationRule(int nIdForm, Collection<WeekDefinition> listWeekDefinition)
nIdForm - the form idlistWeekDefinition - the week definition listCopyright © 2022 City of Paris. All rights reserved.