content: package com.example.demo.service.criteria;
  
  import java.io.Serializable;
  import java.util.Objects;
  import org.springdoc.api.annotations.ParameterObject;
  import tech.jhipster.service.Criteria;
  import tech.jhipster.service.filter.BooleanFilter;
  import tech.jhipster.service.filter.DoubleFilter;
  import tech.jhipster.service.filter.Filter;
  import tech.jhipster.service.filter.FloatFilter;
  import tech.jhipster.service.filter.IntegerFilter;
  import tech.jhipster.service.filter.LongFilter;
  import tech.jhipster.service.filter.StringFilter;
  
  /**
   * Criteria class for the {@link com.example.demo.domain.Foo} entity. This class is used
   * in {@link com.example.demo.web.rest.FooResource} to receive all the possible filtering options from
   * the Http GET request parameters.
   * For example the following could be a valid request:
   * {@code /foos?id.greaterThan=5&attr1.contains=something&attr2.specified=false}
   * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use
   * fix type specific filters.
   */
  @ParameterObject
  public class FooCriteria implements Serializable, Criteria {
  
      private static final long serialVersionUID = 1L;
  
      private LongFilter id;
  
      private StringFilter name;
  
      private Boolean distinct;
  
      public FooCriteria() {}
  
      public FooCriteria(FooCriteria other) {
          this.id = other.id == null ? null : other.id.copy();
          this.name = other.name == null ? null : other.name.copy();
          this.distinct = other.distinct;
      }
  
      @Override
      public FooCriteria copy() {
          return new FooCriteria(this);
      }
  
      public LongFilter getId() {
          return id;
      }
  
      public LongFilter id() {
          if (id == null) {
              id = new LongFilter();
          }
          return id;
      }
  
      public void setId(LongFilter id) {
          this.id = id;
      }
  
      public StringFilter getName() {
          return name;
      }
  
      public StringFilter name() {
          if (name == null) {
              name = new StringFilter();
          }
          return name;
      }
  
      public void setName(StringFilter name) {
          this.name = name;
      }
  
      public Boolean getDistinct() {
          return distinct;
      }
  
      public void setDistinct(Boolean distinct) {
          this.distinct = distinct;
      }
  
      @Override
      public boolean equals(Object o) {
          if (this == o) {
              return true;
          }
          if (o == null || getClass() != o.getClass()) {
              return false;
          }
          final FooCriteria that = (FooCriteria) o;
          return Objects.equals(id, that.id) && Objects.equals(name, that.name) && Objects.equals(distinct, that.distinct);
      }
  
      @Override
      public int hashCode() {
          return Objects.hash(id, name, distinct);
      }
  
      // prettier-ignore
      @Override
      public String toString() {
          return "FooCriteria{" +
              (id != null ? "id=" + id + ", " : "") +
              (name != null ? "name=" + name + ", " : "") +
              (distinct != null ? "distinct=" + distinct + ", " : "") +
              "}";
      }
  }
  