@Override public Circle mapRow(ResultSet rs, int rowNum) throws SQLException { Circle circle = new Circle(); circle.setId(rs.getInt("ID")); circle.setName(rs.getString("NAME")); return circle; }
public void insertCircle(Circle circle) { String sql = "INSERT INTO CIRCLE(ID,NAME) VALUES(?, ?)"; jdbcTemplate.update(sql, new Object[] {circle.getId(), circle.getName()}); }