Class ReservationRuleHome
java.lang.Object
fr.paris.lutece.plugins.appointment.business.rule.ReservationRuleHome
This class provides instances management methods for Reservation Rule objects
- Author:
- Laurent Payen
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReservationRulecreate(ReservationRule reservationRule) Create an instance of the ReservationRule classstatic voiddelete(int nKey) Delete the ReservationRule whose identifier is specified in parameterstatic List<ReservationRule>findByIdForm(int nIdForm) Returns all the Reservation Rule of a formstatic ReservationRulefindByIdFormAndDateOfApply(int nIdForm, LocalDate dateOfApply) Returns the Reservation Rule with the given search parametersstatic ReservationRulefindByPrimaryKey(int nKey) Returns an instance of the ReservationRule whose identifier is specified in parameterstatic ReservationRulefindReservationRuleByIdFormAndClosestToDateOfApply(int nIdForm, LocalDate dateOfApply) Find in database a reservation rule of a form closest to a datestatic ReservationRuleupdate(ReservationRule reservationRule) Update of the ReservationRule which is specified in parameter
-
Method Details
-
create
Create an instance of the ReservationRule class- Parameters:
reservationRule- The instance of the ReservationRule which contains the informations to store- Returns:
- The instance of the ReservationRule which has been created with its primary key.
-
update
Update of the ReservationRule which is specified in parameter- Parameters:
reservationRule- The instance of the ReservationRule which contains the data to store- Returns:
- The instance of the ReservationRule which has been updated
-
delete
public static void delete(int nKey) Delete the ReservationRule whose identifier is specified in parameter- Parameters:
nKey- The ReservationRule Id
-
findByPrimaryKey
Returns an instance of the ReservationRule whose identifier is specified in parameter- Parameters:
nKey- The ReservationRule primary key- Returns:
- an instance of the ReservationRule
-
findByIdForm
Returns all the Reservation Rule of a form- Parameters:
nIdForm- the Form Id- Returns:
- a list of ReservationRule of the form
-
findByIdFormAndDateOfApply
Returns the Reservation Rule with the given search parameters- Parameters:
nIdForm- the Form IddateOfApply- the date of apply- Returns:
- the ReservationRule
-
findReservationRuleByIdFormAndClosestToDateOfApply
public static ReservationRule findReservationRuleByIdFormAndClosestToDateOfApply(int nIdForm, LocalDate dateOfApply) Find in database a reservation rule of a form closest to a date- Parameters:
nIdForm- the Form IddateOfApply- the date of applyplugin- the plugin- Returns:
- the reservation rule that matches
-