Créé dans le cadre du projet de fin d'année de la promo 2018 de CIR2 de l'ISEN Brest/Rennes, le Burger Quizz est une adaptation numérique du jeu télévisé éponyme, plus précisément d'une épreuve spécifique de ce jeu : le "Sel ou Poivre".

GestionQuestions.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="fr">
  4. <head>
  5. <!-- Generated by javadoc (version 1.7.0_79) on Thu Jun 11 01:32:17 CEST 2015 -->
  6. <meta http-equiv="Content-Type" content="text/html" charset="utf8">
  7. <title>GestionQuestions</title>
  8. <meta name="date" content="2015-06-11">
  9. <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. if (location.href.indexOf('is-external=true') == -1) {
  14. parent.document.title="GestionQuestions";
  15. }
  16. //-->
  17. </script>
  18. <noscript>
  19. <div>JavaScript is disabled on your browser.</div>
  20. </noscript>
  21. <!-- ========= START OF TOP NAVBAR ======= -->
  22. <div class="topNav"><a name="navbar_top">
  23. <!-- -->
  24. </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
  25. <!-- -->
  26. </a>
  27. <ul class="navList" title="Navigation">
  28. <li><a href="../overview-summary.html">Overview</a></li>
  29. <li><a href="package-summary.html">Package</a></li>
  30. <li class="navBarCell1Rev">Class</li>
  31. <li><a href="package-tree.html">Tree</a></li>
  32. <li><a href="../deprecated-list.html">Deprecated</a></li>
  33. <li><a href="../index-files/index-1.html">Index</a></li>
  34. <li><a href="../help-doc.html">Help</a></li>
  35. </ul>
  36. </div>
  37. <div class="subNav">
  38. <ul class="navList">
  39. <li><a href="../GestionBddDAO/GestionCategories.html" title="class in GestionBddDAO"><span class="strong">Prev Class</span></a></li>
  40. <li><a href="../GestionBddDAO/GestionReponses.html" title="class in GestionBddDAO"><span class="strong">Next Class</span></a></li>
  41. </ul>
  42. <ul class="navList">
  43. <li><a href="../index.html?GestionBddDAO/GestionQuestions.html" target="_top">Frames</a></li>
  44. <li><a href="GestionQuestions.html" target="_top">No Frames</a></li>
  45. </ul>
  46. <ul class="navList" id="allclasses_navbar_top">
  47. <li><a href="../allclasses-noframe.html">All Classes</a></li>
  48. </ul>
  49. <div>
  50. <script type="text/javascript"><!--
  51. allClassesLink = document.getElementById("allclasses_navbar_top");
  52. if(window==top) {
  53. allClassesLink.style.display = "block";
  54. }
  55. else {
  56. allClassesLink.style.display = "none";
  57. }
  58. //-->
  59. </script>
  60. </div>
  61. <div>
  62. <ul class="subNavList">
  63. <li>Summary:&nbsp;</li>
  64. <li>Nested&nbsp;|&nbsp;</li>
  65. <li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
  66. <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
  67. <li><a href="#method_summary">Method</a></li>
  68. </ul>
  69. <ul class="subNavList">
  70. <li>Detail:&nbsp;</li>
  71. <li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
  72. <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
  73. <li><a href="#method_detail">Method</a></li>
  74. </ul>
  75. </div>
  76. <a name="skip-navbar_top">
  77. <!-- -->
  78. </a></div>
  79. <!-- ========= END OF TOP NAVBAR ========= -->
  80. <!-- ======== START OF CLASS DATA ======== -->
  81. <div class="header">
  82. <div class="subTitle">GestionBddDAO</div>
  83. <h2 title="Class GestionQuestions" class="title">Class GestionQuestions</h2>
  84. </div>
  85. <div class="contentContainer">
  86. <ul class="inheritance">
  87. <li>java.lang.Object</li>
  88. <li>
  89. <ul class="inheritance">
  90. <li>GestionBddDAO.GestionQuestions</li>
  91. </ul>
  92. </li>
  93. </ul>
  94. <div class="description">
  95. <ul class="blockList">
  96. <li class="blockList">
  97. <hr>
  98. <br>
  99. <pre>public class <span class="strong">GestionQuestions</span>
  100. extends java.lang.Object</pre>
  101. <div class="block">Classe effectuant les modifications en base de données pour les questions.</div>
  102. </li>
  103. </ul>
  104. </div>
  105. <div class="summary">
  106. <ul class="blockList">
  107. <li class="blockList">
  108. <!-- =========== FIELD SUMMARY =========== -->
  109. <ul class="blockList">
  110. <li class="blockList"><a name="field_summary">
  111. <!-- -->
  112. </a>
  113. <h3>Field Summary</h3>
  114. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
  115. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  116. <tr>
  117. <th class="colFirst" scope="col">Modifier and Type</th>
  118. <th class="colLast" scope="col">Field and Description</th>
  119. </tr>
  120. <tr class="altColor">
  121. <td class="colFirst"><code>private java.sql.Connection</code></td>
  122. <td class="colLast"><code><strong><a href="../GestionBddDAO/GestionQuestions.html#bdd">bdd</a></strong></code>
  123. <div class="block">Connexion à la base de données.</div>
  124. </td>
  125. </tr>
  126. <tr class="rowColor">
  127. <td class="colFirst"><code>private java.util.ArrayList&lt;<a href="../Modele/Question.html" title="class in Modele">Question</a>&gt;</code></td>
  128. <td class="colLast"><code><strong><a href="../GestionBddDAO/GestionQuestions.html#listeQuestions">listeQuestions</a></strong></code>
  129. <div class="block">Tableau contenant la liste de toutes les questions stockées en base de données.</div>
  130. </td>
  131. </tr>
  132. </table>
  133. </li>
  134. </ul>
  135. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  136. <ul class="blockList">
  137. <li class="blockList"><a name="constructor_summary">
  138. <!-- -->
  139. </a>
  140. <h3>Constructor Summary</h3>
  141. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  142. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  143. <tr>
  144. <th class="colOne" scope="col">Constructor and Description</th>
  145. </tr>
  146. <tr class="altColor">
  147. <td class="colOne"><code><strong><a href="../GestionBddDAO/GestionQuestions.html#GestionQuestions(java.sql.Connection)">GestionQuestions</a></strong>(java.sql.Connection&nbsp;bdd)</code>
  148. <div class="block">Constructeur donnant accées à la base de données.</div>
  149. </td>
  150. </tr>
  151. </table>
  152. </li>
  153. </ul>
  154. <!-- ========== METHOD SUMMARY =========== -->
  155. <ul class="blockList">
  156. <li class="blockList"><a name="method_summary">
  157. <!-- -->
  158. </a>
  159. <h3>Method Summary</h3>
  160. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  161. <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
  162. <tr>
  163. <th class="colFirst" scope="col">Modifier and Type</th>
  164. <th class="colLast" scope="col">Method and Description</th>
  165. </tr>
  166. <tr class="altColor">
  167. <td class="colFirst"><code>void</code></td>
  168. <td class="colLast"><code><strong><a href="../GestionBddDAO/GestionQuestions.html#createQuestion(java.lang.String,%20java.lang.String,%20java.lang.String,%20int)">createQuestion</a></strong>(java.lang.String&nbsp;intitule,
  169. java.lang.String&nbsp;reponse1,
  170. java.lang.String&nbsp;reponse2,
  171. int&nbsp;num_reponse)</code>
  172. <div class="block">Crée une nouvelle question.</div>
  173. </td>
  174. </tr>
  175. <tr class="rowColor">
  176. <td class="colFirst"><code>void</code></td>
  177. <td class="colLast"><code><strong><a href="../GestionBddDAO/GestionQuestions.html#deleteQuestion(java.lang.String,%20java.lang.String,%20java.lang.String)">deleteQuestion</a></strong>(java.lang.String&nbsp;intitule,
  178. java.lang.String&nbsp;reponse1,
  179. java.lang.String&nbsp;reponse2)</code>
  180. <div class="block">Supprime une question de la base de données.</div>
  181. </td>
  182. </tr>
  183. <tr class="altColor">
  184. <td class="colFirst"><code>java.util.ArrayList&lt;<a href="../Modele/Question.html" title="class in Modele">Question</a>&gt;</code></td>
  185. <td class="colLast"><code><strong><a href="../GestionBddDAO/GestionQuestions.html#getListeQuestions()">getListeQuestions</a></strong>()</code>
  186. <div class="block">Renvoie le tableau interne contenant les questions.</div>
  187. </td>
  188. </tr>
  189. <tr class="rowColor">
  190. <td class="colFirst"><code>void</code></td>
  191. <td class="colLast"><code><strong><a href="../GestionBddDAO/GestionQuestions.html#readQuestions(java.lang.String,%20java.lang.String)">readQuestions</a></strong>(java.lang.String&nbsp;reponse1,
  192. java.lang.String&nbsp;reponse2)</code>
  193. <div class="block">Remplis le tableau interne des questions liées à un jeu de réponses depuis la base de données.</div>
  194. </td>
  195. </tr>
  196. <tr class="altColor">
  197. <td class="colFirst"><code>void</code></td>
  198. <td class="colLast"><code><strong><a href="../GestionBddDAO/GestionQuestions.html#updateQuestion(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20int)">updateQuestion</a></strong>(java.lang.String&nbsp;oldIntitule,
  199. java.lang.String&nbsp;newIntitule,
  200. java.lang.String&nbsp;reponse1,
  201. java.lang.String&nbsp;reponse2,
  202. int&nbsp;newNum_reponse)</code>
  203. <div class="block">Modifie une question.</div>
  204. </td>
  205. </tr>
  206. </table>
  207. <ul class="blockList">
  208. <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
  209. <!-- -->
  210. </a>
  211. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  212. <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
  213. </ul>
  214. </li>
  215. </ul>
  216. </li>
  217. </ul>
  218. </div>
  219. <div class="details">
  220. <ul class="blockList">
  221. <li class="blockList">
  222. <!-- ============ FIELD DETAIL =========== -->
  223. <ul class="blockList">
  224. <li class="blockList"><a name="field_detail">
  225. <!-- -->
  226. </a>
  227. <h3>Field Detail</h3>
  228. <a name="bdd">
  229. <!-- -->
  230. </a>
  231. <ul class="blockList">
  232. <li class="blockList">
  233. <h4>bdd</h4>
  234. <pre>private&nbsp;java.sql.Connection bdd</pre>
  235. <div class="block">Connexion à la base de données.</div>
  236. </li>
  237. </ul>
  238. <a name="listeQuestions">
  239. <!-- -->
  240. </a>
  241. <ul class="blockListLast">
  242. <li class="blockList">
  243. <h4>listeQuestions</h4>
  244. <pre>private&nbsp;java.util.ArrayList&lt;<a href="../Modele/Question.html" title="class in Modele">Question</a>&gt; listeQuestions</pre>
  245. <div class="block">Tableau contenant la liste de toutes les questions stockées en base de données.</div>
  246. </li>
  247. </ul>
  248. </li>
  249. </ul>
  250. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  251. <ul class="blockList">
  252. <li class="blockList"><a name="constructor_detail">
  253. <!-- -->
  254. </a>
  255. <h3>Constructor Detail</h3>
  256. <a name="GestionQuestions(java.sql.Connection)">
  257. <!-- -->
  258. </a>
  259. <ul class="blockListLast">
  260. <li class="blockList">
  261. <h4>GestionQuestions</h4>
  262. <pre>public&nbsp;GestionQuestions(java.sql.Connection&nbsp;bdd)</pre>
  263. <div class="block">Constructeur donnant accées à la base de données.</div>
  264. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>bdd</code> - La connexion à la base de données.</dd></dl>
  265. </li>
  266. </ul>
  267. </li>
  268. </ul>
  269. <!-- ============ METHOD DETAIL ========== -->
  270. <ul class="blockList">
  271. <li class="blockList"><a name="method_detail">
  272. <!-- -->
  273. </a>
  274. <h3>Method Detail</h3>
  275. <a name="readQuestions(java.lang.String, java.lang.String)">
  276. <!-- -->
  277. </a>
  278. <ul class="blockList">
  279. <li class="blockList">
  280. <h4>readQuestions</h4>
  281. <pre>public&nbsp;void&nbsp;readQuestions(java.lang.String&nbsp;reponse1,
  282. java.lang.String&nbsp;reponse2)
  283. throws java.sql.SQLException</pre>
  284. <div class="block">Remplis le tableau interne des questions liées à un jeu de réponses depuis la base de données.</div>
  285. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>reponse1</code> - La réponse une du jeu de réponses lié.</dd><dd><code>reponse2</code> - la réponse deux du jeu de réponses lié.</dd>
  286. <dt><span class="strong">Throws:</span></dt>
  287. <dd><code>java.sql.SQLException</code> - Si une erreur SQL survient.</dd></dl>
  288. </li>
  289. </ul>
  290. <a name="createQuestion(java.lang.String, java.lang.String, java.lang.String, int)">
  291. <!-- -->
  292. </a>
  293. <ul class="blockList">
  294. <li class="blockList">
  295. <h4>createQuestion</h4>
  296. <pre>public&nbsp;void&nbsp;createQuestion(java.lang.String&nbsp;intitule,
  297. java.lang.String&nbsp;reponse1,
  298. java.lang.String&nbsp;reponse2,
  299. int&nbsp;num_reponse)
  300. throws java.sql.SQLException</pre>
  301. <div class="block">Crée une nouvelle question.</div>
  302. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>intitule</code> - Intitulé de la question.</dd><dd><code>reponse1</code> - Réponse une du jeu de question lié.</dd><dd><code>reponse2</code> - Réponse une du jeu de question lié.</dd><dd><code>num_reponse</code> - Numéro de la bonne réponses (1: reponse1, 2: réponse2, 0: les deux)</dd>
  303. <dt><span class="strong">Throws:</span></dt>
  304. <dd><code>java.sql.SQLException</code> - Si une erreur mysql survient.</dd></dl>
  305. </li>
  306. </ul>
  307. <a name="deleteQuestion(java.lang.String, java.lang.String, java.lang.String)">
  308. <!-- -->
  309. </a>
  310. <ul class="blockList">
  311. <li class="blockList">
  312. <h4>deleteQuestion</h4>
  313. <pre>public&nbsp;void&nbsp;deleteQuestion(java.lang.String&nbsp;intitule,
  314. java.lang.String&nbsp;reponse1,
  315. java.lang.String&nbsp;reponse2)
  316. throws java.sql.SQLException</pre>
  317. <div class="block">Supprime une question de la base de données.</div>
  318. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>intitule</code> - Intitulé de la question à supprimer.</dd><dd><code>reponse1</code> - Réponse une du jeu de question lié à la question à supprimer.</dd><dd><code>reponse2</code> - Réponse deux du jeu de question lié à la question à supprimer.</dd>
  319. <dt><span class="strong">Throws:</span></dt>
  320. <dd><code>java.sql.SQLException</code> - Si une erreur SQL survient.</dd></dl>
  321. </li>
  322. </ul>
  323. <a name="updateQuestion(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)">
  324. <!-- -->
  325. </a>
  326. <ul class="blockList">
  327. <li class="blockList">
  328. <h4>updateQuestion</h4>
  329. <pre>public&nbsp;void&nbsp;updateQuestion(java.lang.String&nbsp;oldIntitule,
  330. java.lang.String&nbsp;newIntitule,
  331. java.lang.String&nbsp;reponse1,
  332. java.lang.String&nbsp;reponse2,
  333. int&nbsp;newNum_reponse)
  334. throws java.sql.SQLException</pre>
  335. <div class="block">Modifie une question.</div>
  336. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>oldIntitule</code> - Ancien intitulé de la question à modifier.</dd><dd><code>newIntitule</code> - Nouvel intitulé de la question à modifier.</dd><dd><code>reponse1</code> - Réponse une du jeu de question lié.</dd><dd><code>reponse2</code> - Réponse deux du jeu de question lié.</dd><dd><code>newNum_reponse</code> - Nouveau numéro de la bonne réponse (1: reponse1, 2: réponse2, 0: les deux)</dd>
  337. <dt><span class="strong">Throws:</span></dt>
  338. <dd><code>java.sql.SQLException</code></dd></dl>
  339. </li>
  340. </ul>
  341. <a name="getListeQuestions()">
  342. <!-- -->
  343. </a>
  344. <ul class="blockListLast">
  345. <li class="blockList">
  346. <h4>getListeQuestions</h4>
  347. <pre>public&nbsp;java.util.ArrayList&lt;<a href="../Modele/Question.html" title="class in Modele">Question</a>&gt;&nbsp;getListeQuestions()</pre>
  348. <div class="block">Renvoie le tableau interne contenant les questions.</div>
  349. <dl><dt><span class="strong">Returns:</span></dt><dd>Un tableau d'objets Question.</dd></dl>
  350. </li>
  351. </ul>
  352. </li>
  353. </ul>
  354. </li>
  355. </ul>
  356. </div>
  357. </div>
  358. <!-- ========= END OF CLASS DATA ========= -->
  359. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  360. <div class="bottomNav"><a name="navbar_bottom">
  361. <!-- -->
  362. </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
  363. <!-- -->
  364. </a>
  365. <ul class="navList" title="Navigation">
  366. <li><a href="../overview-summary.html">Overview</a></li>
  367. <li><a href="package-summary.html">Package</a></li>
  368. <li class="navBarCell1Rev">Class</li>
  369. <li><a href="package-tree.html">Tree</a></li>
  370. <li><a href="../deprecated-list.html">Deprecated</a></li>
  371. <li><a href="../index-files/index-1.html">Index</a></li>
  372. <li><a href="../help-doc.html">Help</a></li>
  373. </ul>
  374. </div>
  375. <div class="subNav">
  376. <ul class="navList">
  377. <li><a href="../GestionBddDAO/GestionCategories.html" title="class in GestionBddDAO"><span class="strong">Prev Class</span></a></li>
  378. <li><a href="../GestionBddDAO/GestionReponses.html" title="class in GestionBddDAO"><span class="strong">Next Class</span></a></li>
  379. </ul>
  380. <ul class="navList">
  381. <li><a href="../index.html?GestionBddDAO/GestionQuestions.html" target="_top">Frames</a></li>
  382. <li><a href="GestionQuestions.html" target="_top">No Frames</a></li>
  383. </ul>
  384. <ul class="navList" id="allclasses_navbar_bottom">
  385. <li><a href="../allclasses-noframe.html">All Classes</a></li>
  386. </ul>
  387. <div>
  388. <script type="text/javascript"><!--
  389. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  390. if(window==top) {
  391. allClassesLink.style.display = "block";
  392. }
  393. else {
  394. allClassesLink.style.display = "none";
  395. }
  396. //-->
  397. </script>
  398. </div>
  399. <div>
  400. <ul class="subNavList">
  401. <li>Summary:&nbsp;</li>
  402. <li>Nested&nbsp;|&nbsp;</li>
  403. <li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
  404. <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
  405. <li><a href="#method_summary">Method</a></li>
  406. </ul>
  407. <ul class="subNavList">
  408. <li>Detail:&nbsp;</li>
  409. <li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
  410. <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
  411. <li><a href="#method_detail">Method</a></li>
  412. </ul>
  413. </div>
  414. <a name="skip-navbar_bottom">
  415. <!-- -->
  416. </a></div>
  417. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  418. </body>
  419. </html>