Package dev.getelements.elements.sdk.dao
Interface ScheduleEventDao
- All Known Implementing Classes:
MongoScheduleEventDao
public interface ScheduleEventDao
Manges
ScheduleEvent
instances within the database.-
Method Summary
Modifier and TypeMethodDescriptioncreateScheduleEvent
(ScheduleEvent scheduleEvent) Creates a newScheduleEvent
.void
deleteScheduleEvent
(String scheduleNameOrId, String scheduleEventId) Deletes a specific schedule event.void
deleteScheduleEvents
(String scheduleNameOrId) Deletes all events associated with the supplied schedule id.findScheduleEventById
(String scheduleNameOrId, String scheduleEventId) Finds aSchedule
by name or ID.default List
<ScheduleEvent> getAllScheduleEvents
(String scheduleNameOrId) Gets allScheduleEvent
instances for the suppliedSchedule
default List
<ScheduleEvent> getAllScheduleEvents
(String scheduleNameOrId, boolean includeExpired, boolean includeFuture) Gets allScheduleEvent
instances for the suppliedSchedule
getAllScheduleEvents
(String scheduleNameOrId, boolean includeExpired, boolean includeFuture, long reference) Gets allScheduleEvent
instances for the suppliedSchedule
default ScheduleEvent
getScheduleEventById
(String scheduleNameOrId, String scheduleEventId) Gets theScheduleEvent
with the id and schedule id.getScheduleEvents
(String scheduleNameOrId, int offset, int count) getScheduleEvents
(String scheduleNameOrId, int offset, int count, String search) updateScheduleEvent
(ScheduleEvent scheduleEvent) Updates theScheduleEvent
.
-
Method Details
-
createScheduleEvent
Creates a newScheduleEvent
.- Parameters:
scheduleEvent
- theScheduleEvent
to create- Returns:
- the object as written to the database
-
updateScheduleEvent
Updates theScheduleEvent
.- Parameters:
scheduleEvent
- theScheduleEvent
to update- Returns:
- the object as written to the database
-
getScheduleEvents
- Parameters:
scheduleNameOrId
- the name or id of theSchedule
- Returns:
- a
Pagination<ScheduleEvent>
of schedule events.
-
getScheduleEvents
Pagination<ScheduleEvent> getScheduleEvents(String scheduleNameOrId, int offset, int count, String search) - Parameters:
scheduleNameOrId
- the name or id of theSchedule
search
- the search query- Returns:
- a
Pagination<ScheduleEvent>
of schedule events.
-
getAllScheduleEvents
Gets allScheduleEvent
instances for the suppliedSchedule
- Parameters:
scheduleNameOrId
- the name or id of theScheduleEvent
- Returns:
- a
List<ScheduleEvent>
of schedule events.
-
getAllScheduleEvents
default List<ScheduleEvent> getAllScheduleEvents(String scheduleNameOrId, boolean includeExpired, boolean includeFuture) Gets allScheduleEvent
instances for the suppliedSchedule
- Parameters:
scheduleNameOrId
- the name or id of theScheduleEvent
includeExpired
- true to include events that have expiredincludeFuture
- true to include events that have yet to be scheduled- Returns:
- a
List<ScheduleEvent>
of schedule events.
-
getAllScheduleEvents
List<ScheduleEvent> getAllScheduleEvents(String scheduleNameOrId, boolean includeExpired, boolean includeFuture, long reference) Gets allScheduleEvent
instances for the suppliedSchedule
- Parameters:
scheduleNameOrId
- the name or id of theScheduleEvent
- Returns:
- a
List<ScheduleEvent>
of schedule events.
-
findScheduleEventById
Finds aSchedule
by name or ID.- Parameters:
scheduleNameOrId
- the schedule name or idscheduleEventId
- the schedule event id- Returns:
Optional<ScheduleEvent>
-
getScheduleEventById
Gets theScheduleEvent
with the id and schedule id.- Parameters:
scheduleNameOrId
- the schedule name or idscheduleEventId
- the schedule event id- Returns:
- a
ScheduleEvent
, never null
-
deleteScheduleEvents
Deletes all events associated with the supplied schedule id.- Parameters:
scheduleNameOrId
- the schedule name or id
-
deleteScheduleEvent
Deletes a specific schedule event.- Parameters:
scheduleNameOrId
- the schedule name or idscheduleEventId
- the schedule event id
-