title: How to have filtering of multiple parameters passed as RequestParams in Spring Data Jpa?
body: <p>Suppose I have an <code>Employee</code> class with multiple fields like <code>name</code>, <code>age</code>, <code>salary</code>, <code>designation</code>, <code>joiningDate</code>, <code>gender</code> and many more. Now, how could I apply filtering with many such parameters? There could be many combinations possible in such cases. (For Eg. if I want to have 6 filters, then there can be total of 6! = 720 combinations possible!!!)</p>
  <p>For only 2, 3 parameters, like <code>age</code>, <code>salary</code>, <code>name</code>; then I could write multiple if cases like:</p>
  <pre><code>if(age!=null &amp;&amp; name==null &amp;&amp; salary==null)
  {
      findByAge
  }
  if(age==null &amp;&amp; name!=null &amp;&amp; salary==null)
  {
      findByName
  }
  if(age!=null &amp;&amp; name!=null &amp;&amp; salary==null)
  {
      findByAgeAndName
  }
  </code></pre>
  <p>etc. like these with help of Spring Data JPA. But how to handle more parameters since combinations would increase with each RequestParams?</p>