Skip to content

SpecPeriod

Fagner Lima edited this page Aug 24, 2020 · 2 revisions

Used for a period of time. Includes the annotations SpecPeriodStartDate and SpecPeriodEndDate.

Params:

  • start: the name of the field that represents the start date;
  • end: the name of the field that represents the end date.

Example:

@SpecEntity(Task.class)
public class TaskFilter implements Serializable {
  // ...

  @SpecPeriod(start = "period.startDate", end = "period.endDate")
  private PeriodFilter period;

  // getters and setters
}

public class PeriodFilter implements Serializable {

  private static final long serialVersionUID = 1L;

  @SpecPeriodStartDate
  private LocalDate startDate;

  @SpecPeriodEndDate
  private LocalDate endDate;

  // getters and setters
}
Clone this wiki locally