Dates
An instance of the forvendi.BreezzApi.BreezzDates class (accessible via forvendi.BreezzApi.DATES) provides helper methods for date range calculations and overlap validation.
validateDateRangesOverlap(newList, oldList, dateRangeComparator)
Validates overlaps between two lists of custom DateRange objects using a custom comparator.
Signature:
public List<DateRangeOverlapValidator.DateRange> validateDateRangesOverlap(
DateRangeOverlapValidator.DateRange[] newList,
DateRangeOverlapValidator.DateRange[] oldList,
DateRangeOverlapValidator.DateRangeComparator dateRangeComparator
)Parameters:
newList: Collection of newDateRangerecords to be validated.oldList: Collection of existingDateRangerecords.dateRangeComparator: Custom date range comparator implementation.
Return Value: List<DateRangeOverlapValidator.DateRange> – List of overlapping date range records.
validateDateRangesOverlap(newList, oldList)
Validates overlaps between two lists of custom DateRange objects using default comparison rules.
Signature:
public List<DateRangeOverlapValidator.DateRange> validateDateRangesOverlap(
DateRangeOverlapValidator.DateRange[] newList,
DateRangeOverlapValidator.DateRange[] oldList
)Parameters:
newList: Collection of newDateRangerecords to be validated.oldList: Collection of existingDateRangerecords.
Return Value: List<DateRangeOverlapValidator.DateRange> – List of overlapping date range records.
validateDateRangesOverlap(newList, oldList, startDateField, endDateField, dateRangeComparator)
Validates date overlaps between two lists of SObject records using specified start/end date fields and a custom comparator.
Signature:
public List<DateRangeOverlapValidator.DateRange> validateDateRangesOverlap(
SObject[] newList,
SObject[] oldList,
SObjectField startDateField,
SObjectField endDateField,
DateRangeOverlapValidator.DateRangeComparator dateRangeComparator
)Parameters:
newList: Collection of newSObjectrecords to be validated.oldList: Collection of existingSObjectrecords.startDateField:SObjectFieldspecifying the range start date.endDateField:SObjectFieldspecifying the range end date.dateRangeComparator: Custom date range comparator implementation.
Return Value: List<DateRangeOverlapValidator.DateRange> – List of overlapping date range records.
validateDateRangesOverlap(newList, oldList, startDateField, endDateField)
Validates date overlaps between two lists of SObject records using specified start and end date fields.
Signature:
public List<DateRangeOverlapValidator.DateRange> validateDateRangesOverlap(
SObject[] newList,
SObject[] oldList,
SObjectField startDateField,
SObjectField endDateField
)Parameters:
newList: Collection of newSObjectrecords to be validated.oldList: Collection of existingSObjectrecords.startDateField:SObjectFieldspecifying the range start date.endDateField:SObjectFieldspecifying the range end date.
Return Value: List<DateRangeOverlapValidator.DateRange> – List of overlapping date range records.