/**
   * Method declaration
   *
   * @param con
   * @param questionContainerHeader
   * @throws SQLException
   * @see
   */
  public static void updateQuestionContainerHeader(
      Connection con, QuestionContainerHeader questionContainerHeader) throws SQLException {
    SilverTrace.info(
        "questionContainer",
        "QuestionContainerDAO.updateQuestionContainerHeader()",
        "root.MSG_GEN_ENTER_METHOD",
        "questionContainerHeader = " + questionContainerHeader);

    String insertStatement =
        "update "
            + questionContainerHeader.getPK().getTableName()
            + " set qcTitle = ?,"
            + " qcDescription = ?,"
            + " qcComment = ?,"
            + " qcBeginDate = ?,"
            + " qcEndDate = ?,"
            + " qcNbVoters = ?,"
            + " qcNbQuestionsPage = ?,"
            + " qcNbMaxParticipations = ?,"
            + " qcNbTriesBeforeSolution = ?,"
            + " qcMaxTime = ?, "
            + " instanceId = ?, "
            + " anonymous = ?"
            + " where qcId = ?";

    PreparedStatement prepStmt = null;

    try {
      prepStmt = con.prepareStatement(insertStatement);
      prepStmt.setString(1, questionContainerHeader.getTitle());
      prepStmt.setString(2, questionContainerHeader.getDescription());
      prepStmt.setString(3, questionContainerHeader.getComment());
      if (questionContainerHeader.getBeginDate() == null) {
        prepStmt.setString(4, nullBeginDate);
      } else {
        prepStmt.setString(4, questionContainerHeader.getBeginDate());
      }
      if (questionContainerHeader.getEndDate() == null) {
        prepStmt.setString(5, nullEndDate);
      } else {
        prepStmt.setString(5, questionContainerHeader.getEndDate());
      }
      prepStmt.setInt(6, questionContainerHeader.getNbVoters());
      prepStmt.setInt(7, questionContainerHeader.getNbQuestionsPerPage());
      prepStmt.setInt(8, questionContainerHeader.getNbMaxParticipations());
      prepStmt.setInt(9, questionContainerHeader.getNbParticipationsBeforeSolution());
      prepStmt.setInt(10, questionContainerHeader.getMaxTime());
      prepStmt.setString(11, questionContainerHeader.getPK().getComponentName());
      if (questionContainerHeader.isAnonymous()) {
        prepStmt.setInt(12, 1);
      } else {
        prepStmt.setInt(12, 0);
      }
      prepStmt.setInt(13, Integer.parseInt(questionContainerHeader.getPK().getId()));
      prepStmt.executeUpdate();
    } finally {
      DBUtil.close(prepStmt);
    }
  }