Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| sio:bloc2:2a:td4 [2025/12/01 01:31] – créée jcheron | sio:bloc2:2a:td4 [2025/12/02 20:36] (Version actuelle) – [Partie 2 : Repositories (15 min)] jcheron | ||
|---|---|---|---|
| Ligne 12: | Ligne 12: | ||
| ==== Diagramme PlantUML ==== | ==== Diagramme PlantUML ==== | ||
| + | < | ||
| <uml> | <uml> | ||
| @startuml | @startuml | ||
| + | |||
| + | class Profile { | ||
| + | - id: UUID | ||
| + | - username: String | ||
| + | - ... | ||
| + | } | ||
| + | |||
| + | class Comment { | ||
| + | - id: UUID | ||
| + | - content: String | ||
| + | - authorName: String | ||
| + | - authorEmail: | ||
| + | - createdAt: LocalDateTime | ||
| + | - status: CommentStatus | ||
| + | + getAverageScore(): | ||
| + | } | ||
| + | |||
| + | class Rating { | ||
| + | - id: UUID | ||
| + | - score: Integer | ||
| + | - category: RatingCategory | ||
| + | } | ||
| enum CommentStatus { | enum CommentStatus { | ||
| Ligne 28: | Ligne 50: | ||
| } | } | ||
| - | entity | + | Profile |
| - | id: Long | + | Comment " |
| - | ... | + | Comment -- CommentStatus |
| - | } | + | Rating -- RatingCategory |
| - | entity | + | note right of Comment |
| - | | + | |
| - | | + | |
| - | | + | end note |
| - | authorEmail: | + | |
| - | createdAt: LocalDateTime | + | |
| - | status: CommentStatus | + | |
| - | } | + | |
| - | entity | + | note right of Rating |
| - | id: Long | + | score doit être compris |
| - | score: Integer | + | |
| - | | + | end note |
| - | } | + | |
| - | + | ||
| - | Profile ||--o{ Comment : "has many" | + | |
| - | Comment ||--o{ Rating : "has many" | + | |
| - | Comment }o-- CommentStatus | + | |
| - | Rating }o-- RatingCategory | + | |
| @enduml | @enduml | ||
| </ | </ | ||
| + | < | ||
| ===== Travail demandé ===== | ===== Travail demandé ===== | ||
| Ligne 69: | Ligne 81: | ||
| Attributs : | Attributs : | ||
| - | * '' | + | * '' |
| * '' | * '' | ||
| * '' | * '' | ||
| Ligne 84: | Ligne 96: | ||
| Attributs : | Attributs : | ||
| - | * '' | + | * '' |
| * '' | * '' | ||
| * '' | * '' | ||
| Ligne 93: | Ligne 105: | ||
| ---- | ---- | ||
| - | ==== Partie 2 : Repositories (10 min) ==== | + | ==== Partie 2 : Repositories (15 min) ==== |
| **5. Créer '' | **5. Créer '' | ||
| - | * Hérite de '' | + | * Hérite de '' |
| * Méthode personnalisée : trouver les commentaires par ID de profil ET statut | * Méthode personnalisée : trouver les commentaires par ID de profil ET statut | ||
| **6. Créer '' | **6. Créer '' | ||
| - | * Hérite de '' | + | * Hérite de '' |
| * Méthode personnalisée : trouver toutes les notes d'un commentaire | * Méthode personnalisée : trouver toutes les notes d'un commentaire | ||
| Ligne 111: | Ligne 123: | ||
| * '' | * '' | ||
| - | Validations : | ||
| - | * '' | ||
| - | * '' | ||
| **8. Créer '' | **8. Créer '' | ||
| Ligne 123: | Ligne 132: | ||
| * '' | * '' | ||
| - | Validations : | ||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| **9. Créer '' | **9. Créer '' | ||
| Ligne 139: | Ligne 143: | ||
| * '' | * '' | ||
| * '' | * '' | ||
| - | |||
| - | < | ||
| Ligne 148: | Ligne 150: | ||
| ^ Critère ^ Points ^ | ^ Critère ^ Points ^ | ||
| - | | **Entités** : annotations JPA correctes, relations bidirectionnelles cohérentes | /4 | | + | | **Entités** : annotations JPA correctes, relations bidirectionnelles cohérentes | /5 | |
| | **Repositories** : déclarations correctes avec méthodes personnalisées | /3 | | | **Repositories** : déclarations correctes avec méthodes personnalisées | /3 | | ||
| - | | **DTOs** : structure et validations appropriées | /3 | | + | | **DTOs** : structure et validations appropriées | /2 | |