Class ReservationRuleHome
- java.lang.Object
-
- fr.paris.lutece.plugins.appointment.business.rule.ReservationRuleHome
-
public final class ReservationRuleHome extends java.lang.ObjectThis class provides instances management methods for Reservation Rule objects- Author:
- Laurent Payen
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReservationRulecreate(ReservationRule reservationRule)Create an instance of the ReservationRule classstatic voiddelete(int nKey)Delete the ReservationRule whose identifier is specified in parameterstatic java.util.List<ReservationRule>findByIdForm(int nIdForm)Returns all the Reservation Rule of a formstatic ReservationRulefindByIdFormAndDateOfApply(int nIdForm, java.time.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, java.time.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 Detail
-
create
public static ReservationRule create(ReservationRule reservationRule)
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
public static ReservationRule update(ReservationRule reservationRule)
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
public static ReservationRule findByPrimaryKey(int nKey)
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
public static java.util.List<ReservationRule> findByIdForm(int nIdForm)
Returns all the Reservation Rule of a form- Parameters:
nIdForm- the Form Id- Returns:
- a list of ReservationRule of the form
-
findByIdFormAndDateOfApply
public static ReservationRule findByIdFormAndDateOfApply(int nIdForm, java.time.LocalDate dateOfApply)
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, java.time.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
-
-