title: How to convert the cassandra row to my java class?
body: <pre><code> Here is [a Link](http://stackoverflow.com/questions/32448987/how-to-retrieve-a-very-big-cassandra-table-and-delete-some-unuse-data-from-it#comment52844466_32464409) of my question before.
   After I get  the cassandra data row by row in my program, I'm confused by the convert between cassandra row to java class. In java class the table of cassandra is convert to a ResultSet class,when I iterator it and get the row data,it returns a NPE. In fact,I can see the Object (or the data) while  debuging the program. Here is My Iterator Code:
  
  
          ResultSet rs=CassandraTools.getInstance().execute(cql);
          Iterator&lt;Row&gt; iterator = rs.iterator();
          while (iterator.hasNext()) {
              Row row = iterator.next();
              row.getString()  ----&gt;return NPE
  </code></pre>
  
  <p>The CassandraTools class is:</p>
  
  <pre><code>public class CassandraTools {
  
  private static CassandraTools instance;
  
  private CassandraTools() {
  }
  
  public static synchronized CassandraTools getInstance() {
      if (instance == null) {
          instance = new CassandraTools();
          instance.init();
      }
      return instance;
  }
  
  Cluster cluster;
  Session session;
  
  public void init() {
      if (cluster == null) {
          cluster = new Cluster.Builder().addContactPoint("10.16.34.96")
                  .build();
          if (session == null) {
              session = cluster.connect("uc_passport");
          }
      }
  }
  
  public ResultSet execute(String cql) {
      ResultSet rs = session.execute(cql);
      // rs.forEach(n -&gt; {
      // System.out.println(n);
      // });
      return rs;
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>SO how could I convert the data in the row to A java Class?I have read the convert class in the API of spring data cassandra,but it is complicated to use for me. Who can help?</p>