public interface EventsService<E extends AbstractEvent> extends EventsDao<E>
Event
sModifier and Type | Method and Description |
---|---|
List<DateRange> |
compliment(DateRange e1,
DateRange e2)
|
boolean |
contains(DateRange e1,
DateRange e2)
Check if e1 contains e2 completely
|
long |
daysDiff(DateRange event,
boolean normalizeTime,
boolean factorDayStartNotMidNight)
Accounts for check-in time and check out time
|
<ED extends EventsDao<E>> |
getDao() |
DateRange |
intersection(DateRange e1,
DateRange e2)
Get the intersection (as DateRange) between 2 DateRanges.
|
boolean |
overlaps(DateRange e1,
DateRange e2)
Check if 2 Date Ranges overlap
|
void |
setDao(EventsDao<E> dao) |
count, getEntityInstance, query, query, queryPage, queryPage
long daysDiff(DateRange event, boolean normalizeTime, boolean factorDayStartNotMidNight)
date
- range as DateRangenormalizeTime
- as boolean, if true will ignore any time settings.factorDayStartNotMidNight
- as boolean, if true will factor in the time the Day start for the event. Example: Check in time in HotelsDateRange intersection(DateRange e1, DateRange e2)
e1
- as DateRange
e2
- as DateRange
DateRange
part. If e1 is not overlapping with e2 at all, it will throw an IllegalArgumentException
.Copyright © 2018. All rights reserved.