title: JPA Criteria check input dates range present or not
body: <pre><code>@Entity
  @Table(name = &quot;CC_PLANNING_CYCLE&quot;)
  public class PlanningCycleEntity implements Serializable {
  
      /**
       * 
       */
      private static final long serialVersionUID = 1L;
  
      @Id
      private Long forcastCycleId;
  
      @Column(name = &quot;FORECAST_CYCLE_NAME&quot;)
      private String planningCycleName;
  
      @Temporal(TemporalType.DATE)
      @Column(name = &quot;TIME_WINDOW_START_DATE&quot;)
      private Date timeWindowStartDate;
  
      @Temporal(TemporalType.DATE)
      @Column(name = &quot;TIME_WINDOW_END_DATE&quot;)
      private Date timeWindowEndDate;
  }
  </code></pre>
  <p>Table:</p>
  <pre><code>|Plan Id   |  Name    |TimewindowStartDate  | timeWindowEnddate|
  |1         |  Plan1   | 01-Jan-2021         | 15-Jan-2021      |
  |2         |  Plan2   | 18-Jan-2021         | 02-Feb-2021      |
  |3         |  Plan3   | 20-Feb-2021         | 25-Feb-2021      |
  </code></pre>
  <p>Desired output:</p>
  <pre><code>Input date 1 : 01-Jan-2021 and 17-Jan-2021   --- present
  Input date 2 : 10-Feb-2021 and 27-Feb-2021  ---- present
  Input Date 3 : 04-Feb-2021 and 10-Feb-2021  ---  not present.
  </code></pre>
  <p>Please help me how to write a JPA criteria query for above scenario.</p>