/** * Updates the result time envelope of the specified offering to include the specified result time. * * @param offering the offering * @param resultTime the time to include */ default void updateResultTimeForOffering(String offering, Time resultTime) { CacheValidation.notNullOrEmpty(OFFERING, offering); if (resultTime == null) { return; } final TimePeriod tp = toTimePeriod(resultTime); if (!hasMaxResultTimeForOffering(offering) || getMaxResultTimeForOffering(offering).isBefore(tp.getEnd())) { setMaxResultTimeForOffering(offering, tp.getEnd()); } if (!hasMinResultTimeForOffering(offering) || getMinResultTimeForOffering(offering).isAfter(tp.getStart())) { setMinResultTimeForOffering(offering, tp.getStart()); } }