ps.setString(3, thread.getTitle());
ps.setLong(4, user);
ps.setTimestamp(5, new Timestamp(new Date().getTime()));
ps.setLong(6, thread.getId());
if (ps.executeUpdate() == 0) {
throw new PersistenceException("no such thread");
}
} finally {
Database.dispose(ps);
}
} catch (PersistenceException pe) {
throw pe;
} catch (SQLException e) {
throw new PersistenceException("Failed to update thread.", e);
} finally {
Database.dispose(conn);
}
}