com.geotab.model.search.LogRecordSearch Maven / Gradle / Ivy
package com.geotab.model.search;
import com.geotab.model.Id;
import com.geotab.model.entity.logrecord.LogRecord;
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 LogRecord}.
*
* When searching for log records the system will return all records that match the search
* criteria and interpolate the value at the provided from/to dates when there is no record that corresponds to the
* date. Interpolated records are dynamically created when the request is made and can be identified as not having the
* ID property populated. Records with an ID are stored in the database.
*
*
This search has been designed to work efficiently with these combinations of parameters:
*
* -
* {@link Id}
*
* -
* deviceSearch + fromDate and/or toDate
*
*
*/
@Getter @Setter
@NoArgsConstructor
public class LogRecordSearch extends Search {
/**
* Gets or sets search for LogRecords at this date or after.
*/
private LocalDateTime fromDate;
/**
* Gets or sets search for LogRecords at this date or before.
*/
private LocalDateTime toDate;
/**
* Gets or sets search for LogRecords for this device id.
*
* Available DeviceSearch options are:
*
* -
* {@link Id}
*
*
*/
private Id deviceSearch;
@Builder
public LogRecordSearch(String id, LocalDateTime fromDate, LocalDateTime toDate,
Id deviceSearch) {
super(id);
this.fromDate = fromDate;
this.toDate = toDate;
this.deviceSearch = deviceSearch;
}
}