Class SlotHome
java.lang.Object
fr.paris.lutece.plugins.appointment.business.slot.SlotHome
This class provides instances management methods for Slot objects
- Author:
- Laurent Payen
-
Method Summary
Modifier and TypeMethodDescriptionstatic SlotCreate an instance of the Slot classstatic voiddelete(int nKey) Delete the Slot whose identifier is specified in parameterstatic voiddeleteByIdForm(int nIdForm) Delete a appointment from the tablefindByIdAppointment(int nIdAppointment) Returns a list of slots of a formfindByIdForm(int nIdForm) Returns a list of slots of a formfindByIdFormAndDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime) Returns a list of slots for a date rangestatic SlotfindByPrimaryKey(int nKey) Returns an instance of the Slot whose identifier is specified in parameterfindIsSpecificByIdForm(int nIdForm) Returns a list of specific slots for a formfindOpenSlotsByIdForm(int nIdForm) Returns a list of open slotsfindOpenSlotsByIdFormAndDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime) Returns a list of open slots for a date rangefindSlotWithAppointmentByDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime) Returns all the slot containing an appointment for the date rangestatic SlotfindSlotWithTheMaxDate(int nIdForm) Return the Slot that have the max datefindSpecificSlotDates(int nIdForm) Return the specific slot dates from the formstatic voidReset Potential Remaining Placesstatic SlotUpdate of the Slot which is specified in parameterstatic voidupdatePotentialRemainingPlaces(int nbPotentialRemainingPlaces, int nIdSlot) Update Potential Remaining Places
-
Method Details
-
create
Create an instance of the Slot class- Parameters:
slot- The instance of the Slot which contains the informations to store- Returns:
- The instance of the Slot which has been created with its primary key.
-
update
Update of the Slot which is specified in parameter- Parameters:
slot- The instance of the Slot which contains the data to store- Returns:
- The instance of the Slot which has been updated
-
delete
public static void delete(int nKey) Delete the Slot whose identifier is specified in parameter- Parameters:
nKey- The Slot Id
-
deleteByIdForm
public static void deleteByIdForm(int nIdForm) Delete a appointment from the table- Parameters:
nIdForm- identifier of the form
-
findByPrimaryKey
Returns an instance of the Slot whose identifier is specified in parameter- Parameters:
nKey- The Slot primary key- Returns:
- an instance of the Slot
-
findByIdFormAndDateRange
public static List<Slot> findByIdFormAndDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime) Returns a list of slots for a date range- Parameters:
nIdForm- the Form IdstartingDateTime- the starting DateendingDateTime- the ending Date- Returns:
- a list of slots whose dates are included in the given period
-
findSlotWithAppointmentByDateRange
public static List<Slot> findSlotWithAppointmentByDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime) Returns all the slot containing an appointment for the date range- Parameters:
nIdForm- the Form IdstartingDateTime- the starting dateendingDateTime- the ending dateplugin- the plugin- Returns:
- a list of slots whose dates are included in the given period and is containing an appointment
-
findIsSpecificByIdForm
Returns a list of specific slots for a form- Parameters:
nIdForm- the Form Id- Returns:
- a list of slots found
-
findByIdForm
Returns a list of slots of a form- Parameters:
nIdForm- the form id- Returns:
- a list of all the slots of the form
-
findOpenSlotsByIdFormAndDateRange
public static List<Slot> findOpenSlotsByIdFormAndDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime) Returns a list of open slots for a date range- Parameters:
nIdForm- the Form IdstartingDateTime- the starting DateendingDateTime- the ending Date- Returns:
- a list of open slots whose dates are included in the given period
-
findOpenSlotsByIdForm
Returns a list of open slots- Parameters:
nIdForm- the Form Id- Returns:
- a list of open slots
-
findSlotWithTheMaxDate
Return the Slot that have the max date- Parameters:
nIdForm- the form id- Returns:
- the slot
-
findByIdAppointment
Returns a list of slots of a form- Parameters:
nIdAppointment- the appointment id- Returns:
- a list of all the slots of the form
-
updatePotentialRemainingPlaces
public static void updatePotentialRemainingPlaces(int nbPotentialRemainingPlaces, int nIdSlot) Update Potential Remaining Places- Parameters:
nbPotentialRemainingPlaces-nIdSlot-
-
resetPotentialRemainingPlaces
public static void resetPotentialRemainingPlaces()Reset Potential Remaining Places- Parameters:
nbPotentialRemainingPlaces-nIdSlot-
-
findSpecificSlotDates
Return the specific slot dates from the form- Parameters:
nIdForm- the id Formplugin- the plugin- Returns:
- list of date
-