tracking the column and adding in arraylist
<p>I have a table in a database named table1 which has the following structure , it contains three different columns </p>

<pre><code>id   status    aaa
--  -------  -----

11   true    12567
22   true    76432
33   null    98734
44   true    65783
</code></pre>

<p>Now I am getting all the rows in an object S form through csv beans parser as shown below..</p>

<pre><code>S.getid()
S.getstatus()
Sgetaaa()
</code></pre>

<p>Now my objective is that I have two different arraylist , in which i want to store elements in such a way that I have to track the status column in such a way that it the value of the status column is true then it should be stored in first arraylist and if the value of the column status is null then it should be stored in a different arraylist </p>

<p>two different arraylist is declare as </p>

<pre><code>List&lt;fghj&gt;truestatus = new arraylist&lt;&gt;(fghj);
List&lt;fghj&gt;nullstatus = new arraylist&lt;&gt;(fghj);
</code></pre>

<p>if the value of the status column is null then in the arraylist complete row should be get added I have tried following way , please advise how to achieve this and add the complete row on the basis of the value of the status column</p>

<pre><code>    list &lt;fghj&gt;totalrows =new Arraylist&lt;fghj&gt;();
totalrows //list having the complete table details
    for (fghj g : totalrows) //iterating the table through object individually

    {
    if (totalrows != null &amp;&amp; totalrows.size&gt;0)
    {
    //please advise how to track the status column here and add it two different list

    }
    }
</code></pre>
