diff --git a/build/API/Requete.class b/build/API/Requete.class index bf9ae91..bf2ac1b 100644 Binary files a/build/API/Requete.class and b/build/API/Requete.class differ diff --git a/build/MNP/RequeteNP.class b/build/MNP/RequeteNP.class index 89620bb..76bcef9 100644 Binary files a/build/MNP/RequeteNP.class and b/build/MNP/RequeteNP.class differ diff --git a/build/Test/BDatabase.class b/build/Test/BDatabase.class index 05e4d13..3984492 100644 Binary files a/build/Test/BDatabase.class and b/build/Test/BDatabase.class differ diff --git a/build/Test/Controller.class b/build/Test/Controller.class index 7917bea..14c213a 100644 Binary files a/build/Test/Controller.class and b/build/Test/Controller.class differ diff --git a/src/API/Requete.java b/src/API/Requete.java index 786994e..91d9a4f 100644 --- a/src/API/Requete.java +++ b/src/API/Requete.java @@ -32,6 +32,11 @@ public interface Requete extends MonPrint { * */ public int getWitchGroupe(); + /** + * Recuperer le statut de la requete + * */ + public String getStatut(); + /** * @see MonPrint * NB. On n'utilise le mécanisme des méthodes par défaut pour donner du code dans une interface. C'est un petit peu laid et à contre-emploi mais pratique ici. diff --git a/src/MNP/RequeteNP.java b/src/MNP/RequeteNP.java index 0230d1f..1b13cd0 100644 --- a/src/MNP/RequeteNP.java +++ b/src/MNP/RequeteNP.java @@ -8,13 +8,15 @@ public class RequeteNP implements Requete { private final int etuSource; private final int type; private final int witchGroupe; + private final String status; - public RequeteNP(int id, String message, int etuSource, int type, int witchGroupe) { + public RequeteNP(int id, String message, int etuSource, int type, int witchGroupe, String status) { this.id = id; this.message = message; this.etuSource = etuSource; this.type = type; this.witchGroupe = witchGroupe; + this.status = status; } @Override @@ -41,4 +43,9 @@ public class RequeteNP implements Requete { public int getWitchGroupe() { return this.witchGroupe; } + + @Override + public String getStatut() { + return this.status; + } } diff --git a/src/Test/BDatabase.java b/src/Test/BDatabase.java index df2a7ea..ec8d0ad 100644 --- a/src/Test/BDatabase.java +++ b/src/Test/BDatabase.java @@ -240,7 +240,8 @@ public class BDatabase { requestMessage.get(i), Integer.parseInt(requestEtu.get(i)), Integer.parseInt(requestType.get(i)), - Integer.parseInt(requestWitchGrup.get(i)) + Integer.parseInt(requestWitchGrup.get(i)), + requestStatut.get(i) ) ); } diff --git a/src/Test/Controller.java b/src/Test/Controller.java index 98a8de8..dfa1fc3 100644 --- a/src/Test/Controller.java +++ b/src/Test/Controller.java @@ -623,6 +623,8 @@ public class Controller implements ActionListener, ListSelectionListener { } else if(Objects.equals(command, "av::ShowRequestFromStudent")) { + this.r = this.db.getRequestList(); + Object[][] data = new Object[this.r.size()][5]; String[] titre = { @@ -634,6 +636,7 @@ public class Controller implements ActionListener, ListSelectionListener { }; for(int i = 0; i <= this.r.size()-1; i++) { + System.out.println(this.getGroupeById(this.r.get(i).getWitchGroupe())); Object[] info = { this.getEtuNameById(this.r.get(i).getEtuId()), this.getGroupeById(this.r.get(i).getWitchGroupe()),