long cid = ((Long)data.get(Comment.COMMENT_ID)).longValue();
String tmp;
boolean b;
b = ((Boolean)data.get(Comment.APPROVED)).booleanValue();
statement.setString(APPROVED, (b ? "Y" : "N"));
tmp = (String)data.get(Comment.EMAIL);
if( tmp == null ) {
statement.setNull(EMAIL, Types.VARCHAR);
}
else {
statement.setString(EMAIL, tmp);
}
statement.setString(NAME, (String)data.get(Comment.NAME));
statement.setString(COMMENT, (String)data.get(Comment.COMMENT));
statement.setLong(COMMENT_ID, cid);
if( statement.executeUpdate() != 1 ) {
throw new PersistenceException("Bizarre number of rows updated.");
}
return null;