title: better approach to write multiple if else conditions using jdk11
body: <p>I have a code block that redirects a query to different tables based on the logical conditions inside multiple if conditions as shown below. Is there a better approach using jdk11 or jdk8 for the below scenario.</p>
  <pre><code>List&lt;String&gt; processTable(Rating ratingRequest) {
  List&lt;String&gt; ids = new ArrayList(); 
  if(ratingRequest.postCode()!=null){
     //ids = querycall
    return ids;
  }
  if(ratingRequest.getRatingValue()!=null){
    //ids = queryCall
    return ids;
  }
  if(StringUtils.isNotEmpty(ratingRequest.getPostalName()) &amp;&amp; ratingRequest.getRatingValue!=null){
     if(StringUtils.isNotEmpty(ratingRequest.getPostalContractNumber())){
           //ids = businesslogic
            return ids;
  }
   if(somecondition..){
         //ids=..
  }else{
      // ids=..
  }
  return ids;
  ...
  }
  </code></pre>
  <p>Rating.java</p>
  <pre><code>Class Rating{
  String postCode;
  String ratingValue;
  String postalName;
  Date contractEndDate;
  String postalContractNumber;
  //getters and setters
  }
  </code></pre>