}
private static final String JDBC = "jdbc:sqlite:";
- static boolean updateLegalNoticeDraftStatus(int selectednotice_id, boolean created, boolean approved) {
+ static boolean updateNoticeDraftStatus(int selectednotice_id, boolean created, boolean approved) {
try {
Connection conn = DriverManager.getConnection(JDBC + connectionURL);
PreparedStatement st = conn.prepareStatement("UPDATE legalnotices "
return false;
}
+ }
+
+ static boolean updateNoticeDescription(int selectednotice_id, String text) {
+ try {
+ Connection conn = DriverManager.getConnection(JDBC + connectionURL);
+ PreparedStatement st = conn.prepareStatement("UPDATE legalnotices "
+ + "SET Description=? WHERE id=?;");
+ st.setString(1, text);
+ st.setInt(2, selectednotice_id);
+ st.execute();
+ conn.close();
+ return true;
+ } catch (SQLException ex) {
+ Logger.getLogger(Utility.class.getName()).log(Level.SEVERE, null, ex);
+ return false;
+ }
+
}
public Utility () {