title: How to replace SQL Query CONDITION in Spring JPA native query
body: <p>I have a spring jpa native query(actual query has multiple tables connected) something like below.</p>
  
  <pre><code>@Query(nativeQuery = true, value="
  select id, name from TABLE where id NOT IN ('2', '3')")
  List&lt;Object&gt; getValueForNOTIN()
  
  @Query(nativeQuery = true, value="
  select id, name from TABLE where id IN ('4', '5')")
  List&lt;Object&gt; getValueForIN()
  </code></pre>
  
  <p>Instead of 2 methods, I want to use one method which replaces NOT IN and IN with this 'replaceClause' value. </p>
  
  <pre><code>List&lt;Object&gt; getValueForBoth(@Param("replaceClause)" String replaceClause)
  </code></pre>
  
  <p>I get error on start of server. Can't I do like this?</p>