Hi Brian,
Thanks for pointing me to that, it was very helpful.
However, I have another question - basically, I want to use the
ResultSet interface in my Folder3 function, so as far as I understand
in order to do that, I need to make the map() function return a
ResultSet. My question is, is there a built-in way to do this or do I
have to do something like:
db.createQuery("SELECT * FROM vw_form WHERE id=:form_id")
.bind("form_id", id)
.map(new ResultSetMapper<ResultSet>() {
public ResultSet map(int i, ResultSet rs, StatementContext sc)
throws SQLException {
return rs;
}
}).fold(new Form(), new Folder3<Form, ResultSet>() {
public Form fold(Form at, ResultSet mt, FoldController fc,
StatementContext sc) throws SQLException {
//BUILD FORM OBJECT HERE throw new
UnsupportedOperationException("Not supported yet.");
}
});
(I noticed that if I omit the map() function entirely, I can get a
Map<String, Object> for each row, but I like the convieniance methods
in the ResultSet interface for getInt(), getString() etc)
Cheers,
Erin
> --
>
>