ExceptionMessages.EXC_FALHA_ATUALIZACAO_COPIA);
} else {
complaint.incTimestamp();
}
} else {
throw new ObjectNotFoundException(
ExceptionMessages.EXC_FALHA_ATUALIZACAO);
}
resultSet.close();
stmt.close();
stmt = (Statement) this.mp.getCommunicationChannel();
sql = "update scbs_queixa set " + "observacao='"
+ complaint.getObservacao() + "', " + "situacao= '"
+ complaint.getSituacao() + "', ts= '"
+ complaint.getTimestamp() + "'";
if (complaint.getAtendente() != null) {
sql += ", funcionario= '" + complaint.getAtendente().getLogin() + "'";
}
if (complaint.getDataParecer() != null) {
sql += ", dataparecer= '" + complaint.getDataParecer() + "'";
}
sql += " where codigo = '" + complaint.getCodigo() + "'";
int response = stmt.executeUpdate(sql);
if (response == 0) {
throw new ObjectNotFoundException(
ExceptionMessages.EXC_FALHA_ATUALIZACAO);
}
stmt.close();
} catch (SQLException e) {
System.out.println(sql);