retest jpatest works
This commit is contained in:
25
README.md
25
README.md
@@ -18,60 +18,37 @@ classDiagram
|
|||||||
-email : String
|
-email : String
|
||||||
-password : String
|
-password : String
|
||||||
-quizzs : String
|
-quizzs : String
|
||||||
+getId()int
|
|
||||||
+setId(id:int)void
|
|
||||||
+getName()String
|
|
||||||
+setName(name:String)void
|
|
||||||
}
|
}
|
||||||
class Session{
|
class Session{
|
||||||
-codePin : int
|
-codePin : int
|
||||||
-quizzs : List<Quizz>
|
-quizzs : List<Quizz>
|
||||||
-utilisateurs : List<Utilisateur>
|
-utilisateurs : List<Utilisateur>
|
||||||
-theme : int
|
-theme : int
|
||||||
+getCodePIN()int
|
|
||||||
+setCodePIN(id:int)void
|
|
||||||
+getTheme()String
|
|
||||||
+setTheme(theme:String)void
|
|
||||||
}
|
}
|
||||||
class Quizz{
|
class Quizz{
|
||||||
-session: Session
|
-session: Session
|
||||||
-id : int
|
-id : int
|
||||||
-utilisateur: Utilisateur
|
-utilisateur: Utilisateur
|
||||||
+getId()int
|
|
||||||
+setId(id:int)void
|
|
||||||
}
|
}
|
||||||
class Reponse{
|
class Reponse{
|
||||||
-id : int
|
-id : int
|
||||||
-question: Question
|
-question: Question
|
||||||
-reponses : ArrayList<String>
|
-reponses : ArrayList<String>
|
||||||
+getId()int
|
|
||||||
+setId(id:int)void
|
|
||||||
+getReponse()ArrayList<String>
|
|
||||||
+setReponse(reponse:ArrayList<String> )void
|
|
||||||
}
|
}
|
||||||
class Choix{
|
class Choix{
|
||||||
-choix : ArrayList<String>
|
-choix : ArrayList<String>
|
||||||
+getId()int
|
|
||||||
+setId(id:int)void
|
|
||||||
+getChoix()List<String>
|
|
||||||
+setChoix(choix:List<String>)void
|
|
||||||
}
|
}
|
||||||
class ReponseCourte{
|
class ReponseCourte{
|
||||||
-value : String
|
-value : String
|
||||||
+getId()int
|
+getId()int
|
||||||
+setId(id:int)void
|
|
||||||
+getVlaue()String
|
|
||||||
+setId(id:String)void
|
|
||||||
}
|
}
|
||||||
class Question{
|
class Question{
|
||||||
-id : int
|
-id : int
|
||||||
-reponse: Reponse
|
-reponse: Reponse
|
||||||
+getId()int
|
|
||||||
+setId(id:int)void
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Commande pour supprimer: ```rm -rd data/*```
|
Commande pour supprimer: ```rm -rd data/*```
|
||||||
|
|
||||||
run :
|
run :
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class JpaTest {
|
|||||||
* @param args
|
* @param args
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
EntityManager manager = EntityManagerHelper.getEntityManager();
|
EntityManager manager = EntityManagerHelper.getEntityManager();
|
||||||
|
|
||||||
JpaTest test = new JpaTest(manager);
|
JpaTest test = new JpaTest(manager);
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ public class Session implements Serializable {
|
|||||||
|
|
||||||
@OneToMany(mappedBy="session")
|
@OneToMany(mappedBy="session")
|
||||||
private List<Quizz> quizzs = new ArrayList<>();
|
private List<Quizz> quizzs = new ArrayList<>();
|
||||||
|
|
||||||
|
@ManyToMany(mappedBy = "session")
|
||||||
private List<Utilisateur> utilisateurs = new ArrayList<>();
|
private List<Utilisateur> utilisateurs = new ArrayList<>();
|
||||||
private String theme;
|
private String theme;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class Utilisateur implements Serializable {
|
|||||||
@JoinTable(
|
@JoinTable(
|
||||||
name="utilisateur_session",
|
name="utilisateur_session",
|
||||||
joinColumns = @JoinColumn(name="utilisateur_id"),
|
joinColumns = @JoinColumn(name="utilisateur_id"),
|
||||||
inverseJoinColumns = @JoinColumn(name = "session_pin")
|
inverseJoinColumns = @JoinColumn(name = "session_codePIN")
|
||||||
)
|
)
|
||||||
private List<Session> session= new ArrayList<>();;
|
private List<Session> session= new ArrayList<>();;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user