title: Filtering list from database without using java8 Stream
body: <p>The given filtering condition is using the stream in JAVA 8 how do I change it without using stream. I have to filter the customer and employee commodities from the database in the controller</p>
  <pre><code>          else if
            (&quot;Employee&quot;.equalsIgnoreCase(soption)) 
            { customerVOs = customerVOs.stream()
                      .filter( s-&gt; s.getRole().equalsIgnoreCase(&quot;Employee&quot;))
                      .collect(Collectors.toList()); 
            }
          model.addAttribute(&quot;customerVOs&quot;, customerVOs);
                  
          
  </code></pre>