clean structure de class
This commit is contained in:
BIN
data/test.lck
BIN
data/test.lck
Binary file not shown.
@@ -1,21 +0,0 @@
|
||||
package metier;
|
||||
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
public abstract class Activity {
|
||||
@Id
|
||||
@GeneratedValue
|
||||
public int id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name="id_utilisateur")
|
||||
private Utilisateur utilisateur;
|
||||
|
||||
public Activity(){
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package metier;
|
||||
|
||||
public class Classement {
|
||||
private Question question;
|
||||
|
||||
}
|
||||
@@ -2,13 +2,15 @@ package metier;
|
||||
|
||||
import jakarta.persistence.CascadeType;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.OneToMany;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Question {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
private Reponse reponse;
|
||||
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
package metier;
|
||||
|
||||
public class Quizz extends Activity{
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
public class Quizz{
|
||||
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
public int id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name="id_utilisateur")
|
||||
private Utilisateur utilisateur;
|
||||
|
||||
public Quizz(){
|
||||
super();
|
||||
|
||||
@@ -2,10 +2,15 @@ package metier;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.annotation.processing.Generated;
|
||||
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
public abstract class Reponse {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
|
||||
ArrayList<String> reponses;
|
||||
|
||||
@@ -11,7 +11,7 @@ public class Session {
|
||||
private int codePIN;
|
||||
|
||||
@OneToMany
|
||||
private ArrayList<Activity> activities;
|
||||
private ArrayList<Quizz> activities;
|
||||
|
||||
@ManyToMany
|
||||
private ArrayList<Utilisateur> utilisateurs;
|
||||
@@ -27,11 +27,11 @@ public class Session {
|
||||
return this.codePIN;
|
||||
}
|
||||
|
||||
public void setActivities(ArrayList<Activity> activities){
|
||||
public void setActivities(ArrayList<Quizz> activities){
|
||||
this.activities = activities;
|
||||
}
|
||||
|
||||
public ArrayList<Activity> getActivities(){
|
||||
public ArrayList<Quizz> getActivities(){
|
||||
return this.activities;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public class Utilisateur{
|
||||
private String password;
|
||||
|
||||
@OneToMany(mappedBy = "utilisateur")
|
||||
private List<Activity> activities;
|
||||
private List<Quizz> activities;
|
||||
|
||||
public Utilisateur() {}
|
||||
|
||||
|
||||
BIN
target/classes/DAO/ChoixDAO.class
Normal file
BIN
target/classes/DAO/ChoixDAO.class
Normal file
Binary file not shown.
BIN
target/classes/DAO/QuestionDAO.class
Normal file
BIN
target/classes/DAO/QuestionDAO.class
Normal file
Binary file not shown.
BIN
target/classes/DAO/QuizzDAO.class
Normal file
BIN
target/classes/DAO/QuizzDAO.class
Normal file
Binary file not shown.
BIN
target/classes/DAO/ReponseCourteDAO.class
Normal file
BIN
target/classes/DAO/ReponseCourteDAO.class
Normal file
Binary file not shown.
BIN
target/classes/DAO/ReponseDAO.class
Normal file
BIN
target/classes/DAO/ReponseDAO.class
Normal file
Binary file not shown.
BIN
target/classes/DAO/SessionDAO.class
Normal file
BIN
target/classes/DAO/SessionDAO.class
Normal file
Binary file not shown.
BIN
target/classes/DAO/Tous.class
Normal file
BIN
target/classes/DAO/Tous.class
Normal file
Binary file not shown.
BIN
target/classes/DAO/TousDAOImpl.class
Normal file
BIN
target/classes/DAO/TousDAOImpl.class
Normal file
Binary file not shown.
BIN
target/classes/DAO/UtilisateurDAO.class
Normal file
BIN
target/classes/DAO/UtilisateurDAO.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user