public void deleteModule(
      final Connection connection, final Module module
  ) {
    try {
      final String sqlStatement = "DELETE FROM TIMETABLE_MODULE WHERE MODULE_CODE = ?";
      this.setQueryPreparation(connection.prepareStatement(sqlStatement));
      this.getQueryPreparation().setInt(1, module.getCode());
      this.getQueryPreparation().executeUpdate();
      for (CourseModule courseModule : CourseModule.COURSE_MODULES) {
        if (courseModule.getModuleCode() == module.getCode()) {
          this.deleteCourseModule(connection, courseModule);
        }
      }
      for (ModuleLecturer moduleLecturer : ModuleLecturer.MODULE_LECTURERS) {
        if (moduleLecturer.getModuleCode() == module.getCode()) {
          this.deleteModuleLecturer(connection, moduleLecturer);
        }
      }
      Module.MODULES.remove(module);
    } catch (final SQLException e) {
      e.getMessage();
      e.printStackTrace();

    }
  }