TODO : merge

This commit is contained in:
trochas
2025-09-19 09:47:10 +02:00
parent 78603b2d26
commit aabaed6755
13 changed files with 125 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ public class Choix extends Reponse{
@Id
@GeneratedValue
int id;
private int id;
ArrayList<String> choix;
@@ -17,6 +17,14 @@ public class Choix extends Reponse{
super();
}
public void setId(int id){
this.id=id;
}
public int getId(){
return this.id;
}

View File

@@ -12,10 +12,12 @@ public class Question {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@OneToMany(mappedBy ="reponse", cascade = CascadeType.DETACH)
private Reponse reponse;
@Id
@GeneratedValue
public int getId() {
return id;
}
@@ -23,7 +25,6 @@ public class Question {
this.id = id;
}
@OneToMany(mappedBy ="reponse", cascade = CascadeType.DETACH)
public Reponse getReponse() {
return reponse;
}
@@ -31,4 +32,5 @@ public class Question {
public void setReponse(Reponse reponse) {
this.reponse = reponse;
}
}

View File

@@ -10,7 +10,7 @@ public class Quizz{
@Id
@GeneratedValue
public int id;
private int id;
@ManyToOne
@JoinColumn(name="id_utilisateur")
@@ -19,4 +19,21 @@ public class Quizz{
public Quizz(){
super();
}
public void setId(int id){
this.id=id;
}
public int getId(){
return this.id;
}
public void setutilisateur(Utilisateur utilisateur){
this.utilisateur=utilisateur;
}
public Utilisateur getUtilisateur(){
return this.utilisateur;
}
}

View File

@@ -2,7 +2,6 @@ package metier;
import java.util.ArrayList;
import javax.annotation.processing.Generated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
@@ -19,4 +18,21 @@ public abstract class Reponse {
public Reponse(){
}
public void setId(int id){
this.id=id;
}
public int getId(){
return this.id;
}
public void setReponses(ArrayList<String> reponses){
this.reponses=reponses;
}
public ArrayList<String> getReponses(){
return this.reponses;
}
}

View File

@@ -8,7 +8,7 @@ public class ReponseCourte extends Reponse{
@Id
@GeneratedValue
int id;
private int id;
String value;
@@ -17,4 +17,21 @@ public class ReponseCourte extends Reponse{
super();
}
public void setId(int id){
this.id=id;
}
public int getId(){
return this.id;
}
public void setValue(String value){
this.value=value;
}
public String getValue(){
return this.value;
}
}

View File

@@ -9,6 +9,7 @@ public class Utilisateur{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
private String name;
@ManyToMany
@@ -42,4 +43,24 @@ public class Utilisateur{
public Session getSession() {
return session;
}
public void setSession(Session session){
this.session = session;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
}