public final class AppointmentService extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addAppointmentResponses(AppointmentDTO appointmentDto)
Fill the appointment data transfer object with complementary appointment responses
|
static Appointment |
buildAndCreateAppointment(AppointmentDTO appointmentDTO,
User user,
Slot slot)
Build and create in database an appointment from the dto
|
static AppointmentDTO |
buildAppointmentDTOFromIdAppointment(int nIdAppointment)
Build an appointment DTO from the id of an appointment business object
|
static void |
deleteAppointment(int nIdAppointment)
Delete an appointment (and update the number of remaining places of the related slot)
|
static Appointment |
findAppointmentById(int nIdAppointment)
Find an appointment by its primary key
|
static Appointment |
findAppointmentByReference(String strReference)
Find an appointment by its reference
|
static List<Appointment> |
findListAppointmentByIdForm(int nIdForm)
Find the appointments by form
|
static List<Appointment> |
findListAppointmentByListSlot(List<Slot> listSlot)
Find all the appointments of the slots given in parameter
|
static List<Appointment> |
findListAppointmentBySlot(int nIdSlot)
Find the appointments of a slot
|
static List<Appointment> |
findListAppointmentByUserId(int nIdUser)
Find the appointments of a user
|
static List<Appointment> |
findListAppointmentsByFilter(AppointmentFilterDTO appointmentFilter) |
static List<AppointmentDTO> |
findListAppointmentsDTOByFilter(AppointmentFilterDTO appointmentFilter)
Find a list of appointments matching the filter
|
static int |
saveAppointment(AppointmentDTO appointmentDTO)
Save an appointment in database
|
static void |
updateAppointment(Appointment appointment)
Update an appointment in database
|
static void |
updateRemaningPlacesWithAppointmentMovedDeletedOrCanceled(int nbPlaces,
Slot slot)
Deprecated.
|
public static List<Appointment> findListAppointmentByListSlot(List<Slot> listSlot)
listSlot
- the list of slotspublic static List<Appointment> findListAppointmentBySlot(int nIdSlot)
nIdSlot
- the slot Idpublic static List<Appointment> findListAppointmentByUserId(int nIdUser)
nIdUser
- the user Idpublic static List<Appointment> findListAppointmentByIdForm(int nIdForm)
nIdForm
- the form Idpublic static Appointment buildAndCreateAppointment(AppointmentDTO appointmentDTO, User user, Slot slot)
appointmentDTO
- the appointment dtouser
- the userslot
- the slotpublic static Appointment findAppointmentById(int nIdAppointment)
nIdAppointment
- the appointment Idpublic static Appointment findAppointmentByReference(String strReference)
strReference
- the appointment Referencepublic static List<AppointmentDTO> findListAppointmentsDTOByFilter(AppointmentFilterDTO appointmentFilter)
appointmentFilter
- the filterpublic static List<Appointment> findListAppointmentsByFilter(AppointmentFilterDTO appointmentFilter)
public static void addAppointmentResponses(AppointmentDTO appointmentDto)
appointmentDto
- The appointmentDTO objectpublic static void deleteAppointment(int nIdAppointment)
nIdAppointment
- the id of the appointment to deletepublic static AppointmentDTO buildAppointmentDTOFromIdAppointment(int nIdAppointment)
nIdAppointment
- the id of the appointmentpublic static void updateAppointment(Appointment appointment)
appointment
- the appointment to update@Deprecated public static void updateRemaningPlacesWithAppointmentMovedDeletedOrCanceled(int nbPlaces, Slot slot)
nbPlaces
- the nb places taken of the appointment that we want to delete (or cancel, or move)slot
- the related slotpublic static int saveAppointment(AppointmentDTO appointmentDTO)
appointmentDTO
- the appointment dtoException
Copyright © 2020 City of Paris. All rights reserved.