package io.reflectoring.coderadar.query.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import java.time.LocalDate;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class DateRange {

  @NotNull
  @JsonSerialize(using = LocalDateSerializer.class)
  @JsonDeserialize(using = LocalDateDeserializer.class)
  private LocalDate startDate;

  @NotNull
  @JsonSerialize(using = LocalDateSerializer.class)
  @JsonDeserialize(using = LocalDateDeserializer.class)
  private LocalDate endDate;

  public boolean containsDate(LocalDate date) {
    return startDate.isBefore(date)
        || startDate.isEqual(date) && endDate.isAfter(date)
        || endDate.isEqual(date);
  }
}

@@ -907,16 +907,17 @@
  return 
+(
 startDat
@@ -928,32 +928,24 @@
 Before(date)
-%0A       
  %7C%7C startDat
@@ -963,12 +963,22 @@
 ate)
+)%0A       
  && 
+(
 endD
@@ -994,24 +994,16 @@
 er(date)
-%0A       
  %7C%7C endD
@@ -1019,16 +1019,17 @@
 al(date)
+)
 ;%0A  %7D%0A%7D%0A

fix bug