I have a Java class with instance fields (and matching setter methods) that match the column names of a SQL database table. I would like to elegantly fetch a row from the table (into a ResultSet) and map it to an instance of this class.

For example:

I have a "Student" class with instance fields "FNAME", "LNAME", "GRADE" and appropriate getter and setter methods for each.

I also have a SQL table with three columns of the same name.

Right now I am doing something like this:

```
rs = statement.executeQuery(query);

Student student = new Student();

student.setFNAME(rs.getString("FNAME"));
student.setLNAME(rs.getString("LNAME"));
student.setGRADE(rs.getString("GRADE"));

```

There has to be a less verbose way of doing this, right? As I add columns this might get really annoying and messy.