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.voiddeleteScheduleEvent(String scheduleNameOrId, String scheduleEventId) Deletes a specific schedule event.voiddeleteScheduleEvents(String scheduleNameOrId) Deletes all events associated with the supplied schedule id.findScheduleEventById(String scheduleNameOrId, String scheduleEventId) Finds aScheduleby name or ID.default List<ScheduleEvent> getAllScheduleEvents(String scheduleNameOrId) Gets allScheduleEventinstances for the suppliedScheduledefault List<ScheduleEvent> getAllScheduleEvents(String scheduleNameOrId, boolean includeExpired, boolean includeFuture) Gets allScheduleEventinstances for the suppliedSchedulegetAllScheduleEvents(String scheduleNameOrId, boolean includeExpired, boolean includeFuture, long reference) Gets allScheduleEventinstances for the suppliedScheduledefault ScheduleEventgetScheduleEventById(String scheduleNameOrId, String scheduleEventId) Gets theScheduleEventwith 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- theScheduleEventto create- Returns:
- the object as written to the database
-
updateScheduleEvent
Updates theScheduleEvent.- Parameters:
scheduleEvent- theScheduleEventto 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 theSchedulesearch- the search query- Returns:
- a
Pagination<ScheduleEvent>of schedule events.
-
getAllScheduleEvents
Gets allScheduleEventinstances 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 allScheduleEventinstances for the suppliedSchedule- Parameters:
scheduleNameOrId- the name or id of theScheduleEventincludeExpired- 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 allScheduleEventinstances for the suppliedSchedule- Parameters:
scheduleNameOrId- the name or id of theScheduleEvent- Returns:
- a
List<ScheduleEvent>of schedule events.
-
findScheduleEventById
Finds aScheduleby name or ID.- Parameters:
scheduleNameOrId- the schedule name or idscheduleEventId- the schedule event id- Returns:
Optional<ScheduleEvent>
-
getScheduleEventById
Gets theScheduleEventwith 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
-