public final class SlotHome extends Object
Modifier and Type | Method and Description |
---|---|
static Slot |
create(Slot slot)
Create an instance of the Slot class
|
static void |
delete(int nKey)
Delete the Slot whose identifier is specified in parameter
|
static List<Slot> |
findByIdForm(int nIdForm)
Returns a list of slots of a form
|
static List<Slot> |
findByIdFormAndDateRange(int nIdForm,
LocalDateTime startingDateTime,
LocalDateTime endingDateTime)
Returns a list of slots for a date range
|
static Slot |
findByPrimaryKey(int nKey)
Returns an instance of the Slot whose identifier is specified in parameter
|
static List<Slot> |
findIsSpecificByIdForm(int nIdForm)
Returns a list of specific slots for a form
|
static List<Slot> |
findOpenSlotsByIdForm(int nIdForm)
Returns a list of open slots
|
static List<Slot> |
findOpenSlotsByIdFormAndDateRange(int nIdForm,
LocalDateTime startingDateTime,
LocalDateTime endingDateTime)
Returns a list of open slots for a date range
|
static Slot |
findSlotWithTheMaxDate(int nIdForm)
Return the Slot that have the max date
|
static void |
resetPotentialRemainingPlaces()
Reset Potential Remaining Places
|
static Slot |
update(Slot slot)
Update of the Slot which is specified in parameter
|
static void |
updatePotentialRemainingPlaces(int nbPotentialRemainingPlaces,
int nIdSlot)
Update Potential Remaining Places
|
public static Slot create(Slot slot)
slot
- The instance of the Slot which contains the informations to storepublic static Slot update(Slot slot)
slot
- The instance of the Slot which contains the data to storepublic static void delete(int nKey)
nKey
- The Slot Idpublic static Slot findByPrimaryKey(int nKey)
nKey
- The Slot primary keypublic static List<Slot> findByIdFormAndDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime)
nIdForm
- the Form IdstartingDateTime
- the starting DateendingDateTime
- the ending Datepublic static List<Slot> findIsSpecificByIdForm(int nIdForm)
nIdForm
- the Form Idpublic static List<Slot> findByIdForm(int nIdForm)
nIdForm
- the form idpublic static List<Slot> findOpenSlotsByIdFormAndDateRange(int nIdForm, LocalDateTime startingDateTime, LocalDateTime endingDateTime)
nIdForm
- the Form IdstartingDateTime
- the starting DateendingDateTime
- the ending Datepublic static List<Slot> findOpenSlotsByIdForm(int nIdForm)
nIdForm
- the Form Idpublic static Slot findSlotWithTheMaxDate(int nIdForm)
nIdForm
- the form idpublic static void updatePotentialRemainingPlaces(int nbPotentialRemainingPlaces, int nIdSlot)
nbPotentialRemainingPlaces
- nIdSlot
- public static void resetPotentialRemainingPlaces()
nbPotentialRemainingPlaces
- nIdSlot
- Copyright © 2020 City of Paris. All rights reserved.