I'm using the JdbcTmplate to query for rows like this:
This gives me back an ArrayList that contains a HashMap per row (just as it should). I can easily loop through the List and extract row data for each column. So far so good.
jt = new JdbcTemplate(dataSource);
List rows = jt.queryForList("select * from Recipes");
I have a column (called "NoteText')in the the queried table (called "Recipes") that's a MySQL LONGBLOB. The table definition is here:
When I grab that column's value from the HashMap for a particular row using row.get("NoteText") what am I getting? If i cast the HashMap value for that column to a String I get something like:
CREATE TABLE Recipes
RecipeID INT NOT NULL AUTO_INCREMENT,
RecipeName CHAR(255) NOT NULL,
MenuSectionID INT NOT NULL,
PRIMARY KEY (RecipeID),
Obviously not what I want. I'd guess that what I'm getting back is an object and the above is the objects toString result.
What's the best way to deal with LOB data coming back from a query through a JdbcTemplate?