title: How to get only the first row from a java.sql.ResultSet?
body: <p>I have a ResultSet object containing all the rows returned from an sql query.</p>
  
  <p>I want to be able to (in the java code, NOT force it in the SQL) to be able to take a ResultSet and transform it so that it only contains 1 (the first) row.</p>
  
  <p>What would be the way to acheive this?  Also, is there another appropriate class (somewhere in java.sql or elsewhere) for storing just a single row rather than trimming my ResultSet?</p>
  
  <p>Thanks!</p>