Class SlotDAO
java.lang.Object
fr.paris.lutece.plugins.appointment.business.slot.SlotDAO
- All Implemented Interfaces:
ISlotDAO
This class provides Data Access methods for Slot objects
- Author:
- Laurent Payen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nIdSlot, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a appointment from the tablevoiddeleteByIdForm(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a appointment from the tablefindByIdAppointment(int nIdAppointment, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all the slots of a formfindByIdForm(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all the slots of a formfindByIdFormAndDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all the slot for the date rangefindIsSpecificByIdForm(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all the specific slot for the formfindOpenSlotsByIdForm(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all the open slotsfindOpenSlotsByIdFormAndDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all the open slots for the given date rangefindSlotWithAppointmentByDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all the slot containing an appointment for the date rangefindSlotWithMaxDate(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin) Return the slot with the max datefindSpecificSlotDates(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin) Return the specific slot dates from the formvoidInsert a new record in the tablevoidresetPotentialRemainingPlaces(fr.paris.lutece.portal.service.plugin.Plugin plugin) update the availabilities metricsselect(int nIdSlot, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tablevoidUpdate the record in the tablevoidupdatePotentialRemainingPlaces(int nbPotentialRemainingPlaces, int nIdSlot, fr.paris.lutece.portal.service.plugin.Plugin plugin) update Potential Remaining Places
-
Constructor Details
-
SlotDAO
public SlotDAO()
-
-
Method Details
-
insert
Description copied from interface:ISlotDAOInsert a new record in the table -
update
Description copied from interface:ISlotDAOUpdate the record in the table -
delete
public void delete(int nIdSlot, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAODelete a appointment from the table -
deleteByIdForm
public void deleteByIdForm(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAODelete a appointment from the table- Specified by:
deleteByIdFormin interfaceISlotDAO- Parameters:
nIdForm- identifier of the formplugin- the plugin
-
select
Description copied from interface:ISlotDAOLoad the data from the table -
findByIdFormAndDateRange
public List<Slot> findByIdFormAndDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAOReturns all the slot for the date range- Specified by:
findByIdFormAndDateRangein interfaceISlotDAO- 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
-
findSlotWithAppointmentByDateRange
public List<Slot> findSlotWithAppointmentByDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAOReturns all the slot containing an appointment for the date range- Specified by:
findSlotWithAppointmentByDateRangein interfaceISlotDAO- 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
public List<Slot> findIsSpecificByIdForm(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAOReturns all the specific slot for the form- Specified by:
findIsSpecificByIdFormin interfaceISlotDAO- Parameters:
nIdForm- the Form Idplugin- the plugin- Returns:
- a list of specific slots
-
findByIdForm
Description copied from interface:ISlotDAOReturns all the slots of a form- Specified by:
findByIdFormin interfaceISlotDAO- Parameters:
nIdForm- the form idplugin- the plugin- Returns:
- a list of all the slots of the form
-
findOpenSlotsByIdFormAndDateRange
public List<Slot> findOpenSlotsByIdFormAndDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAOReturns all the open slots for the given date range- Specified by:
findOpenSlotsByIdFormAndDateRangein interfaceISlotDAO- Parameters:
nIdForm- the Form IdstartingDateTime- the starting dateendingDateTime- the ending dateplugin- the plugin- Returns:
- a list of open slots whose dates are included in the given period
-
findOpenSlotsByIdForm
public List<Slot> findOpenSlotsByIdForm(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAOReturns all the open slots- Specified by:
findOpenSlotsByIdFormin interfaceISlotDAO- Parameters:
nIdForm- the Form Idplugin- the plugin- Returns:
- a list of open slots
-
findByIdAppointment
public List<Slot> findByIdAppointment(int nIdAppointment, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAOReturns all the slots of a form- Specified by:
findByIdAppointmentin interfaceISlotDAO- Parameters:
nIdAppointment- the appointment idplugin- the plugin- Returns:
- a list of all the slots of the form
-
findSlotWithMaxDate
Description copied from interface:ISlotDAOReturn the slot with the max date- Specified by:
findSlotWithMaxDatein interfaceISlotDAO- Parameters:
nIdForm- the form idplugin- the plugin- Returns:
- the slot
-
updatePotentialRemainingPlaces
public void updatePotentialRemainingPlaces(int nbPotentialRemainingPlaces, int nIdSlot, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAOupdate Potential Remaining Places- Specified by:
updatePotentialRemainingPlacesin interfaceISlotDAO
-
resetPotentialRemainingPlaces
public void resetPotentialRemainingPlaces(fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAOupdate the availabilities metrics- Specified by:
resetPotentialRemainingPlacesin interfaceISlotDAO- Parameters:
plugin- the plugin
-
findSpecificSlotDates
public List<LocalDate> findSpecificSlotDates(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISlotDAOReturn the specific slot dates from the form- Specified by:
findSpecificSlotDatesin interfaceISlotDAO- Parameters:
nIdForm- the id Formplugin- the plugin- Returns:
- list of date
-