com.geotab.model.search.ExceptionEventSearch Maven / Gradle / Ivy
package com.geotab.model.search;
import com.geotab.model.entity.exceptionevent.ExceptionEvent;
import java.time.LocalDateTime;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* The object used to specify the arguments when searching for {@link ExceptionEvent}.
*
* This search has been designed to work efficiently with these combinations of parameters:
*
* -
* Id
*
* -
* DeviceSearch + RuleSearch + FromDate and/or ToDate
*
*
*/
@Getter @Setter
@NoArgsConstructor
public class ExceptionEventSearch extends Search {
/**
* Search for Exception Events that occurred at this date or after.
*/
private LocalDateTime fromDate;
/**
* Search for Exception Events that occurred at this date or before.
*/
private LocalDateTime toDate;
/**
* Filter by the {@link DeviceSearch} options. Providing a Device ID will search for any Exception Events recorded for
* that Device. Providing Groups will search Exception Events recorded for Devices that are members of the provided
* GroupSearch(s) or their children.
*
* Available DeviceSearch options are:
*
* -
* Id
*
* -
* Groups
*
*
*/
private DeviceSearch deviceSearch;
/**
* Filter by the {@link RuleSearch} options. Providing a Rule ID will search for any Exception Events recorded for
* that Rule.
*
* Available RuleSearch options are:
*
* -
* Id
*
*
*/
private RuleSearch ruleSearch;
@Builder
public ExceptionEventSearch(String id, LocalDateTime fromDate, LocalDateTime toDate,
DeviceSearch deviceSearch, RuleSearch ruleSearch) {
super(id);
this.fromDate = fromDate;
this.toDate = toDate;
this.deviceSearch = deviceSearch;
this.ruleSearch = ruleSearch;
}
}