diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 00000000..584cb668
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/httpRequests/http-client.cookies b/.idea/httpRequests/http-client.cookies
new file mode 100644
index 00000000..e69de29b
diff --git a/.idea/httpRequests/http-requests-log.http b/.idea/httpRequests/http-requests-log.http
new file mode 100644
index 00000000..e69de29b
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 00000000..712ab9d9
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 00000000..7bd4dafc
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..6c485486
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..94a25f7f
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 00000000..a48a77cb
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,356 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "lastFilter": {
+ "state": "OPEN",
+ "assignee": "Mane-Mt"
+ }
+}
+ {
+ "selectedUrlAndAccountId": {
+ "url": "https://github.com/Tagatte/JaxRSOpenAPI.git",
+ "accountId": "ef562648-8f75-4a36-965f-b2f61ca56dd2"
+ }
+}
+ {
+ "isOnboardingCommentShown": true
+}
+ {
+ "associatedIndex": 7
+}
+
+
+
+
+
+
+
+
+ {
+ "keyToString": {
+ "Application.JpaTest.executor": "Run",
+ "Application.RestServer.executor": "Run",
+ "JUnit.fr.istic.taa.jaxrs.domain in jaxrs-example.executor": "Run",
+ "ModuleVcsDetector.initialDetectionPerformed": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
+ "RunOnceActivity.git.unshallow": "true",
+ "RunOnceActivity.typescript.service.memoryLimit.init": "true",
+ "Shell Script.run-hsqldb-server.sh.executor": "Run",
+ "Shell Script.show-hsqldb.sh.executor": "Run",
+ "codeWithMe.voiceChat.enabledByDefault": "false",
+ "dart.analysis.tool.window.visible": "false",
+ "git-widget-placeholder": "develop",
+ "ignore.virus.scanning.warn.message": "true",
+ "kotlin-language-version-configured": "true",
+ "last_opened_file_path": "C:/Users/tdiop/JaxRSOpenAPI",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "project.structure.last.edited": "Modules",
+ "project.structure.proportion": "0.15",
+ "project.structure.side.proportion": "0.0",
+ "vue.rearranger.settings.migration": "true"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1771507326454
+
+
+ 1771507326454
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1771582696146
+
+
+
+ 1771582696146
+
+
+
+ 1771583307620
+
+
+
+ 1771583307620
+
+
+
+ 1772239721335
+
+
+
+ 1772239721335
+
+
+
+ 1772301189786
+
+
+
+ 1772301189786
+
+
+
+ 1772301390527
+
+
+
+ 1772301390527
+
+
+
+ 1777214539908
+
+
+
+ 1777214539908
+
+
+
+ 1778944014671
+
+
+
+ 1778944014671
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ file://$PROJECT_DIR$/src/main/java/fr/istic/taa/jaxrs/rest/ConcertResource.java
+ 142
+
+
+
+ file://$PROJECT_DIR$/src/main/java/fr/istic/taa/jaxrs/dto/ConcertBaseDto.java
+ 20
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 09032612..9cd52cba 100644
--- a/README.md
+++ b/README.md
@@ -1,149 +1,271 @@
-## JaxRS + openAPI
+# 🎵 Stagely — Billetterie de Concerts
-1. Import this project in your IDE,
-2. Start the database
-3. Start the database viewer
-4. Start the backend. There is a main class to start the backend
+Plateforme de billetterie de concerts permettant aux utilisateurs de rechercher, consulter et acheter des tickets, aux organisateurs de gérer leurs événements, et aux administrateurs de valider et modérer les contenus.
+---
+## 🎬 Démo
+▶️ [Voir la démo sur Google Drive](https://drive.google.com/file/d/1d064biE2iS1UYH3rhWBccb9QUndaaVQS/view)
-# Task Open API Integration
+---
-Now, we would like to ensure that our API can be discovered. The OpenAPI Initiative (OAI) was created by a consortium of forward-looking industry experts who recognize the immense value of standardizing on how REST APIs are described. As an open governance structure under the Linux Foundation, the OAI is focused on creating, evolving and promoting a vendor neutral description format.
+## 🤖 Utilisation de l'IA
-APIs form the connecting glue between modern applications. Nearly every application uses APIs to connect with corporate data sources, third party data services or other applications. Creating an open description format for API services that is vendor neutral, portable and open is critical to accelerating the vision of a truly connected world.
+Le style et le design de l'interface utilisateur ont été en partie générés et affinés à l'aide de **Claude (Anthropic)**. L'IA a été utilisée pour :
-To do this integration first, I already add a dependencies to openAPI libraries.
+- Générer les feuilles de style CSS des composants (user-list, artist-list, organizer-list, admin-dashboard, formulaires...)
+- Assurer la cohérence visuelle entre les pages (palette de couleurs, typographie, espacements)
+- Rendre les interfaces responsives (media queries, transformation des tableaux en cards sur mobile)
+- Suggérer et implémenter des patterns de design (badges de statut, cards de navigation, tableaux stylisés)
-```xml
-
- io.swagger.core.v3
- swagger-jaxrs2-jakarta
- 2.2.15
-
+---
-
- io.swagger.core.v3
- swagger-jaxrs2-servlet-initializer-v2
- 2.2.15
-
-```
+## 📋 Modèle Métier
-Next you have to add OpenAPI Resource to your application
+### Diagramme de classes
-Your application could be something like that.
+
-```java
-@ApplicationPath("/")
-public class RestApplication extends Application {
+### Entités principales
- @Override
- public Set> getClasses() {
- final Set> resources = new HashSet<>();
+| Entité | Description |
+|--------|-------------|
+| `Person` | Classe abstraite parente (héritage SINGLE_TABLE) |
+| `User` | Utilisateur / acheteur de tickets |
+| `Admin` | Administrateur de la plateforme |
+| `Artist` | Artiste musical |
+| `Organizer` | Organisateur d'événements |
+| `Concert` | Événement musical |
+| `Ticket` | Billet d'entrée (lié au concert, sans relation directe User — utilise `buyerEmail`) |
+| `Notification` | Alerte liée à un concert |
+| `AdminStats` | DTO de statistiques globales |
+### Relations
+- `Person` → héritage `SINGLE_TABLE` avec discriminateur `Type`
+- `Concert` → `Ticket` : OneToMany (`@JsonIgnore` sur tickets)
+- `Concert` → `Artist` : ManyToMany (bidirectionnel)
+- `Concert` → `Notification` : OneToMany
+- `Concert` → `Admin` : ManyToOne
+- `Concert` → `Organizer` : ManyToOne (`@JsonIgnore` côté Organizer)
+- `Ticket` → `Concert` : ManyToOne (sans relation User — utilise `buyerEmail` et `transferorEmail`)
- // SWAGGER endpoints
- resources.add(OpenApiResource.class);
+---
- //Your own resources.
- resources.add(PersonResource.class);
-....
- return resources;
- }
-}
-```
+## 🚀 Lancement du projet
+
+### Prérequis
+- Java 17+
+- Maven
+- Node.js 18+
+- Angular CLI
-Next start your server, you must have your api description available at [http://localhost:8080/openapi.json](http://localhost:8080/openapi.json)
+### Backend (JAX-RS)
-### Integrate Swagger UI.
+```bash
+# 1. Démarrer le serveur HSQLDB
+cd JaxRSOpenAPI/data
+java -cp ../target/dependency/hsqldb-2.7.2.jar org.hsqldb.Server
-Next we have to integrate Swagger UI. We will first download it.
-https://github.com/swagger-api/swagger-ui
+# 2. Initialiser les données (première fois)
+# Lancer JpaTest depuis IntelliJ
-Copy dist folder content in src/main/webapp/swagger in your project.
+# 3. Démarrer le serveur REST
+# Lancer RestServer depuis IntelliJ
+# → http://localhost:8080
+```
+
+### Frontend (Angular)
-Edit index.html file to automatically load your openapi.json file.
+```bash
+cd BilleterieFrontend
+npm install
+ng serve
+# → http://localhost:4200
+```
-At the end of the index.html, your must have something like that.
+---
+
+## 🌐 Endpoints API REST
+
+### 👤 Users `/api/users`
+| Méthode | URL | Description |
+|---------|-----|-------------|
+| GET | `/users/` | Liste tous les utilisateurs |
+| GET | `/users/{id}` | Détails d'un utilisateur |
+| POST | `/users/` | Créer un utilisateur |
+| PUT | `/users/{id}` | Modifier un utilisateur |
+| DELETE | `/users/{id}` | Supprimer un utilisateur |
+
+### 🎤 Artists `/api/artists`
+| Méthode | URL | Description |
+|---------|-----|-------------|
+| GET | `/artists/` | Liste tous les artistes |
+| GET | `/artists/{id}` | Détails d'un artiste |
+| POST | `/artists/` | Créer un artiste |
+| PUT | `/artists/{id}` | Modifier un artiste |
+| DELETE | `/artists/{id}` | Supprimer un artiste |
+
+### 🎪 Organizers `/api/organizers`
+| Méthode | URL | Description |
+|---------|-----|-------------|
+| GET | `/organizers/` | Liste tous les organisateurs |
+| GET | `/organizers/{id}` | Détails d'un organisateur |
+| POST | `/organizers/` | Créer un organisateur |
+| PUT | `/organizers/{id}` | Modifier un organisateur |
+| DELETE | `/organizers/{id}` | Supprimer un organisateur |
+
+### 🔧 Admins `/api/admins`
+| Méthode | URL | Description |
+|---------|-----|-------------|
+| GET | `/admins/` | Liste tous les admins |
+| GET | `/admins/{id}` | Détails d'un admin |
+| POST | `/admins/` | Créer un admin |
+| PUT | `/admins/{id}` | Modifier un admin |
+| DELETE | `/admins/{id}` | Supprimer un admin |
+
+### 🎵 Concerts `/api/concerts`
+| Méthode | URL | Description |
+|---------|-----|-------------|
+| GET | `/concerts/` | Liste tous les concerts |
+| GET | `/concerts/{id}` | Détails d'un concert |
+| POST | `/concerts/` | Créer un concert |
+| PUT | `/concerts/{id}` | Modifier un concert |
+| DELETE | `/concerts/{id}` | Supprimer un concert |
+| GET | `/concerts/search?q=` | Recherche par artiste, lieu, nom, genre |
+| GET | `/concerts/location?q=` | Filtrer par lieu |
+| GET | `/concerts/validated` | Concerts validés uniquement |
+| GET | `/concerts/maxprice?price=` | Filtrer par prix maximum |
+| GET | `/concerts/sortByPopularity` | Trier par popularité |
+| GET | `/concerts/sortByPrice` | Trier par prix |
+| GET | `/concerts/sortByDate` | Trier par date |
+| GET | `/concerts/date?q=` | Rechercher par date |
+
+### 🎟️ Tickets `/api/tickets`
+| Méthode | URL | Description |
+|---------|-----|-------------|
+| GET | `/tickets/` | Liste tous les tickets |
+| GET | `/tickets/{id}` | Détails d'un ticket |
+| DELETE | `/tickets/{id}` | Supprimer un ticket |
+| POST | `/tickets/buy` | Acheter un ticket |
+| GET | `/tickets/user/{userId}` | Tickets d'un utilisateur |
+| PUT | `/tickets/{id}/cancel` | Annuler un ticket |
+| PUT | `/tickets/{id}/refund` | Rembourser un ticket |
+| PUT | `/tickets/{id}/transfer` | Transférer un ticket |
+
+### 🔔 Notifications `/api/notifications`
+| Méthode | URL | Description |
+|---------|-----|-------------|
+| GET | `/notifications/` | Liste toutes les notifications |
+| GET | `/notifications/{id}` | Détails d'une notification |
+| DELETE | `/notifications/{id}` | Supprimer une notification |
+
+### 📊 Stats `/api/stats`
+| Méthode | URL | Description |
+|---------|-----|-------------|
+| GET | `/stats/` | Statistiques globales (concerts, users, artistes, organisateurs, tickets) |
+
+---
+
+## 🎨 Frontend — Graphe de Navigation
-```js
- // Build a system
- const ui = SwaggerUIBundle({
- url: "http://localhost:8080/openapi.json",
- dom_id: '#swagger-ui',
-
- ...
+```
+/ (Accueil)
+├── /concerts → Liste des concerts
+│ ├── /concerts/create → Créer un concert
+│ └── /concerts/:id → Détail d'un concert + achat ticket
+│
+├── /tickets → Mes tickets
+│ ├── Annuler un ticket
+│ ├── Rembourser un ticket
+│ └── Transférer un ticket
+│
+├── /admin → Tableau de bord admin
+│ └── /admin/concerts → Gestion et validation des concerts
+│ ├── /users → Gestion des utilisateurs
+│ ├── /artists → Gestion des artistes
+│ └── /organizers → Gestion des organisateurs
+│
+├── /users → Liste des utilisateurs
+│ ├── /users/create → Créer un utilisateur
+│ ├── /users/:id → Détails d'un utilisateur
+│ └── /users/:id/edit → Modifier un utilisateur
+│
+├── /artists → Liste des artistes
+│ ├── /artists/create → Créer un artiste
+│ ├── /artists/:id → Détails d'un artiste
+│ └── /artists/:id/edit → Modifier un artiste
+│
+└── /organizers → Liste des organisateurs
+ ├── /organizers/create → Créer un organisateur
+ ├── /organizers/:id → Détails d'un organisateur
+ └── /organizers/:id/edit → Modifier un organisateur
```
-Next add a new resources to create a simple http server when your try to access to http://localhost:8080/api/.
+---
-This new resources can be developped as follows
+## 🗄️ DAO — Requêtes spéciales
+### JPQL
```java
-package app.web.rest;
-
-import java.io.IOException;
-import java.nio.file.FileSystems;
-import java.nio.file.Files;
-import java.util.logging.Logger;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-
-@Path("/api")
-public class SwaggerResource {
-
- private static final Logger logger = Logger.getLogger(SwaggerResource.class.getName());
-
- @GET
- public byte[] Get1() {
- try {
- return Files.readAllBytes(FileSystems.getDefault().getPath("src/main/webapp/swagger/index.html"));
- } catch (IOException e) {
- return null;
- }
- }
-
- @GET
- @Path("{path:.*}")
- public byte[] Get(@PathParam("path") String path) {
- try {
- return Files.readAllBytes(FileSystems.getDefault().getPath("src/main/webapp/swagger/"+path));
- } catch (IOException e) {
- return null;
- }
- }
-
-}
+// Recherche multi-critères dans ConcertDao
+SELECT DISTINCT c FROM Concert c LEFT JOIN c.artists a
+WHERE LOWER(a.firstname) LIKE :q OR LOWER(c.name) LIKE :q ...
+
+// COUNT optimisé pour les stats
+SELECT COUNT(c) FROM Concert c
+SELECT COUNT(p) FROM Person p WHERE TYPE(p) = User
+SELECT COUNT(p) FROM Person p WHERE TYPE(p) = Artist
+SELECT COUNT(p) FROM Person p WHERE TYPE(p) = Organizer
+SELECT COUNT(t) FROM Ticket t
```
-Add this new resources in your application
+### Requêtes nommées (@NamedQuery)
+```java
+Concert.findByLocation // Concerts par lieu
+Concert.findValidated // Concerts validés
+Concert.findByDate // Concerts par date
+Concert.findAllOrderByPopularity // Tri par popularité
+Concert.findAllOrderByPrice // Tri par prix
+Concert.findAllOrderByDate // Tri par date
+```
+### Criteria Query
```java
-@ApplicationPath("/")
-public class RestApplication extends Application {
+// Concerts dont le prix est <= maxPrice
+CriteriaBuilder cb = entityManager.getCriteriaBuilder();
+cq.select(root).where(cb.lessThanOrEqualTo(root.get("price"), maxPrice));
+```
+---
- @Override
- public Set> getClasses() {
- final Set> resources = new HashSet<>();
+## 📚 Documentation OpenAPI
+La documentation OpenAPI est disponible sur :
+```
+http://localhost:8080/openapi.json
+```
- // SWAGGER endpoints
- resources.add(OpenApiResource.class);
- resources.add(PersonResource.class);
- //NEW LINE TO ADD
- resources.add(SwaggerResource.class);
+Visualisable sur [Swagger Editor](https://editor.swagger.io) en important l'URL.
- return resources;
- }
-}
-```
+---
+
+## 🛠️ Stack Technique
-Restart your server and access to http://localhost:8080/api/, you should access to a swagger ui instance that provides documentation on your api.
+### Backend
+- Java 26
+- JAX-RS (RESTEasy 6.2)
+- Hibernate 6.2 / JPA 3.1
+- HSQLDB 2.7
+- Undertow 2.3
+- Swagger / OpenAPI 3
+- Jackson (sérialisation JSON)
-You can follow this guide to show how you can specialise the documentation through annotations.
+### Frontend
+- Angular 19
+- Angular Material
+- TypeScript
+- RxJS
+- Proxy Angular (`/api` → `http://localhost:8080`)
-https://github.com/swagger-api/swagger-samples/blob/2.0/java/java-resteasy-appclasses/src/main/java/io/swagger/sample/resource/PetResource.java
\ No newline at end of file
+---
\ No newline at end of file
diff --git a/data/test.lck b/data/test.lck
new file mode 100644
index 00000000..ad3c1c62
Binary files /dev/null and b/data/test.lck differ
diff --git a/data/test.log b/data/test.log
new file mode 100644
index 00000000..c00d5617
--- /dev/null
+++ b/data/test.log
@@ -0,0 +1,622 @@
+/*C36*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h','Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C37*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h','Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C38*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h','Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C39*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h','Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C40*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+/*C41*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h','Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C42*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h','Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C40*/DISCONNECT
+/*C43*/SET SCHEMA PUBLIC
+DISCONNECT
+/*C44*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h',NULL,'Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C45*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+/*C46*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h',NULL,'Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C45*/INSERT INTO CONCERT VALUES(12,'2026-05-17',FALSE,FALSE,FALSE,12,3,NULL,NULL,2,2,200,'lorme','','rock','Renes','Pop','Inco','20h')
+INSERT INTO PERSON_CONCERT VALUES(3,2)
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 101
+COMMIT
+DISCONNECT
+/*C47*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h',NULL,'Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C48*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+/*C49*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h',NULL,'Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C48*/INSERT INTO CONCERT VALUES(12,'2026-05-06',FALSE,FALSE,FALSE,12,1,NULL,NULL,2,2,200,'KJLLK','','pop','RENNES','Pop','IOP','20')
+INSERT INTO PERSON_CONCERT VALUES(3,2)
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 101
+COMMIT
+/*C50*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h',NULL,'Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C48*/DISCONNECT
+/*C51*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h',NULL,'Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C52*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h',NULL,'Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C53*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+/*C54*/SET SCHEMA PUBLIC
+drop table if exists Concert cascade
+drop table if exists Notification cascade
+drop table if exists Person cascade
+drop table if exists Person_Concert cascade
+drop table if exists Ticket cascade
+drop sequence Concert_SEQ if exists
+drop sequence Notification_SEQ if exists
+drop sequence Ticket_SEQ if exists
+create sequence Concert_SEQ start with 1 increment by 50
+create sequence Notification_SEQ start with 1 increment by 50
+create sequence Ticket_SEQ start with 1 increment by 50
+create table Concert (availableTickets integer not null, date date, isCanceled boolean not null, isDeleted boolean not null, isValidated boolean not null, placeNumber integer not null, popularity integer not null, validationDate date, admin_id bigint, id bigint not null, organizer_id bigint, price bigint, description varchar(255), endTime varchar(255), image varchar(255), location varchar(255), musicalGenre varchar(255), name varchar(255), startTime varchar(255), primary key (id))
+create table Notification (concert_id bigint, id bigint not null, content varchar(255), type varchar(255), primary key (id))
+create table Person (id bigint generated by default as identity (start with 1), Type varchar(31) not null, email varchar(255), firstname varchar(255), lastname varchar(255), phone varchar(255), primary key (id))
+create table Person_Concert (artists_id bigint not null, concerts_id bigint not null)
+create table Ticket (cancelDate date, canceled boolean not null, date date, quantity integer not null, refundDate date, refunded boolean not null, concert_id bigint, id bigint not null, price bigint, buyerEmail varchar(255), status varchar(255), transferorEmail varchar(255), primary key (id))
+alter table Concert add constraint FKmb245nancpsa6de09i6rrt67y foreign key (admin_id) references Person
+alter table Concert add constraint FKegqsh0ssh4t4n4uup1uveofsp foreign key (organizer_id) references Person
+alter table Notification add constraint FK4dvk518sk2hy9mu70q9uayd0k foreign key (concert_id) references Concert
+alter table Person_Concert add constraint FK725heamheqk3otg1d7gjm8ud0 foreign key (concerts_id) references Concert
+alter table Person_Concert add constraint FKpe10cidi0nh5fuewxmnx1qgdq foreign key (artists_id) references Person
+alter table Ticket add constraint FKin9kj2wiejns9ptuw1pt351kg foreign key (concert_id) references Concert
+INSERT INTO PERSON VALUES(1,'Admin','admin@festival.com','Marc','Admin',NULL)
+INSERT INTO PERSON VALUES(2,'Organizer','contact@prod.com','Julie','Events',NULL)
+INSERT INTO PERSON VALUES(3,'Artist','artiste@music.be','Stromae','Paul',NULL)
+INSERT INTO PERSON VALUES(4,'User','jean.dupont@email.com','Jean','Dupont',NULL)
+INSERT INTO CONCERT VALUES(100,'2026-05-17',FALSE,FALSE,TRUE,100,0,NULL,NULL,1,NULL,75,NULL,'23h',NULL,'Bercy, Paris','Pop','Tourn\u00e9e Multitude','20h')
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-17',1,NULL,FALSE,1,1,75,'jean.dupont@email.com','confirmed',NULL)
+INSERT INTO NOTIFICATION VALUES(NULL,1,'Votre commande pour Tourn\u00e9e Multitude est valid\u00e9e.','INFO_ACHAT')
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 51
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 51
+COMMIT
+DISCONNECT
+/*C53*/INSERT INTO CONCERT VALUES(12,'2026-05-17',FALSE,FALSE,FALSE,12,1,NULL,NULL,2,2,20,'fdf','','rock','rennes','Rock','Lyre','20')
+INSERT INTO PERSON_CONCERT VALUES(3,2)
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 101
+COMMIT
+INSERT INTO CONCERT VALUES(20,'2026-05-17',FALSE,FALSE,FALSE,20,3,NULL,NULL,3,2,230,'Il y a un feu','','electro','rrennes','\u00c9lectro','Fuego','20')
+DELETE FROM PERSON_CONCERT WHERE ARTISTS_ID=3 AND CONCERTS_ID=2
+INSERT INTO PERSON_CONCERT VALUES(3,2)
+INSERT INTO PERSON_CONCERT VALUES(3,3)
+COMMIT
+/*C62*/SET SCHEMA PUBLIC
+DELETE FROM CONCERT WHERE ID=2
+INSERT INTO CONCERT VALUES(10,'2026-05-17',FALSE,FALSE,FALSE,12,1,NULL,NULL,2,2,20,'fdf','','rock','rennes','Rock','Lyre','20')
+COMMIT
+/*C61*/SET SCHEMA PUBLIC
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-18',2,NULL,FALSE,2,2,20,'maneh.mathieu@gmail.com','confirmed',NULL)
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 101
+COMMIT
+DELETE FROM CONCERT WHERE ID=2
+INSERT INTO CONCERT VALUES(9,'2026-05-17',FALSE,FALSE,FALSE,12,1,NULL,NULL,2,2,20,'fdf','','rock','rennes','Rock','Lyre','20')
+COMMIT
+/*C62*/INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-18',1,NULL,FALSE,2,3,20,'mathieu20maneh@gmail.com','confirmed',NULL)
+COMMIT
+/*C61*/DELETE FROM CONCERT WHERE ID=2
+INSERT INTO CONCERT VALUES(8,'2026-05-17',FALSE,FALSE,FALSE,12,1,NULL,NULL,2,2,20,'fdf','','rock','rennes','Rock','Lyre','20')
+COMMIT
+INSERT INTO TICKET VALUES(NULL,FALSE,'2026-05-18',1,NULL,FALSE,2,4,20,'mathieu20maneh@gmail.com','confirmed',NULL)
+COMMIT
diff --git a/data/test.properties b/data/test.properties
new file mode 100644
index 00000000..189b1750
--- /dev/null
+++ b/data/test.properties
@@ -0,0 +1,5 @@
+#HSQL Database Engine 2.7.2
+#Sun May 17 17:17:17 CEST 2026
+modified=yes
+tx_timestamp=3528
+version=2.7.2
diff --git a/data/test.script b/data/test.script
new file mode 100644
index 00000000..ded1e618
--- /dev/null
+++ b/data/test.script
@@ -0,0 +1,60 @@
+SET DATABASE UNIQUE NAME HSQLDB9E18E1B4CB
+SET DATABASE DEFAULT RESULT MEMORY ROWS 0
+SET DATABASE EVENT LOG LEVEL 0
+SET DATABASE TRANSACTION CONTROL LOCKS
+SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED
+SET DATABASE TRANSACTION ROLLBACK ON CONFLICT TRUE
+SET DATABASE TEXT TABLE DEFAULTS ''
+SET DATABASE SQL NAMES FALSE
+SET DATABASE SQL RESTRICT EXEC FALSE
+SET DATABASE SQL REFERENCES FALSE
+SET DATABASE SQL SIZE TRUE
+SET DATABASE SQL TYPES FALSE
+SET DATABASE SQL TDC DELETE TRUE
+SET DATABASE SQL TDC UPDATE TRUE
+SET DATABASE SQL SYS INDEX NAMES TRUE
+SET DATABASE SQL CONCAT NULLS TRUE
+SET DATABASE SQL UNIQUE NULLS TRUE
+SET DATABASE SQL CONVERT TRUNCATE TRUE
+SET DATABASE SQL AVG SCALE 0
+SET DATABASE SQL DOUBLE NAN TRUE
+SET FILES WRITE DELAY 500 MILLIS
+SET FILES BACKUP INCREMENT TRUE
+SET FILES CACHE SIZE 10000
+SET FILES CACHE ROWS 50000
+SET FILES SCALE 32
+SET FILES LOB SCALE 32
+SET FILES DEFRAG 0
+SET FILES NIO TRUE
+SET FILES NIO SIZE 256
+SET FILES LOG TRUE
+SET FILES LOG SIZE 50
+SET FILES CHECK 3528
+SET DATABASE COLLATION "SQL_TEXT" PAD SPACE
+CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
+ALTER USER SA SET LOCAL TRUE
+CREATE SCHEMA PUBLIC AUTHORIZATION DBA
+CREATE SEQUENCE PUBLIC.CONCERT_SEQ AS INTEGER START WITH 1 INCREMENT BY 50
+CREATE SEQUENCE PUBLIC.NOTIFICATION_SEQ AS INTEGER START WITH 1 INCREMENT BY 50
+CREATE SEQUENCE PUBLIC.TICKET_SEQ AS INTEGER START WITH 1 INCREMENT BY 50
+CREATE MEMORY TABLE PUBLIC.CONCERT(AVAILABLETICKETS INTEGER NOT NULL,DATE DATE,ISCANCELED BOOLEAN NOT NULL,ISDELETED BOOLEAN NOT NULL,ISVALIDATED BOOLEAN NOT NULL,PLACENUMBER INTEGER NOT NULL,POPULARITY INTEGER NOT NULL,VALIDATIONDATE DATE,ADMIN_ID BIGINT,ID BIGINT NOT NULL PRIMARY KEY,ORGANIZER_ID BIGINT,PRICE BIGINT,DESCRIPTION VARCHAR(255),ENDTIME VARCHAR(255),LOCATION VARCHAR(255),MUSICALGENRE VARCHAR(255),NAME VARCHAR(255),STARTTIME VARCHAR(255))
+CREATE MEMORY TABLE PUBLIC.NOTIFICATION(CONCERT_ID BIGINT,ID BIGINT NOT NULL PRIMARY KEY,CONTENT VARCHAR(255),TYPE VARCHAR(255),CONSTRAINT FK4DVK518SK2HY9MU70Q9UAYD0K FOREIGN KEY(CONCERT_ID) REFERENCES PUBLIC.CONCERT(ID))
+CREATE MEMORY TABLE PUBLIC.PERSON(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,TYPE VARCHAR(31) NOT NULL,EMAIL VARCHAR(255),FIRSTNAME VARCHAR(255),LASTNAME VARCHAR(255),PHONE VARCHAR(255))
+ALTER TABLE PUBLIC.PERSON ALTER COLUMN ID RESTART WITH 1
+CREATE MEMORY TABLE PUBLIC.PERSON_CONCERT(ARTISTS_ID BIGINT NOT NULL,CONCERTS_ID BIGINT NOT NULL,CONSTRAINT FK725HEAMHEQK3OTG1D7GJM8UD0 FOREIGN KEY(CONCERTS_ID) REFERENCES PUBLIC.CONCERT(ID),CONSTRAINT FKPE10CIDI0NH5FUEWXMNX1QGDQ FOREIGN KEY(ARTISTS_ID) REFERENCES PUBLIC.PERSON(ID))
+CREATE MEMORY TABLE PUBLIC.TICKET(CANCELDATE DATE,CANCELED BOOLEAN NOT NULL,DATE DATE,QUANTITY INTEGER NOT NULL,REFUNDDATE DATE,REFUNDED BOOLEAN NOT NULL,CONCERT_ID BIGINT,ID BIGINT NOT NULL PRIMARY KEY,PRICE BIGINT,BUYEREMAIL VARCHAR(255),STATUS VARCHAR(255),TRANSFEROREMAIL VARCHAR(255),CONSTRAINT FKIN9KJ2WIEJNS9PTUW1PT351KG FOREIGN KEY(CONCERT_ID) REFERENCES PUBLIC.CONCERT(ID))
+ALTER TABLE PUBLIC.CONCERT ADD CONSTRAINT FKMB245NANCPSA6DE09I6RRT67Y FOREIGN KEY(ADMIN_ID) REFERENCES PUBLIC.PERSON(ID)
+ALTER TABLE PUBLIC.CONCERT ADD CONSTRAINT FKEGQSH0SSH4T4N4UUP1UVEOFSP FOREIGN KEY(ORGANIZER_ID) REFERENCES PUBLIC.PERSON(ID)
+ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
+ALTER SEQUENCE PUBLIC.CONCERT_SEQ RESTART WITH 1
+ALTER SEQUENCE PUBLIC.NOTIFICATION_SEQ RESTART WITH 1
+ALTER SEQUENCE PUBLIC.TICKET_SEQ RESTART WITH 1
+SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC
+GRANT DBA TO SA
+SET SCHEMA SYSTEM_LOBS
+INSERT INTO BLOCKS VALUES(0,2147483647,0)
diff --git a/diag-de-class.png b/diag-de-class.png
new file mode 100644
index 00000000..dc5ee197
Binary files /dev/null and b/diag-de-class.png differ
diff --git a/jaxrs-example.iml b/jaxrs-example.iml
new file mode 100644
index 00000000..6a67d9f1
--- /dev/null
+++ b/jaxrs-example.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/TestApplication.java b/src/main/java/fr/istic/taa/jaxrs/TestApplication.java
index c479dad0..90abba7b 100644
--- a/src/main/java/fr/istic/taa/jaxrs/TestApplication.java
+++ b/src/main/java/fr/istic/taa/jaxrs/TestApplication.java
@@ -19,14 +19,14 @@
import java.util.HashSet;
import java.util.Set;
-import fr.istic.taa.jaxrs.rest.PetResource;
+import fr.istic.taa.jaxrs.rest.*;
import io.swagger.v3.jaxrs2.integration.resources.OpenApiResource;
import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
@ApplicationPath("/")
public class TestApplication extends Application {
-
+
@Override
public Set> getClasses() {
@@ -35,8 +35,16 @@ public Set> getClasses() {
clazzes.add(OpenApiResource.class);
clazzes.add(PetResource.class);
-// clazzes.add(AcceptHeaderOpenApiResource.class);
-
+ clazzes.add(UserResource.class);
+ clazzes.add(ConcertResource.class);
+ clazzes.add(ArtistResource.class);
+ clazzes.add(OrganizerResource.class);
+ clazzes.add(AdminResource.class);
+ clazzes.add(TicketResource.class);
+ clazzes.add(NotificationResource.class);
+ clazzes.add(AdminStatsResource.class);
+// clazzes.add(AcceptHeaderOpenApiResource.class);
+
return clazzes;
}
diff --git a/src/main/java/fr/istic/taa/jaxrs/dao/generic/AbstractJpaDao.java b/src/main/java/fr/istic/taa/jaxrs/dao/generic/AbstractJpaDao.java
index 6adb209c..20c2acaf 100644
--- a/src/main/java/fr/istic/taa/jaxrs/dao/generic/AbstractJpaDao.java
+++ b/src/main/java/fr/istic/taa/jaxrs/dao/generic/AbstractJpaDao.java
@@ -6,6 +6,8 @@
import jakarta.persistence.EntityManager;
import jakarta.persistence.EntityTransaction;
+import static java.util.Objects.requireNonNull;
+
public abstract class AbstractJpaDao implements IGenericDao {
private Class clazz;
@@ -16,45 +18,51 @@ public AbstractJpaDao() {
this.entityManager = EntityManagerHelper.getEntityManager();
}
+ public AbstractJpaDao(Class clazz) {
+ this.entityManager = EntityManagerHelper.getEntityManager();
+ this.clazz = requireNonNull(clazz);
+ }
+
public void setClazz(Class clazzToSet) {
this.clazz = clazzToSet;
}
public T findOne(K id) {
+// entityManager.clear();
return entityManager.find(clazz, id);
}
public List findAll() {
- return entityManager.createQuery("select e from " + clazz.getName() + " as e",clazz).getResultList();
+ return entityManager.createQuery("select e from " + clazz.getName() + " as e", clazz).getResultList();
}
public void save(T entity) {
EntityTransaction t = this.entityManager.getTransaction();
- t.begin();
+ boolean isActive = t.isActive();
+ if (!isActive) t.begin();
entityManager.persist(entity);
- t.commit();
-
+ if (!isActive) t.commit();
}
public T update(final T entity) {
EntityTransaction t = this.entityManager.getTransaction();
- t.begin();
+ boolean isActive = t.isActive();
+ if (!isActive) t.begin();
T res = entityManager.merge(entity);
- t.commit();
+ if (!isActive) t.commit();
return res;
-
}
public void delete(T entity) {
EntityTransaction t = this.entityManager.getTransaction();
- t.begin();
- entityManager.remove(entity);
- t.commit();
-
+ boolean isActive = t.isActive();
+ if (!isActive) t.begin();
+ entityManager.remove(entityManager.contains(entity) ? entity : entityManager.merge(entity));
+ if (!isActive) t.commit();
}
public void deleteById(K entityId) {
T entity = findOne(entityId);
delete(entity);
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/dao/generic/AdminDao.java b/src/main/java/fr/istic/taa/jaxrs/dao/generic/AdminDao.java
new file mode 100644
index 00000000..b3b679a3
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dao/generic/AdminDao.java
@@ -0,0 +1,9 @@
+package fr.istic.taa.jaxrs.dao.generic;
+
+import fr.istic.taa.jaxrs.domain.Admin;
+
+public class AdminDao extends AbstractJpaDao {
+ public AdminDao() {
+ super(Admin.class);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/dao/generic/ArtistDao.java b/src/main/java/fr/istic/taa/jaxrs/dao/generic/ArtistDao.java
new file mode 100644
index 00000000..afb6470f
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dao/generic/ArtistDao.java
@@ -0,0 +1,19 @@
+package fr.istic.taa.jaxrs.dao.generic;
+
+import fr.istic.taa.jaxrs.domain.Admin;
+import fr.istic.taa.jaxrs.domain.Artist;
+
+public class ArtistDao extends AbstractJpaDao {
+ public ArtistDao() {
+ super(Artist.class);
+ }
+
+ public Long countArtists() {
+ Long count = entityManager.createQuery(
+ "SELECT COUNT(p) FROM Person p WHERE TYPE(p) = Artist",
+ Long.class)
+ .getSingleResult();
+ entityManager.clear();
+ return count;
+ }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/dao/generic/ConcertDao.java b/src/main/java/fr/istic/taa/jaxrs/dao/generic/ConcertDao.java
new file mode 100644
index 00000000..f3de9548
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dao/generic/ConcertDao.java
@@ -0,0 +1,83 @@
+package fr.istic.taa.jaxrs.dao.generic;
+
+import fr.istic.taa.jaxrs.domain.Concert;
+import jakarta.persistence.criteria.CriteriaBuilder;
+import jakarta.persistence.criteria.CriteriaQuery;
+import jakarta.persistence.criteria.Root;
+import java.util.Date;
+
+import java.util.List;
+
+public class ConcertDao extends AbstractJpaDao {
+
+ public ConcertDao() {
+ super(Concert.class);
+ }
+ //Requête jpql
+ public List searchConcerts(String searchQ) {
+ String q = "SELECT DISTINCT c FROM Concert c " +
+ "LEFT JOIN c.artists a " +
+ "WHERE LOWER(a.firstname) LIKE LOWER(:searchQ) " +
+ "OR LOWER(a.lastname) LIKE LOWER(:searchQ) " +
+ "OR LOWER(c.name) LIKE LOWER(:searchQ) " +
+ "OR LOWER(c.location) LIKE LOWER(:searchQ) " +
+ "OR LOWER(c.musicalGenre) LIKE LOWER(:searchQ) ";
+ return entityManager.createQuery(q, Concert.class)
+ .setParameter("searchQ", "%" + searchQ + "%")
+ .getResultList();
+ }
+
+ // Requête nommée
+ public List findByLocation(String location) {
+ return entityManager.createNamedQuery("Concert.findByLocation", Concert.class)
+ .setParameter("location", location)
+ .getResultList();
+ }
+
+ public List findValidated() {
+ return entityManager.createNamedQuery("Concert.findValidated", Concert.class)
+ .getResultList();
+ }
+
+ // Criteria Query
+ public List findByMaxPrice(Long maxPrice) {
+ CriteriaBuilder cb = entityManager.getCriteriaBuilder();
+ CriteriaQuery cq = cb.createQuery(Concert.class);
+ Root root = cq.from(Concert.class);
+ cq.select(root).where(cb.lessThanOrEqualTo(root.get("price"), maxPrice));
+ return entityManager.createQuery(cq).getResultList();
+ }
+
+ public List findByDate(Date date) {
+ return entityManager.createNamedQuery("Concert.findByDate", Concert.class)
+ .setParameter("date", date)
+ .getResultList();
+ }
+
+ public List findAllOrderByPopularity() {
+ return entityManager.createNamedQuery("Concert.findAllOrderByPopularity", Concert.class)
+ .getResultList();
+ }
+
+ public List findAllOrderByPrice() {
+ return entityManager.createNamedQuery("Concert.findAllOrderByPrice", Concert.class)
+ .getResultList();
+ }
+
+ public List findAllOrderByDate() {
+ return entityManager.createNamedQuery("Concert.findAllOrderByDate", Concert.class)
+ .getResultList();
+ }
+
+ public Long countConcerts(){
+ Long count = entityManager.createQuery(
+ "SELECT COUNT(c) FROM Concert c",
+ Long.class)
+
+ .getSingleResult();
+
+ entityManager.clear();
+ return count;
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/dao/generic/NotificationDao.java b/src/main/java/fr/istic/taa/jaxrs/dao/generic/NotificationDao.java
new file mode 100644
index 00000000..c1fb8129
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dao/generic/NotificationDao.java
@@ -0,0 +1,9 @@
+package fr.istic.taa.jaxrs.dao.generic;
+
+import fr.istic.taa.jaxrs.domain.Notification;
+
+public class NotificationDao extends AbstractJpaDao {
+ public NotificationDao() {
+ super(Notification.class);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/dao/generic/OrganizerDao.java b/src/main/java/fr/istic/taa/jaxrs/dao/generic/OrganizerDao.java
new file mode 100644
index 00000000..e889d6dd
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dao/generic/OrganizerDao.java
@@ -0,0 +1,20 @@
+package fr.istic.taa.jaxrs.dao.generic;
+
+
+import fr.istic.taa.jaxrs.domain.Admin;
+import fr.istic.taa.jaxrs.domain.Organizer;
+
+public class OrganizerDao extends AbstractJpaDao{
+ public OrganizerDao() {
+ super(Organizer.class);
+ }
+
+ public Long countOrganizers() {
+ Long count = entityManager.createQuery(
+ "SELECT COUNT(p) FROM Person p WHERE TYPE(p) = Organizer",
+ Long.class)
+ .getSingleResult();
+ entityManager.clear();
+ return count;
+ }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/dao/generic/TicketDao.java b/src/main/java/fr/istic/taa/jaxrs/dao/generic/TicketDao.java
new file mode 100644
index 00000000..fc324240
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dao/generic/TicketDao.java
@@ -0,0 +1,29 @@
+package fr.istic.taa.jaxrs.dao.generic;
+
+import fr.istic.taa.jaxrs.domain.Ticket;
+import java.util.List;
+
+public class TicketDao extends AbstractJpaDao{
+
+ public TicketDao() {
+ super(Ticket.class);
+ }
+
+ public List findByEmail(String email) {
+ return entityManager.createQuery(
+ "SELECT t FROM Ticket t WHERE buyerEmail = :email",
+ Ticket.class)
+ .setParameter("email", email)
+ .getResultList();
+ }
+
+ public Long countTickets() {
+ Long count = entityManager.createQuery(
+ "SELECT COUNT(t) FROM Ticket t",
+ Long.class)
+ .getSingleResult();
+ entityManager.clear();
+ return count;
+ }
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/dao/generic/UserDao.java b/src/main/java/fr/istic/taa/jaxrs/dao/generic/UserDao.java
new file mode 100644
index 00000000..df056d0a
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dao/generic/UserDao.java
@@ -0,0 +1,17 @@
+package fr.istic.taa.jaxrs.dao.generic;
+import fr.istic.taa.jaxrs.domain.User;
+
+public class UserDao extends AbstractJpaDao{
+ public UserDao() {
+ super(User.class);
+ }
+
+ public Long countUsers() {
+ Long count = entityManager.createQuery(
+ "SELECT COUNT(p) FROM Person p WHERE TYPE(p) = User",
+ Long.class)
+ .getSingleResult();
+ entityManager.clear();
+ return count;
+ }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/Admin.java b/src/main/java/fr/istic/taa/jaxrs/domain/Admin.java
new file mode 100644
index 00000000..50bcfd08
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/Admin.java
@@ -0,0 +1,27 @@
+package fr.istic.taa.jaxrs.domain;
+
+import fr.istic.taa.jaxrs.dao.generic.AdminDao;
+import jakarta.persistence.DiscriminatorValue;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.OneToMany;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+@Entity
+@DiscriminatorValue("Admin")
+public class Admin extends Person implements Serializable {
+
+ private Collection concerts;
+
+
+ @OneToMany(mappedBy = "admin")
+ public Collection getConcerts() {
+ return concerts;
+ }
+
+ public void setConcerts(Collection concerts) {
+ this.concerts = concerts;
+ }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/AdminStats.java b/src/main/java/fr/istic/taa/jaxrs/domain/AdminStats.java
new file mode 100644
index 00000000..be65f7ec
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/AdminStats.java
@@ -0,0 +1,24 @@
+package fr.istic.taa.jaxrs.domain;
+
+public class AdminStats {
+ private Long totalConcerts;
+ private Long totalUsers;
+ private Long totalArtists;
+ private Long totalOrganizers;
+ private Long totalTickets;
+
+ public Long getTotalConcerts() { return totalConcerts; }
+ public void setTotalConcerts(Long totalConcerts) { this.totalConcerts = totalConcerts; }
+
+ public Long getTotalUsers() { return totalUsers; }
+ public void setTotalUsers(Long totalUsers) { this.totalUsers = totalUsers; }
+
+ public Long getTotalArtists() { return totalArtists; }
+ public void setTotalArtists(Long totalArtists) { this.totalArtists = totalArtists; }
+
+ public Long getTotalOrganizers() { return totalOrganizers; }
+ public void setTotalOrganizers(Long totalOrganizers) { this.totalOrganizers = totalOrganizers; }
+
+ public Long getTotalTickets() { return totalTickets; }
+ public void setTotalTickets(Long totalTickets) { this.totalTickets = totalTickets; }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/Artist.java b/src/main/java/fr/istic/taa/jaxrs/domain/Artist.java
new file mode 100644
index 00000000..663bda29
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/Artist.java
@@ -0,0 +1,27 @@
+package fr.istic.taa.jaxrs.domain;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.*;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+@Entity
+@DiscriminatorValue("Artist")
+public class Artist extends Person implements Serializable {
+
+ private Collection concerts;
+
+ public Artist() {}
+
+ @ManyToMany
+ @JsonIgnore
+ public Collection getConcerts() {
+ return concerts;
+ }
+
+
+ public void setConcerts(Collection concerts) {
+ this.concerts = concerts;
+ }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/Concert.java b/src/main/java/fr/istic/taa/jaxrs/domain/Concert.java
new file mode 100644
index 00000000..eab3a662
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/Concert.java
@@ -0,0 +1,238 @@
+package fr.istic.taa.jaxrs.domain;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.*;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Date;
+import jakarta.persistence.NamedQueries;
+import jakarta.persistence.NamedQuery;
+
+@Entity
+@NamedQueries({
+ @NamedQuery(name = "Concert.findValidated",
+ query = "SELECT c FROM Concert c WHERE c.isValidated = true"),
+ @NamedQuery(name = "Concert.findByLocation",
+ query = "SELECT c FROM Concert c WHERE c.location = :location"),
+ @NamedQuery(name = "Concert.findByDate",
+ query = "SELECT c FROM Concert c WHERE c.date = :date"),
+ @NamedQuery(name = "Concert.findAllOrderByPopularity",
+ query = "SELECT c FROM Concert c ORDER BY c.popularity DESC"),
+ @NamedQuery(name = "Concert.findAllOrderByPrice",
+ query = "SELECT c FROM Concert c ORDER BY c.price ASC"),
+ @NamedQuery(name = "Concert.findAllOrderByDate",
+ query = "SELECT c FROM Concert c ORDER BY c.date ASC")
+})
+
+public class Concert implements Serializable {
+ private Long id;
+ private String name;
+ private String image;
+ private Date date;
+ private String startTime;
+ private String endTime;
+ private String location;
+ private Long price;
+ private String musicalGenre;
+ private int popularity;
+ private int placeNumber;
+ private int availableTickets;
+ private String description;
+ private boolean isCanceled;
+ private boolean isDeleted;
+ private boolean isValidated;
+ private Date validationDate;
+ private Admin admin;
+ private Organizer organizer;
+ private Collection tickets;
+ private Collection artists;
+ private Collection notifications;
+
+
+ @Id
+ @GeneratedValue()
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getImage() {
+ return image;
+ }
+
+ public void setImage(String image) {
+ this.image = image;
+ }
+
+ public String getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ @Temporal(TemporalType.DATE)
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ public String getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+
+ public Long getPrice() {
+ return price;
+ }
+
+ public void setPrice(Long price) {
+ this.price = price;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ public String getMusicalGenre() {
+ return musicalGenre;
+ }
+
+ public void setMusicalGenre(String musicalGenre) {
+ this.musicalGenre = musicalGenre;
+ }
+
+ public int getPopularity() {
+ return popularity;
+ }
+
+ public void setPopularity(int popularity) {
+ this.popularity = popularity;
+ }
+
+ public int getPlaceNumber() {
+ return placeNumber;
+ }
+
+ public void setPlaceNumber(int placeNumber) {
+ this.placeNumber = placeNumber;
+ }
+
+ public int getAvailableTickets() {
+ return availableTickets;
+ }
+
+ public void setAvailableTickets(int availableTickets) {
+ this.availableTickets = availableTickets;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public boolean isIsValidated() {
+ return isValidated;
+ }
+
+ public void setIsValidated(boolean isValidated) {
+ this.isValidated = isValidated;
+ }
+
+ public boolean isIsCanceled() {
+ return isCanceled;
+ }
+
+ public void setIsCanceled(boolean isCanceled) {
+ this.isCanceled = isCanceled;
+ }
+
+ public boolean isIsDeleted() {
+ return isDeleted;
+ }
+
+ public void setIsDeleted(boolean isDeleted) {
+ this.isDeleted = isDeleted;
+ }
+
+ @Temporal(TemporalType.DATE)
+ public Date getValidationDate() {
+ return validationDate;
+ }
+
+ public void setValidationDate(Date validationDate) {
+ this.validationDate = validationDate;
+ }
+ @OneToMany(mappedBy = "concert")
+ @JsonIgnore
+ public Collection getTickets() {
+ return tickets;
+ }
+
+ public void setTickets(Collection tickets) {
+ this.tickets = tickets;
+ }
+
+ @ManyToOne
+ public Admin getAdmin() {
+ return admin;
+ }
+
+ public void setAdmin(Admin admin) {
+ this.admin = admin;
+ }
+
+ @ManyToOne
+ public Organizer getOrganizer() {
+ return organizer;
+ }
+
+ public void setOrganizer(Organizer organizer) {
+ this.organizer = organizer;
+ }
+
+ @ManyToMany(mappedBy = "concerts")
+ public Collection getArtists() {
+ return artists;
+ }
+
+ public void setArtists(Collection artists) {
+ this.artists = artists;
+ }
+
+ @OneToMany(mappedBy = "concert")
+ public Collection getNotifications() {
+ return notifications;
+ }
+
+ public void setNotifications(Collection notifications) {
+ this.notifications = notifications;
+ }
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/EntityManagerHelper.java b/src/main/java/fr/istic/taa/jaxrs/domain/EntityManagerHelper.java
new file mode 100644
index 00000000..1371ac11
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/EntityManagerHelper.java
@@ -0,0 +1,50 @@
+package fr.istic.taa.jaxrs.domain;
+
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.EntityManagerFactory;
+import jakarta.persistence.Persistence;
+
+public class EntityManagerHelper {
+
+ private static final EntityManagerFactory emf;
+ private static final ThreadLocal threadLocal;
+
+ static {
+ emf = Persistence.createEntityManagerFactory("dev");
+ threadLocal = new ThreadLocal();
+ }
+
+ public static EntityManager getEntityManager() {
+ EntityManager em = threadLocal.get();
+
+ if (em == null) {
+ em = emf.createEntityManager();
+ threadLocal.set(em);
+ }
+ return em;
+ }
+
+ public static void closeEntityManager() {
+ EntityManager em = threadLocal.get();
+ if (em != null) {
+ em.close();
+ threadLocal.set(null);
+ }
+ }
+
+ public static void closeEntityManagerFactory() {
+ emf.close();
+ }
+
+ public static void beginTransaction() {
+ getEntityManager().getTransaction().begin();
+ }
+
+ public static void rollback() {
+ getEntityManager().getTransaction().rollback();
+ }
+
+ public static void commit() {
+ getEntityManager().getTransaction().commit();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/JpaTest.java b/src/main/java/fr/istic/taa/jaxrs/domain/JpaTest.java
new file mode 100644
index 00000000..0f8f2a10
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/JpaTest.java
@@ -0,0 +1,106 @@
+package fr.istic.taa.jaxrs.domain;
+
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.EntityTransaction;
+import java.util.Date;
+import java.util.ArrayList;
+
+public class JpaTest {
+
+ private EntityManager manager;
+
+ public JpaTest(EntityManager manager) {
+ this.manager = manager;
+ }
+
+ public static void main(String[] args) {
+ // 1. Récupération du manager via l'Helper
+ EntityManager manager = EntityManagerHelper.getEntityManager();
+ JpaTest test = new JpaTest(manager);
+
+ // 2. Exécution de la persistance
+ test.createData();
+
+ // 3. Fermeture propre des ressources
+ manager.close();
+ EntityManagerHelper.closeEntityManagerFactory();
+ System.out.println("Données persistées avec succès. Fin du test.");
+ }
+
+ public void createData() {
+ EntityTransaction tx = manager.getTransaction();
+ tx.begin();
+
+ try {
+ // --- 1. PERSONNES (Héritage) ---
+ Admin admin = new Admin();
+ admin.setFirstname("Marc");
+ admin.setLastname("Admin");
+ admin.setEmail("admin@festival.com");
+ manager.persist(admin);
+
+ Organizer organizer = new Organizer();
+ organizer.setFirstname("Julie");
+ organizer.setLastname("Events");
+ organizer.setEmail("contact@prod.com");
+ manager.persist(organizer);
+
+ Artist artist = new Artist();
+ artist.setFirstname("Stromae");
+ artist.setLastname("Paul");
+ artist.setEmail("artiste@music.be");
+ manager.persist(artist);
+
+ User user = new User();
+ user.setFirstname("Jean");
+ user.setLastname("Dupont");
+ user.setEmail("jean.dupont@email.com");
+ manager.persist(user);
+
+ // --- 2. CONCERT ---
+ Concert concert = new Concert();
+ concert.setName("Tournée Multitude");
+ concert.setDate(new Date());
+ concert.setStartTime("20h");
+ concert.setEndTime("23h");
+ concert.setPrice(75L);
+ concert.setMusicalGenre("Pop");
+ concert.setLocation("Bercy, Paris");
+ concert.setPlaceNumber(100);
+ concert.setAvailableTickets(100);
+ concert.setIsValidated(true);
+
+ // Si Concert a une liste d'artistes (ManyToMany)
+ if (concert.getArtists() == null) concert.setArtists(new ArrayList<>());
+ concert.getArtists().add(artist);
+
+ manager.persist(concert);
+
+ // --- 3. TICKET (Liaison User <-> Concert) ---
+ Ticket ticket = new Ticket();
+ ticket.setPrice(concert.getPrice());
+ ticket.setQuantity(1);
+ ticket.setBuyerEmail(user.getEmail()); // L'email qui servira à la recherche Angular
+ ticket.setConcert(concert);
+ ticket.setDate(new java.util.Date());
+ ticket.setStatus("confirmed"); // Statut initial pour l'affichage en vert (Valide)
+ ticket.setCanceled(false);
+ ticket.setRefunded(false);
+
+ manager.persist(ticket);
+
+ // --- 4. NOTIFICATION ---
+ Notification notification = new Notification();
+ notification.setContent("Votre commande pour " + concert.getName() + " est validée.");
+ notification.setType("INFO_ACHAT");
+ // notification.setPerson(user); // Si lié à une Person
+
+ manager.persist(notification);
+
+ tx.commit();
+ } catch (Exception e) {
+ if (tx.isActive()) tx.rollback();
+ e.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/Notification.java b/src/main/java/fr/istic/taa/jaxrs/domain/Notification.java
new file mode 100644
index 00000000..8b97406c
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/Notification.java
@@ -0,0 +1,54 @@
+package fr.istic.taa.jaxrs.domain;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.ManyToOne;
+
+import java.io.Serializable;
+
+@Entity
+public class Notification implements Serializable {
+
+ private Long id;
+ private String content;
+ private String type;
+ private Concert concert;
+
+ public Notification() {}
+
+
+ @Id
+ @GeneratedValue
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ @ManyToOne
+ public Concert getConcert() {
+ return concert;
+ }
+
+ public void setConcert(Concert concert) {
+ this.concert = concert;
+ }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/Organizer.java b/src/main/java/fr/istic/taa/jaxrs/domain/Organizer.java
new file mode 100644
index 00000000..90605b97
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/Organizer.java
@@ -0,0 +1,28 @@
+package fr.istic.taa.jaxrs.domain;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.*;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+@Entity
+@DiscriminatorValue("Organizer")
+public class Organizer extends Person implements Serializable {
+
+
+ private Collection concerts;
+
+
+ public Organizer() {}
+
+ @OneToMany(mappedBy = "organizer")
+ @JsonIgnore
+ public Collection getConcert() {
+ return concerts;
+ }
+
+ public void setConcert(Collection concerts) {
+ this.concerts = concerts;
+ }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/Person.java b/src/main/java/fr/istic/taa/jaxrs/domain/Person.java
new file mode 100644
index 00000000..6bff5d8a
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/Person.java
@@ -0,0 +1,62 @@
+package fr.istic.taa.jaxrs.domain;
+
+import jakarta.persistence.*;
+
+@Entity
+@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
+@DiscriminatorColumn(
+ name="Type",
+ discriminatorType=DiscriminatorType.STRING)
+public abstract class Person {
+
+ private Long id;
+ private String firstname;
+ private String lastname;
+ private String email;
+ private String phone;
+ public Person() {
+
+ }
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getFirstname() {
+ return firstname;
+ }
+
+ public void setFirstname(String firstname) {
+ this.firstname = firstname;
+ }
+
+ public String getLastname() {
+ return lastname;
+ }
+
+ public void setLastname(String lastname) {
+ this.lastname = lastname;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/Ticket.java b/src/main/java/fr/istic/taa/jaxrs/domain/Ticket.java
new file mode 100644
index 00000000..e25be077
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/Ticket.java
@@ -0,0 +1,121 @@
+package fr.istic.taa.jaxrs.domain;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.*;
+
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Entity
+public class Ticket implements Serializable {
+ private Long id;
+ private Long price;
+ private int quantity;
+ private String buyerEmail;
+ private String transferorEmail; // Celui qui a donné le ticket
+ private String status; // 'confirmed', 'pending', 'cancelled', 'transferred'
+ private boolean isCanceled;
+ private boolean isRefunded;
+ private Date date;
+ private Date cancelDate;
+ private Date refundDate;
+// private User user;
+ private Concert concert;
+
+ public Ticket() {
+
+ }
+
+ @Id
+ @GeneratedValue()
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Long getPrice() {
+ return price;
+ }
+
+ public void setPrice(Long price) {
+ this.price = price;
+ }
+
+ public int getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
+ }
+
+ public boolean isCanceled() {
+ return isCanceled;
+ }
+
+ public void setCanceled(boolean isCanceled) {
+ this.isCanceled = isCanceled;
+ }
+
+ public boolean isRefunded() {
+ return isRefunded;
+ }
+
+ public void setRefunded(boolean isRefunded) {
+ this.isRefunded = isRefunded;
+ }
+
+ @Temporal(TemporalType.DATE)
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+ @Temporal(TemporalType.DATE)
+ public Date getCancelDate() {
+ return cancelDate;
+ }
+
+ public void setCancelDate(Date cancelDate) {
+ this.cancelDate = cancelDate;
+ }
+
+ @Temporal(TemporalType.DATE)
+ public Date getRefundDate() {
+ return refundDate;
+ }
+
+ public void setRefundDate(Date refundDate) {
+ this.refundDate = refundDate;
+ }
+
+ public String getBuyerEmail() {
+ return buyerEmail;
+ }
+
+ public void setBuyerEmail(String buyerEmail) {
+ this.buyerEmail = buyerEmail;
+ }
+
+ public String getTransferorEmail() { return transferorEmail; }
+ public void setTransferorEmail(String transferorEmail) { this.transferorEmail = transferorEmail; }
+
+ public String getStatus() { return status; }
+ public void setStatus(String status) { this.status = status; }
+
+// @JsonIgnore
+ @ManyToOne
+ public Concert getConcert() {
+ return concert;
+ }
+
+ public void setConcert(Concert concert) {
+ this.concert = concert;
+ }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/domain/User.java b/src/main/java/fr/istic/taa/jaxrs/domain/User.java
new file mode 100644
index 00000000..4452d719
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/domain/User.java
@@ -0,0 +1,18 @@
+package fr.istic.taa.jaxrs.domain;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.DiscriminatorValue;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.OneToMany;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+@Entity
+@DiscriminatorValue("User")
+public class User extends Person implements Serializable {
+
+ public User() {}
+
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/dto/ConcertBaseDto.java b/src/main/java/fr/istic/taa/jaxrs/dto/ConcertBaseDto.java
new file mode 100644
index 00000000..a4df71ae
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dto/ConcertBaseDto.java
@@ -0,0 +1,144 @@
+package fr.istic.taa.jaxrs.dto;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import jakarta.validation.constraints.Max;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import java.util.Date;
+import java.util.List;
+
+
+public abstract class ConcertBaseDto {
+ @NotNull
+ @NotEmpty
+ private String name;
+ private String image;
+ private String description;
+ @NotNull
+ @NotEmpty
+ private String location;
+ private String musicalGenre;
+ @NotNull
+ private int placeNumber;
+ @NotNull
+ @Min(1)
+ @Max(5)
+ private int popularity;
+ @NotNull
+ private Long price;
+ @NotNull
+ private Long organizerId;
+
+ // Nouveaux champs manquants par rapport au formulaire
+ private Date date;
+ private String startTime;
+ private String endTime;
+ private List artistIds;
+
+ // --- GETTERS ET SETTERS REQUIS POUR JACKSON ---
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getImage() {
+ return image;
+ }
+
+ public void setImage(String image) {
+ this.image = image;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getMusicalGenre() {
+ return musicalGenre;
+ }
+
+ public void setMusicalGenre(String musicalGenre) {
+ this.musicalGenre = musicalGenre;
+ }
+
+ public int getPlaceNumber() {
+ return placeNumber;
+ }
+
+ public void setPlaceNumber(int placeNumber) {
+ this.placeNumber = placeNumber;
+ }
+
+ public Long getPrice() {
+ return price;
+ }
+
+ public void setPrice(Long price) {
+ this.price = price;
+ }
+
+ public int getPopularity() {
+ return popularity;
+ }
+
+ public void setPopularity(int popularity) {
+ this.popularity = popularity;
+ }
+
+ public Long getOrganizerId() {
+ return organizerId;
+ }
+
+ public void setOrganizerId(Long organizerId) {
+ this.organizerId = organizerId;
+ }
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ public String getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+
+ public List getArtistIds() {
+ return artistIds;
+ }
+
+ public void setArtistIds(List artistIds) {
+ this.artistIds = artistIds;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/dto/ConcertCreateDto.java b/src/main/java/fr/istic/taa/jaxrs/dto/ConcertCreateDto.java
new file mode 100644
index 00000000..bc378987
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dto/ConcertCreateDto.java
@@ -0,0 +1,7 @@
+package fr.istic.taa.jaxrs.dto;
+
+
+
+public class ConcertCreateDto extends ConcertBaseDto{
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/dto/ConcertUpdateDto.java b/src/main/java/fr/istic/taa/jaxrs/dto/ConcertUpdateDto.java
new file mode 100644
index 00000000..667ca684
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dto/ConcertUpdateDto.java
@@ -0,0 +1,12 @@
+package fr.istic.taa.jaxrs.dto;
+
+
+import jakarta.validation.constraints.NotNull;
+
+public class ConcertUpdateDto extends ConcertBaseDto{
+ @NotNull
+ private Long id;
+
+ public Long getId() { return id; }
+ public void setId(Long id) { this.id = id; }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/dto/PersonBaseDto.java b/src/main/java/fr/istic/taa/jaxrs/dto/PersonBaseDto.java
new file mode 100644
index 00000000..00d54b71
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dto/PersonBaseDto.java
@@ -0,0 +1,51 @@
+package fr.istic.taa.jaxrs.dto;
+
+import jakarta.validation.constraints.NotEmpty;
+import org.wildfly.common.annotation.NotNull;
+
+public abstract class PersonBaseDto {
+ @NotNull
+ @NotEmpty
+ private String email;
+ @NotNull
+ @NotEmpty
+ private String firstname;
+ @NotNull
+ @NotEmpty
+ private String lastname;
+ @NotNull
+ @NotEmpty
+ private String phone;
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getFirstname() {
+ return firstname;
+ }
+
+ public void setFirstname(String firstname) {
+ this.firstname = firstname;
+ }
+
+ public String getLastname() {
+ return lastname;
+ }
+
+ public void setLastname(String lastname) {
+ this.lastname = lastname;
+ }
+
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/dto/PersonCreateDto.java b/src/main/java/fr/istic/taa/jaxrs/dto/PersonCreateDto.java
new file mode 100644
index 00000000..eb0b2578
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dto/PersonCreateDto.java
@@ -0,0 +1,5 @@
+package fr.istic.taa.jaxrs.dto;
+
+public class PersonCreateDto extends PersonBaseDto{
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/dto/PersonUpdateDto.java b/src/main/java/fr/istic/taa/jaxrs/dto/PersonUpdateDto.java
new file mode 100644
index 00000000..74d70f8b
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dto/PersonUpdateDto.java
@@ -0,0 +1,12 @@
+package fr.istic.taa.jaxrs.dto;
+
+import jakarta.validation.constraints.NotNull;
+
+public class PersonUpdateDto extends PersonBaseDto{
+ @NotNull
+ private Long id;
+
+ public Long getId() { return id; }
+
+ public void setId(Long id) { this.id = id; }
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/dto/TicketCreateDto.java b/src/main/java/fr/istic/taa/jaxrs/dto/TicketCreateDto.java
new file mode 100644
index 00000000..0b8ca709
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dto/TicketCreateDto.java
@@ -0,0 +1,29 @@
+package fr.istic.taa.jaxrs.dto;
+
+public class TicketCreateDto {
+ private Long concertId;
+// private Long userId;
+ private int quantity;
+
+ private String buyerEmail;
+ public Long getConcertId() { return concertId; }
+ public void setConcertId(Long concertId) { this.concertId = concertId; }
+
+ public String getBuyerEmail() {
+ return buyerEmail;
+ }
+
+ public void setBuyerEmail(String buyerEmail) {
+ this.buyerEmail = buyerEmail;
+ }
+
+ public int getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/dto/TicketTransferDto.java b/src/main/java/fr/istic/taa/jaxrs/dto/TicketTransferDto.java
new file mode 100644
index 00000000..fc808d66
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/dto/TicketTransferDto.java
@@ -0,0 +1,11 @@
+package fr.istic.taa.jaxrs.dto;
+
+public class TicketTransferDto {
+ private String newUserEmail;
+
+ // Ajoute ce constructeur vide !
+ public TicketTransferDto() {}
+
+ public String getNewUserEmail() { return newUserEmail; }
+ public void setNewUserEmail(String newUserEmail) { this.newUserEmail = newUserEmail; }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/rest/AdminResource.java b/src/main/java/fr/istic/taa/jaxrs/rest/AdminResource.java
new file mode 100644
index 00000000..45bdbe1e
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/rest/AdminResource.java
@@ -0,0 +1,45 @@
+package fr.istic.taa.jaxrs.rest;
+
+
+import fr.istic.taa.jaxrs.domain.Admin;
+import fr.istic.taa.jaxrs.dto.PersonCreateDto;
+import fr.istic.taa.jaxrs.dto.PersonUpdateDto;
+import fr.istic.taa.jaxrs.service.AdminService;
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.MediaType;
+
+import java.util.List;
+
+@Path("admins")
+@Produces(MediaType.APPLICATION_JSON)
+public class AdminResource {
+ private final AdminService adminService = new AdminService();
+
+ @GET
+ @Path("/")
+ public List getAllAdmins(){
+ return adminService.getAllAdmins();
+ }
+
+ @GET
+ @Path("/{id}")
+ public Admin getAdmin(@PathParam("id") long id){return adminService.getAdmin(id);}
+
+ @POST
+ @Path("/")
+ public Admin createAdmin(PersonCreateDto createAdmin){
+ return adminService.createAdmin(createAdmin);
+ }
+
+ @PUT
+ @Path("/{id}")
+ public Admin updateAdmin(@PathParam("id") long id, PersonUpdateDto personUpdateDto){
+
+ return adminService.updateAdmin(id, personUpdateDto);
+ }
+
+ @DELETE
+ @Path("/{id}")
+ public void deleteAdmin(@PathParam("id") long id){adminService.deleteAdmin(id);}
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/rest/AdminStatsResource.java b/src/main/java/fr/istic/taa/jaxrs/rest/AdminStatsResource.java
new file mode 100644
index 00000000..7501e3be
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/rest/AdminStatsResource.java
@@ -0,0 +1,38 @@
+package fr.istic.taa.jaxrs.rest;
+
+import fr.istic.taa.jaxrs.domain.AdminStats;
+import fr.istic.taa.jaxrs.service.ArtistService;
+import fr.istic.taa.jaxrs.service.ConcertService;
+import fr.istic.taa.jaxrs.service.OrganizerService;
+import fr.istic.taa.jaxrs.service.TicketService;
+import fr.istic.taa.jaxrs.service.UserService;
+import jakarta.transaction.Transactional;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+
+@Path("stats")
+@Produces(MediaType.APPLICATION_JSON)
+public class AdminStatsResource {
+
+ private final UserService userService = new UserService();
+ private final ConcertService concertService = new ConcertService();
+ private final ArtistService artistService = new ArtistService();
+ private final OrganizerService organizerService = new OrganizerService();
+ private final TicketService ticketService = new TicketService();
+
+ @GET
+ @Path("/")
+ @Transactional
+ public AdminStats getStats() {
+ AdminStats stats = new AdminStats();
+ stats.setTotalConcerts(concertService.countConcerts());
+ stats.setTotalUsers(userService.countUsers());
+ stats.setTotalArtists(artistService.countArtists());
+ stats.setTotalOrganizers(organizerService.countOrganizers());
+ stats.setTotalTickets(ticketService.countTickets());
+// System.out.println("Total concert count: " + stats.getTotalConcerts());
+ return stats;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/rest/ArtistResource.java b/src/main/java/fr/istic/taa/jaxrs/rest/ArtistResource.java
new file mode 100644
index 00000000..9bc6a42f
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/rest/ArtistResource.java
@@ -0,0 +1,45 @@
+package fr.istic.taa.jaxrs.rest;
+
+
+import fr.istic.taa.jaxrs.domain.Artist;
+import fr.istic.taa.jaxrs.dto.PersonCreateDto;
+import fr.istic.taa.jaxrs.dto.PersonUpdateDto;
+import fr.istic.taa.jaxrs.service.ArtistService;
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.MediaType;
+
+import java.util.List;
+
+@Path("artists")
+@Produces(MediaType.APPLICATION_JSON)
+public class ArtistResource {
+ private final ArtistService artistService = new ArtistService();
+
+ @GET
+ @Path("/")
+ public List getAllArtists(){
+ return artistService.getAllArtists();
+ }
+
+ @GET
+ @Path("/{id}")
+ public Artist getArtist(@PathParam("id") long id){return artistService.getArtist(id);}
+
+ @POST
+ @Path("/")
+ public Artist createArtist(PersonCreateDto createArtist){
+ return artistService.createArtist(createArtist);
+ }
+
+ @PUT
+ @Path("/{id}")
+ public Artist updateArtist(@PathParam("id") long id, PersonUpdateDto personUpdateDto){
+
+ return artistService.updateArtist(id, personUpdateDto);
+ }
+
+ @DELETE
+ @Path("/{id}")
+ public void deleteArtist(@PathParam("id") long id){artistService.deleteArtist(id);}
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/rest/ConcertResource.java b/src/main/java/fr/istic/taa/jaxrs/rest/ConcertResource.java
new file mode 100644
index 00000000..d6c955a4
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/rest/ConcertResource.java
@@ -0,0 +1,191 @@
+package fr.istic.taa.jaxrs.rest;
+
+import fr.istic.taa.jaxrs.domain.Concert;
+import fr.istic.taa.jaxrs.dto.ConcertCreateDto;
+import fr.istic.taa.jaxrs.dto.ConcertUpdateDto;
+import fr.istic.taa.jaxrs.service.ConcertService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.MediaType;
+
+import java.util.Date;
+import java.util.List;
+
+@Path("/concerts")
+@Produces(MediaType.APPLICATION_JSON)
+@Tag(name = "Concerts", description = "Gestion des concerts")
+public class ConcertResource {
+
+ private static final ConcertService concertService = new ConcertService();
+
+ @GET
+ @Path("/")
+ @Operation(summary = "Récupérer tous les concerts", description = "Retourne la liste de tous les concerts disponibles")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Liste des concerts récupérée avec succès",
+ content = @Content(schema = @Schema(implementation = Concert.class))),
+ @ApiResponse(responseCode = "500", description = "Erreur interne du serveur")
+ })
+ public List getConcerts() {
+ return concertService.getConcerts();
+ }
+
+ @GET
+ @Path("/search")
+ @Operation(summary = "Rechercher des concerts", description = "Recherche des concerts par artiste, lieu, nom ou genre musical")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Résultats de recherche retournés avec succès"),
+ @ApiResponse(responseCode = "500", description = "Erreur interne du serveur")
+ })
+ public List searchConcerts(
+ @Parameter(description = "Terme de recherche", required = true)
+ @QueryParam("q") String searchQ) {
+ return concertService.searchConcerts(searchQ);
+ }
+
+ @GET
+ @Path("/{id}")
+ @Operation(summary = "Récupérer un concert par ID", description = "Retourne les détails d'un concert spécifique")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Concert trouvé"),
+ @ApiResponse(responseCode = "404", description = "Concert non trouvé"),
+ @ApiResponse(responseCode = "500", description = "Erreur interne du serveur")
+ })
+ public Concert getConcert(
+ @Parameter(description = "ID du concert", required = true)
+ @PathParam("id") long id) {
+ return concertService.getConcert(id);
+ }
+
+ @POST
+ @Path("/")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Operation(summary = "Créer un concert", description = "Crée un nouveau concert")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Concert créé avec succès"),
+ @ApiResponse(responseCode = "400", description = "Données invalides"),
+ @ApiResponse(responseCode = "500", description = "Erreur interne du serveur")
+ })
+ public Concert createConcert(
+ @Parameter(description = "Données du concert à créer", required = true)
+ ConcertCreateDto concertCreateDto) {
+ return concertService.createConcert(concertCreateDto);
+ }
+
+ @PUT
+ @Path("/{id}")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Operation(summary = "Modifier un concert", description = "Met à jour les informations d'un concert existant")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Concert modifié avec succès"),
+ @ApiResponse(responseCode = "400", description = "Données invalides ou ID incohérent"),
+ @ApiResponse(responseCode = "404", description = "Concert non trouvé"),
+ @ApiResponse(responseCode = "500", description = "Erreur interne du serveur")
+ })
+ public Concert updateConcert(
+ @Parameter(description = "ID du concert", required = true)
+ @PathParam("id") long id,
+ @Parameter(description = "Données de mise à jour", required = true)
+ ConcertUpdateDto concertUpdateDto) {
+ return concertService.updateConcert(id, concertUpdateDto);
+ }
+
+ @DELETE
+ @Path("/{id}")
+ @Operation(summary = "Supprimer un concert", description = "Supprime un concert par son ID")
+ @ApiResponses({
+ @ApiResponse(responseCode = "204", description = "Concert supprimé avec succès"),
+ @ApiResponse(responseCode = "404", description = "Concert non trouvé"),
+ @ApiResponse(responseCode = "500", description = "Erreur interne du serveur")
+ })
+ public void deleteConcert(
+ @Parameter(description = "ID du concert à supprimer", required = true)
+ @PathParam("id") long id) {
+ concertService.deleteConcert(id);
+ }
+
+ @GET
+ @Path("/location")
+ @Operation(summary = "Rechercher par lieu", description = "Retourne les concerts se déroulant à un lieu spécifique")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Concerts trouvés"),
+ @ApiResponse(responseCode = "500", description = "Erreur interne du serveur")
+ })
+ public List getConcertsByLocation(
+ @Parameter(description = "Lieu du concert", required = true)
+ @QueryParam("q") String location) {
+ return concertService.findByLocation(location);
+ }
+
+ @GET
+ @Path("/validated")
+ @Operation(summary = "Concerts validés", description = "Retourne uniquement les concerts validés par un administrateur")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Liste des concerts validés"),
+ @ApiResponse(responseCode = "500", description = "Erreur interne du serveur")
+ })
+ public List getValidatedConcerts() {
+ return concertService.findValidated();
+ }
+
+ @GET
+ @Path("/maxprice")
+ @Operation(summary = "Filtrer par prix maximum", description = "Retourne les concerts dont le prix est inférieur ou égal au montant donné")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Liste des concerts filtrés par prix"),
+ @ApiResponse(responseCode = "500", description = "Erreur interne du serveur")
+ })
+ public List getConcertsByMaxPrice(
+ @Parameter(description = "Prix maximum en euros", required = true)
+ @QueryParam("price") Long maxPrice) {
+ return concertService.findByMaxPrice(maxPrice);
+ }
+
+ @GET
+ @Path("/sortByPopularity")
+ @Operation(summary = "Trier par popularité", description = "Retourne les concerts triés par popularité décroissante")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Concerts triés par popularité")
+ })
+ public List getConcertsOrderByPopularity() {
+ return concertService.findAllOrderByPopularity();
+ }
+
+ @GET
+ @Path("/sortByPrice")
+ @Operation(summary = "Trier par prix", description = "Retourne les concerts triés par prix croissant")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Concerts triés par prix")
+ })
+ public List getConcertsOrderByPrice() {
+ return concertService.findAllOrderByPrice();
+ }
+
+ @GET
+ @Path("/sortByDate")
+ @Operation(summary = "Trier par date", description = "Retourne les concerts triés par date croissante")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Concerts triés par date")
+ })
+ public List getConcertsOrderByDate() {
+ return concertService.findAllOrderByDate();
+ }
+
+ @GET
+ @Path("/date")
+ @Operation(summary = "Rechercher par date", description = "Retourne les concerts à une date spécifique")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Concerts trouvés pour cette date")
+ })
+ public List getConcertsByDate(
+ @Parameter(description = "Date au format yyyy-MM-dd", required = true)
+ @QueryParam("q") Date date) {
+ return concertService.findByDate(date);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/rest/NotificationResource.java b/src/main/java/fr/istic/taa/jaxrs/rest/NotificationResource.java
new file mode 100644
index 00000000..08f85fff
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/rest/NotificationResource.java
@@ -0,0 +1,31 @@
+package fr.istic.taa.jaxrs.rest;
+
+import fr.istic.taa.jaxrs.domain.Notification;
+import fr.istic.taa.jaxrs.service.NotificationService;
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.MediaType;
+import java.util.List;
+
+@Path("notifications")
+@Produces(MediaType.APPLICATION_JSON)
+public class NotificationResource {
+ private final NotificationService notificationService = new NotificationService();
+
+ @GET
+ @Path("/")
+ public List getAllNotifications() {
+ return notificationService.getAllNotifications();
+ }
+
+ @GET
+ @Path("/{id}")
+ public Notification getNotification(@PathParam("id") long id) {
+ return notificationService.getNotification(id);
+ }
+
+ @DELETE
+ @Path("/{id}")
+ public void deleteNotification(@PathParam("id") long id) {
+ notificationService.deleteNotification(id);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/rest/OrganizerResource.java b/src/main/java/fr/istic/taa/jaxrs/rest/OrganizerResource.java
new file mode 100644
index 00000000..998e2bec
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/rest/OrganizerResource.java
@@ -0,0 +1,45 @@
+package fr.istic.taa.jaxrs.rest;
+
+
+import fr.istic.taa.jaxrs.domain.Organizer;
+import fr.istic.taa.jaxrs.dto.PersonCreateDto;
+import fr.istic.taa.jaxrs.dto.PersonUpdateDto;
+import fr.istic.taa.jaxrs.service.OrganizerService;
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.MediaType;
+
+import java.util.List;
+
+@Path("organizers")
+@Produces(MediaType.APPLICATION_JSON)
+public class OrganizerResource {
+ private final OrganizerService organizerService = new OrganizerService();
+
+ @GET
+ @Path("/")
+ public List getAllOrganizers(){
+ return organizerService.getAllOrganizers();
+ }
+
+ @GET
+ @Path("/{id}")
+ public Organizer getOrganizer(@PathParam("id") long id){return organizerService.getOrganizer(id);}
+
+ @POST
+ @Path("/")
+ public Organizer createOrganizer(PersonCreateDto createOrganizer){
+ return organizerService.createOrganizer(createOrganizer);
+ }
+
+ @PUT
+ @Path("/{id}")
+ public Organizer updateOrganizer(@PathParam("id") long id, PersonUpdateDto personUpdateDto){
+
+ return organizerService.updateOrganizer(id, personUpdateDto);
+ }
+
+ @DELETE
+ @Path("/{id}")
+ public void deleteOrganizer(@PathParam("id") long id){organizerService.deleteOrganizer(id);}
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/rest/TicketResource.java b/src/main/java/fr/istic/taa/jaxrs/rest/TicketResource.java
new file mode 100644
index 00000000..ad091953
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/rest/TicketResource.java
@@ -0,0 +1,85 @@
+package fr.istic.taa.jaxrs.rest;
+
+import fr.istic.taa.jaxrs.domain.Ticket;
+import fr.istic.taa.jaxrs.dto.TicketCreateDto;
+import fr.istic.taa.jaxrs.dto.TicketTransferDto;
+import fr.istic.taa.jaxrs.service.TicketService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.Parameter;
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.MediaType;
+import java.util.List;
+
+@Path("tickets")
+@Produces(MediaType.APPLICATION_JSON)
+public class TicketResource {
+ private final TicketService ticketService = new TicketService();
+
+ @GET
+ @Path("/")
+ public List getTickets(@QueryParam("email") String email) {
+
+ if (email != null && !email.isEmpty()) {
+ // Si l'email est fourni, on filtre pour recuper que le tickets d'un client
+ return ticketService.findByEmail(email);
+ }
+ // Sinon, on retourne tout pour le dashboard admin
+ return ticketService.getAllTickets();
+ }
+ @GET
+ @Path("/{id}")
+ public Ticket getTicket(@PathParam("id") long id) {
+ return ticketService.getTicket(id);
+ }
+
+ @DELETE
+ @Path("/{id}")
+ public void deleteTicket(@PathParam("id") long id) {
+ ticketService.deleteTicket(id);
+ }
+
+ @PUT
+ @Path("/{id}/cancel")
+ public Ticket cancelTicket(@PathParam("id") long id) {
+ return ticketService.cancelTicket(id);
+ }
+
+ @PUT
+ @Path("/{id}/refund")
+ public Ticket refundTicket(@PathParam("id") long id) {
+ return ticketService.refundTicket(id);
+ }
+
+ @POST
+ @Path("/")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Operation(summary = "Acheter un ticket", description = "Permet à un utilisateur d'acheter un ticket pour un concert")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Ticket acheté avec succès"),
+ @ApiResponse(responseCode = "400", description = "Concert annulé ou plus de places disponibles"),
+ @ApiResponse(responseCode = "404", description = "Concert ou utilisateur non trouvé")
+ })
+ public Ticket buyTicket(TicketCreateDto ticketCreateDto) {
+ return ticketService.buyTicket(ticketCreateDto);
+ }
+
+
+ @PUT
+ @Path("/{id}/transfer")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Operation(summary = "Transférer un ticket", description = "Transfère un ticket à un autre utilisateur")
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "Ticket transféré avec succès"),
+ @ApiResponse(responseCode = "400", description = "Ticket annulé, impossible de transférer"),
+ @ApiResponse(responseCode = "404", description = "Ticket ou utilisateur non trouvé")
+ })
+ public Ticket transferTicket(
+ @Parameter(description = "ID du ticket", required = true)
+ @PathParam("id") long id,
+ @Parameter(description = "ID du nouvel utilisateur", required = true)
+ TicketTransferDto ticketTransferDto) {
+ return ticketService.transferTicket(id, ticketTransferDto.getNewUserEmail());
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/rest/UserResource.java b/src/main/java/fr/istic/taa/jaxrs/rest/UserResource.java
new file mode 100644
index 00000000..2e02cc0b
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/rest/UserResource.java
@@ -0,0 +1,46 @@
+package fr.istic.taa.jaxrs.rest;
+
+
+import fr.istic.taa.jaxrs.domain.User;
+import fr.istic.taa.jaxrs.dto.PersonCreateDto;
+import fr.istic.taa.jaxrs.dto.PersonUpdateDto;
+import fr.istic.taa.jaxrs.service.UserService;
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.MediaType;
+
+import java.util.List;
+
+@Path("users")
+@Produces(MediaType.APPLICATION_JSON)
+public class UserResource {
+ private final UserService userService = new UserService();
+
+ @GET
+ @Path("/")
+
+ public List getAllUsers(){
+ return userService.getAllUsers();
+ }
+
+ @GET
+ @Path("/{id}")
+ public User getUser(@PathParam("id") long id){return userService.getUser(id);}
+
+ @POST
+ @Path("/")
+ public User createUser(PersonCreateDto createUser){
+ return userService.createUser(createUser);
+ }
+
+ @PUT
+ @Path("/{id}")
+ public User updateUser(@PathParam("id") long id, PersonUpdateDto personUpdateDto){
+
+ return userService.updateUser(id, personUpdateDto);
+ }
+
+ @DELETE
+ @Path("/{id}")
+ public void deleteUser(@PathParam("id") long id){userService.deleteUser(id);}
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/service/AdminService.java b/src/main/java/fr/istic/taa/jaxrs/service/AdminService.java
new file mode 100644
index 00000000..61bc3d70
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/service/AdminService.java
@@ -0,0 +1,55 @@
+package fr.istic.taa.jaxrs.service;
+
+import fr.istic.taa.jaxrs.dao.generic.AdminDao;
+import fr.istic.taa.jaxrs.domain.Concert;
+
+import fr.istic.taa.jaxrs.domain.Admin;
+import fr.istic.taa.jaxrs.dto.ConcertBaseDto;
+import fr.istic.taa.jaxrs.dto.ConcertCreateDto;
+import fr.istic.taa.jaxrs.dto.PersonBaseDto;
+import fr.istic.taa.jaxrs.dto.PersonUpdateDto;
+import fr.istic.taa.jaxrs.dto.PersonCreateDto;
+import jakarta.ws.rs.BadRequestException;
+import jakarta.ws.rs.PathParam;
+
+import java.util.List;
+
+public class AdminService {
+
+ private Admin fromDtoToAdminMapper(PersonBaseDto personBaseDto, Admin admin)
+ {
+ admin.setFirstname(personBaseDto.getFirstname());
+ admin.setLastname(personBaseDto.getLastname());
+ return admin;
+ }
+
+ private final AdminDao adminDao = new AdminDao();
+
+ public List getAllAdmins(){
+ return adminDao.findAll();
+ }
+
+ public Admin getAdmin(@PathParam("id") long id){
+ return adminDao.findOne(id);
+ }
+
+ public Admin createAdmin(PersonCreateDto personCreateDto) {
+ Admin admin = fromDtoToAdminMapper(personCreateDto, new Admin());
+ adminDao.save(admin);
+ return admin;
+ }
+
+ public Admin updateAdmin(long id, PersonUpdateDto personUpdateDto){
+ if (!(id == personUpdateDto.getId())) {
+ throw new BadRequestException("Admin non accessible");
+ }
+ Admin admin = fromDtoToAdminMapper(personUpdateDto,getAdmin(id));
+ adminDao.update(admin);
+ return admin;
+ }
+
+ public void deleteAdmin(long id){
+ adminDao.deleteById(id);
+ }
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/service/ArtistService.java b/src/main/java/fr/istic/taa/jaxrs/service/ArtistService.java
new file mode 100644
index 00000000..df514cb9
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/service/ArtistService.java
@@ -0,0 +1,56 @@
+package fr.istic.taa.jaxrs.service;
+
+import fr.istic.taa.jaxrs.dao.generic.ArtistDao;
+
+import fr.istic.taa.jaxrs.domain.Artist;
+import fr.istic.taa.jaxrs.dto.PersonBaseDto;
+import fr.istic.taa.jaxrs.dto.PersonUpdateDto;
+import fr.istic.taa.jaxrs.dto.PersonCreateDto;
+import jakarta.ws.rs.BadRequestException;
+import jakarta.ws.rs.PathParam;
+
+import java.util.List;
+
+public class ArtistService {
+ public Long countArtists(){
+ return artistDao.countArtists();
+ }
+ private Artist fromDtoToArtistMapper(PersonBaseDto personBaseDto, Artist artist) {
+ artist.setFirstname(personBaseDto.getFirstname());
+ artist.setLastname(personBaseDto.getLastname());
+ artist.setEmail(personBaseDto.getEmail());
+ artist.setPhone(personBaseDto.getPhone());
+ return artist;
+ }
+
+ private final ArtistDao artistDao = new ArtistDao();
+
+ public List getAllArtists(){
+ return artistDao.findAll();
+ }
+
+ public Artist getArtist(@PathParam("id") long id){
+ return artistDao.findOne(id);
+ }
+
+ public Artist createArtist(PersonCreateDto personCreateDto) {
+ Artist artist = fromDtoToArtistMapper(personCreateDto, new Artist());
+ artistDao.save(artist);
+ return artist;
+ }
+
+ public Artist updateArtist(long id, PersonUpdateDto personUpdateDto){
+ if (!(id == personUpdateDto.getId())) {
+ throw new BadRequestException("Artist non accessible");
+ }
+ Artist artist = fromDtoToArtistMapper(personUpdateDto,getArtist(id));
+ artistDao.update(artist);
+ return artist;
+ }
+
+ public void deleteArtist(long id){
+ artistDao.deleteById(id);
+ }
+
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/service/ConcertService.java b/src/main/java/fr/istic/taa/jaxrs/service/ConcertService.java
new file mode 100644
index 00000000..55ffa23b
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/service/ConcertService.java
@@ -0,0 +1,150 @@
+package fr.istic.taa.jaxrs.service;
+
+import fr.istic.taa.jaxrs.dao.generic.ArtistDao;
+import fr.istic.taa.jaxrs.dao.generic.ConcertDao;
+import fr.istic.taa.jaxrs.dao.generic.OrganizerDao; // Pense à ajouter l'import de ton OrganizerDao
+import fr.istic.taa.jaxrs.domain.Artist;
+import fr.istic.taa.jaxrs.domain.Concert;
+import fr.istic.taa.jaxrs.domain.Organizer;
+import fr.istic.taa.jaxrs.dto.ConcertBaseDto;
+import fr.istic.taa.jaxrs.dto.ConcertCreateDto;
+import fr.istic.taa.jaxrs.dto.ConcertUpdateDto;
+import jakarta.ws.rs.BadRequestException;
+import jakarta.ws.rs.NotFoundException;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+public class ConcertService {
+ private static final ConcertDao concertDao = new ConcertDao();
+ private static final OrganizerDao organizerDao = new OrganizerDao(); // Ajout du DAO Organisateur
+ private static final ArtistDao artistDao = new ArtistDao(); // Ajout du DAO Artiste
+
+ public Long countConcerts(){
+ return concertDao.countConcerts();
+ }
+
+ /**
+ * Ton mapper mis à jour avec les nouveaux champs et la gestion des relations (ManyToMany, ManyToOne)
+ */
+ private Concert fromDtoToConcertMapper(ConcertBaseDto concertDto, Concert concert) {
+ // 1. Mapping des champs que tu avais déjà définis
+ concert.setName(concertDto.getName());
+ concert.setImage(concertDto.getImage());
+ concert.setDescription(concertDto.getDescription());
+ concert.setLocation(concertDto.getLocation());
+ concert.setPrice(concertDto.getPrice());
+ concert.setPopularity(concertDto.getPopularity());
+ concert.setPlaceNumber(concertDto.getPlaceNumber());
+ concert.setMusicalGenre(concertDto.getMusicalGenre());
+ concert.setDate(concertDto.getDate());
+ concert.setStartTime(concertDto.getStartTime());
+ concert.setEndTime(concertDto.getEndTime());
+
+ // 3. Récupération et liaison de l'Organisateur
+ if (concertDto.getOrganizerId() != null) {
+ Organizer organizer = organizerDao.findOne(concertDto.getOrganizerId());
+ if (organizer != null) {
+ concert.setOrganizer(organizer);
+ } else {
+ throw new NotFoundException("Organisateur introuvable avec l'ID : " + concertDto.getOrganizerId());
+ }
+ }
+
+ // 4. Récupération et liaison de la liste des Artistes (Relation @ManyToMany)
+ if (concertDto.getArtistIds() != null && !concertDto.getArtistIds().isEmpty()) {
+ Collection artistsEntities = new ArrayList<>();
+ for (Long artistId : concertDto.getArtistIds()) {
+ Artist artist = artistDao.findOne(artistId);
+ if (artist != null) {
+ artistsEntities.add(artist);
+
+ // Après avoir rajouter parmi la liste des artistes invités au concert ,
+ //Nous souhaitons rajouter egalement le concert à la liste des concerts pour chaque artiste
+ if (artist.getConcerts() == null) {
+ artist.setConcerts(new ArrayList<>());
+ }
+ if (!artist.getConcerts().contains(concert)) {
+ artist.getConcerts().add(concert);
+ }
+ }
+ }
+ concert.setArtists(artistsEntities);
+ } else {
+ // Si aucun artiste n'est envoyé, on vide ou on initialise la collection
+ concert.setArtists(new ArrayList<>());
+ }
+
+ return concert;
+ }
+
+ public List getConcerts() {
+ return concertDao.findAll();
+ }
+
+ public Concert getConcert(Long id) {
+ return concertDao.findOne(id);
+ }
+
+ public Concert createConcert(ConcertCreateDto concertCreateDto) {
+ Concert concert = fromDtoToConcertMapper(concertCreateDto, new Concert());
+ // Les billets dispo sont égaux au nombre de places à la création
+ concert.setAvailableTickets(concert.getPlaceNumber());
+
+ // Valeurs par défaut pour l'état d'un nouveau concert
+ concert.setIsValidated(false);
+ concert.setIsCanceled(false);
+ concert.setIsDeleted(false);
+
+ concertDao.save(concert);
+ return concert;
+ }
+
+ public Concert updateConcert(long id, ConcertUpdateDto concertUpdateDto) {
+ if (!(id == concertUpdateDto.getId())) {
+ throw new BadRequestException("Concert non accessible");
+ }
+ // Ton mapper mettra automatiquement à jour l'organisateur ou les artistes si modifiés dans le formulaire
+ Concert concert = fromDtoToConcertMapper(concertUpdateDto, getConcert(id));
+ concertDao.update(concert);
+ return concert;
+ }
+
+ public List searchConcerts(String searchQ) {
+ return concertDao.searchConcerts(searchQ);
+ }
+
+ public void deleteConcert(Long id) {
+ concertDao.deleteById(id);
+ }
+
+ public List findByLocation(String location) {
+ return concertDao.findByLocation(location);
+ }
+
+ public List findValidated() {
+ return concertDao.findValidated();
+ }
+
+ public List findByMaxPrice(Long maxPrice) {
+ return concertDao.findByMaxPrice(maxPrice);
+ }
+
+ public List findByDate(Date date) {
+ return concertDao.findByDate(date);
+ }
+
+ public List findAllOrderByPopularity() {
+ return concertDao.findAllOrderByPopularity();
+ }
+
+ public List findAllOrderByPrice() {
+ return concertDao.findAllOrderByPrice();
+ }
+
+ public List findAllOrderByDate() {
+ return concertDao.findAllOrderByDate();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/service/NotificationService.java b/src/main/java/fr/istic/taa/jaxrs/service/NotificationService.java
new file mode 100644
index 00000000..62e4e236
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/service/NotificationService.java
@@ -0,0 +1,21 @@
+package fr.istic.taa.jaxrs.service;
+
+import fr.istic.taa.jaxrs.dao.generic.NotificationDao;
+import fr.istic.taa.jaxrs.domain.Notification;
+import java.util.List;
+
+public class NotificationService {
+ private final NotificationDao notificationDao = new NotificationDao();
+
+ public List getAllNotifications() {
+ return notificationDao.findAll();
+ }
+
+ public Notification getNotification(long id) {
+ return notificationDao.findOne(id);
+ }
+
+ public void deleteNotification(long id) {
+ notificationDao.deleteById(id);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/service/OrganizerService.java b/src/main/java/fr/istic/taa/jaxrs/service/OrganizerService.java
new file mode 100644
index 00000000..d548995d
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/service/OrganizerService.java
@@ -0,0 +1,61 @@
+package fr.istic.taa.jaxrs.service;
+
+import fr.istic.taa.jaxrs.dao.generic.OrganizerDao;
+import fr.istic.taa.jaxrs.domain.Concert;
+
+import fr.istic.taa.jaxrs.domain.Organizer;
+import fr.istic.taa.jaxrs.dto.ConcertBaseDto;
+import fr.istic.taa.jaxrs.dto.ConcertCreateDto;
+import fr.istic.taa.jaxrs.dto.PersonBaseDto;
+import fr.istic.taa.jaxrs.dto.PersonUpdateDto;
+import fr.istic.taa.jaxrs.dto.PersonCreateDto;
+import jakarta.ws.rs.BadRequestException;
+import jakarta.ws.rs.PathParam;
+
+import java.util.List;
+
+public class OrganizerService {
+
+ public Long countOrganizers(){
+ return organizerDao.countOrganizers();
+ }
+
+ private Organizer fromDtoToOrganizerMapper(PersonBaseDto personBaseDto, Organizer organizer) {
+ organizer.setFirstname(personBaseDto.getFirstname());
+ organizer.setLastname(personBaseDto.getLastname());
+ organizer.setEmail(personBaseDto.getEmail());
+ organizer.setPhone(personBaseDto.getPhone());
+ return organizer;
+ }
+
+ private final OrganizerDao organizerDao = new OrganizerDao();
+
+ public List getAllOrganizers(){
+ return organizerDao.findAll();
+ }
+
+ public Organizer getOrganizer(@PathParam("id") long id){
+ return organizerDao.findOne(id);
+ }
+
+ public Organizer createOrganizer(PersonCreateDto personCreateDto) {
+ Organizer organizer = fromDtoToOrganizerMapper(personCreateDto, new Organizer());
+ organizerDao.save(organizer);
+ return organizer;
+ }
+
+ public Organizer updateOrganizer(long id, PersonUpdateDto personUpdateDto){
+ if (!(id == personUpdateDto.getId())) {
+ throw new BadRequestException("Organizer non accessible");
+ }
+ Organizer organizer = fromDtoToOrganizerMapper(personUpdateDto,getOrganizer(id));
+ organizerDao.update(organizer);
+ return organizer;
+ }
+
+ public void deleteOrganizer(long id){
+ organizerDao.deleteById(id);
+ }
+
+
+}
diff --git a/src/main/java/fr/istic/taa/jaxrs/service/TicketService.java b/src/main/java/fr/istic/taa/jaxrs/service/TicketService.java
new file mode 100644
index 00000000..1873fcc8
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/service/TicketService.java
@@ -0,0 +1,107 @@
+package fr.istic.taa.jaxrs.service;
+
+import fr.istic.taa.jaxrs.dao.generic.ConcertDao;
+import fr.istic.taa.jaxrs.dao.generic.TicketDao;
+import fr.istic.taa.jaxrs.dao.generic.UserDao;
+import fr.istic.taa.jaxrs.domain.Concert;
+import fr.istic.taa.jaxrs.domain.Ticket;
+import fr.istic.taa.jaxrs.domain.User;
+import fr.istic.taa.jaxrs.dto.TicketCreateDto;
+import jakarta.ws.rs.BadRequestException;
+import jakarta.ws.rs.NotFoundException;
+
+import java.util.Date;
+import java.util.List;
+
+public class TicketService {
+ private final TicketDao ticketDao = new TicketDao();
+ private final ConcertDao concertDao = new ConcertDao();
+ private final UserDao userDao = new UserDao();
+
+ public Long countTickets(){
+ return ticketDao.countTickets();
+ }
+ public List getAllTickets() {
+ return ticketDao.findAll();
+ }
+
+ public List findByEmail(String email) {
+ return ticketDao.findByEmail(email);
+ }
+
+ public Ticket getTicket(long id) {
+ return ticketDao.findOne(id);
+ }
+
+ public void deleteTicket(long id) {
+ ticketDao.deleteById(id);
+ }
+
+ // Méthode métier — acheter un ticket
+ // Méthode métier — acheter un ticket
+ public Ticket buyTicket(TicketCreateDto dto) {
+ Concert concert = concertDao.findOne(dto.getConcertId());
+ if (concert == null) throw new NotFoundException("Concert non trouvé");
+ if (concert.isIsCanceled()) throw new BadRequestException("Concert annulé");
+ if (concert.getAvailableTickets() <= 0) throw new BadRequestException("Complet");
+
+ Ticket ticket = new Ticket();
+ ticket.setPrice(concert.getPrice());
+ ticket.setDate(new Date());
+ ticket.setBuyerEmail(dto.getBuyerEmail());
+ ticket.setQuantity(dto.getQuantity());
+ ticket.setConcert(concert);
+
+ // Initialisation des nouveaux états
+ ticket.setStatus("confirmed"); // État vert dans ton Angular
+ ticket.setCanceled(false);
+ ticket.setRefunded(false);
+
+ concert.setAvailableTickets(concert.getAvailableTickets() - dto.getQuantity());
+ concertDao.update(concert);
+ ticketDao.save(ticket);
+ return ticket;
+ }
+
+ public Ticket cancelTicket(long id) {
+ Ticket ticket = getTicket(id);
+ if (ticket == null) throw new NotFoundException("Ticket non trouvé");
+
+ ticket.setCanceled(true);
+ ticket.setStatus("cancelled"); // État rouge dans ton Angular
+ ticket.setCancelDate(new Date());
+ ticketDao.update(ticket);
+ return ticket;
+ }
+
+ public Ticket transferTicket(long ticketId, String newOwnerEmail) {
+ Ticket ticket = getTicket(ticketId);
+
+ if (ticket == null) throw new NotFoundException("Ticket non trouvé");
+ if (ticket.isCanceled() || "cancelled".equals(ticket.getStatus())) {
+ throw new BadRequestException("Ticket annulé, transfert impossible");
+ }
+
+ // --- Logique d'historique de transfert ---
+ // On sauvegarde qui donne le ticket (l'actuel buyerEmail)
+ ticket.setTransferorEmail(ticket.getBuyerEmail());
+
+ // On met à jour le nouveau propriétaire
+ ticket.setBuyerEmail(newOwnerEmail);
+
+ // On change le statut pour déclencher la couleur violette
+ ticket.setStatus("transferred");
+
+ ticketDao.update(ticket);
+ return ticket;
+ }
+ // Méthode métier — rembourser un ticket
+ public Ticket refundTicket(long id) {
+ Ticket ticket = getTicket(id);
+ ticket.setRefunded(true);
+ ticket.setRefundDate(new Date());
+ ticketDao.update(ticket);
+ return ticket;
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/fr/istic/taa/jaxrs/service/UserService.java b/src/main/java/fr/istic/taa/jaxrs/service/UserService.java
new file mode 100644
index 00000000..c02bffda
--- /dev/null
+++ b/src/main/java/fr/istic/taa/jaxrs/service/UserService.java
@@ -0,0 +1,60 @@
+package fr.istic.taa.jaxrs.service;
+
+import fr.istic.taa.jaxrs.dao.generic.UserDao;
+import fr.istic.taa.jaxrs.domain.Concert;
+
+import fr.istic.taa.jaxrs.domain.User;
+import fr.istic.taa.jaxrs.dto.ConcertBaseDto;
+import fr.istic.taa.jaxrs.dto.ConcertCreateDto;
+import fr.istic.taa.jaxrs.dto.PersonBaseDto;
+import fr.istic.taa.jaxrs.dto.PersonUpdateDto;
+import fr.istic.taa.jaxrs.dto.PersonCreateDto;
+import jakarta.ws.rs.BadRequestException;
+import jakarta.ws.rs.PathParam;
+
+import java.util.List;
+
+public class UserService {
+
+ public Long countUsers(){
+ return userDao.countUsers();
+ }
+
+ private User fromDtoToUserMapper(PersonBaseDto personBaseDto, User user) {
+ user.setFirstname(personBaseDto.getFirstname());
+ user.setLastname(personBaseDto.getLastname());
+ user.setEmail(personBaseDto.getEmail());
+ user.setPhone(personBaseDto.getPhone());
+ return user;
+ }
+
+ private final UserDao userDao = new UserDao();
+
+ public List getAllUsers(){
+ return userDao.findAll();
+ }
+
+ public User getUser(@PathParam("id") long id){
+ return userDao.findOne(id);
+ }
+
+ public User createUser(PersonCreateDto personCreateDto) {
+ User user = fromDtoToUserMapper(personCreateDto, new User());
+ userDao.save(user);
+ return user;
+ }
+
+ public User updateUser(long id, PersonUpdateDto personUpdateDto){
+ if (!(id == personUpdateDto.getId())) {
+ throw new BadRequestException("User non accessible");
+ }
+ User user = fromDtoToUserMapper(personUpdateDto,getUser(id));
+ userDao.update(user);
+ return user;
+ }
+
+ public void deleteUser(long id){
+ userDao.deleteById(id);
+ }
+
+}
diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml
index 7277b7dd..f8a2851a 100644
--- a/src/main/resources/META-INF/persistence.xml
+++ b/src/main/resources/META-INF/persistence.xml
@@ -13,9 +13,8 @@
value="jdbc:hsqldb:hsql://localhost/" />
-
+
+
@@ -30,9 +29,8 @@
value="jdbc:hsqldb:hsql://localhost/" />
-
+
+
@@ -50,9 +48,8 @@
value="jdbc:mysql://localhost/mydatabase" />
-
+
+
diff --git a/target/classes/META-INF/persistence.xml b/target/classes/META-INF/persistence.xml
new file mode 100644
index 00000000..f8a2851a
--- /dev/null
+++ b/target/classes/META-INF/persistence.xml
@@ -0,0 +1,64 @@
+
+
+
+
+ org.hibernate.jpa.HibernatePersistenceProvider
+
+
+
+
+
+
+
+
+
+
+
+
+ org.hibernate.jpa.HibernatePersistenceProvider
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.hibernate.jpa.HibernatePersistenceProvider
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/fr/istic/taa/jaxrs/RestServer.class b/target/classes/fr/istic/taa/jaxrs/RestServer.class
new file mode 100644
index 00000000..d4025640
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/RestServer.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/TestApplication.class b/target/classes/fr/istic/taa/jaxrs/TestApplication.class
new file mode 100644
index 00000000..b21b3dff
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/TestApplication.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dao/generic/AbstractJpaDao.class b/target/classes/fr/istic/taa/jaxrs/dao/generic/AbstractJpaDao.class
new file mode 100644
index 00000000..84af3772
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dao/generic/AbstractJpaDao.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dao/generic/AdminDao.class b/target/classes/fr/istic/taa/jaxrs/dao/generic/AdminDao.class
new file mode 100644
index 00000000..b6343d3d
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dao/generic/AdminDao.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dao/generic/ArtistDao.class b/target/classes/fr/istic/taa/jaxrs/dao/generic/ArtistDao.class
new file mode 100644
index 00000000..925d6079
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dao/generic/ArtistDao.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dao/generic/ConcertDao.class b/target/classes/fr/istic/taa/jaxrs/dao/generic/ConcertDao.class
new file mode 100644
index 00000000..91b427b7
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dao/generic/ConcertDao.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dao/generic/EntityManagerHelper.class b/target/classes/fr/istic/taa/jaxrs/dao/generic/EntityManagerHelper.class
new file mode 100644
index 00000000..662941a1
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dao/generic/EntityManagerHelper.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dao/generic/IGenericDao.class b/target/classes/fr/istic/taa/jaxrs/dao/generic/IGenericDao.class
new file mode 100644
index 00000000..66637f7a
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dao/generic/IGenericDao.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dao/generic/NotificationDao.class b/target/classes/fr/istic/taa/jaxrs/dao/generic/NotificationDao.class
new file mode 100644
index 00000000..55e089f0
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dao/generic/NotificationDao.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dao/generic/OrganizerDao.class b/target/classes/fr/istic/taa/jaxrs/dao/generic/OrganizerDao.class
new file mode 100644
index 00000000..393a7693
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dao/generic/OrganizerDao.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dao/generic/TicketDao.class b/target/classes/fr/istic/taa/jaxrs/dao/generic/TicketDao.class
new file mode 100644
index 00000000..06e5e369
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dao/generic/TicketDao.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dao/generic/UserDao.class b/target/classes/fr/istic/taa/jaxrs/dao/generic/UserDao.class
new file mode 100644
index 00000000..3ae2f99b
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dao/generic/UserDao.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/Admin.class b/target/classes/fr/istic/taa/jaxrs/domain/Admin.class
new file mode 100644
index 00000000..ecf9e5eb
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/Admin.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/AdminStats.class b/target/classes/fr/istic/taa/jaxrs/domain/AdminStats.class
new file mode 100644
index 00000000..6f11a98e
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/AdminStats.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/Artist.class b/target/classes/fr/istic/taa/jaxrs/domain/Artist.class
new file mode 100644
index 00000000..5dd2dfdf
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/Artist.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/Concert.class b/target/classes/fr/istic/taa/jaxrs/domain/Concert.class
new file mode 100644
index 00000000..0683b6ae
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/Concert.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/EntityManagerHelper.class b/target/classes/fr/istic/taa/jaxrs/domain/EntityManagerHelper.class
new file mode 100644
index 00000000..5b3ac300
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/EntityManagerHelper.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/JpaTest.class b/target/classes/fr/istic/taa/jaxrs/domain/JpaTest.class
new file mode 100644
index 00000000..6c3932df
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/JpaTest.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/Notification.class b/target/classes/fr/istic/taa/jaxrs/domain/Notification.class
new file mode 100644
index 00000000..001f67da
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/Notification.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/Organizer.class b/target/classes/fr/istic/taa/jaxrs/domain/Organizer.class
new file mode 100644
index 00000000..9b2ffb33
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/Organizer.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/Person.class b/target/classes/fr/istic/taa/jaxrs/domain/Person.class
new file mode 100644
index 00000000..37b29e03
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/Person.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/Pet.class b/target/classes/fr/istic/taa/jaxrs/domain/Pet.class
new file mode 100644
index 00000000..c2e34d3f
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/Pet.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/Ticket.class b/target/classes/fr/istic/taa/jaxrs/domain/Ticket.class
new file mode 100644
index 00000000..a8250400
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/Ticket.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/domain/User.class b/target/classes/fr/istic/taa/jaxrs/domain/User.class
new file mode 100644
index 00000000..4c2791f4
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/domain/User.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dto/ConcertBaseDto.class b/target/classes/fr/istic/taa/jaxrs/dto/ConcertBaseDto.class
new file mode 100644
index 00000000..2da71873
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dto/ConcertBaseDto.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dto/ConcertCreateDto.class b/target/classes/fr/istic/taa/jaxrs/dto/ConcertCreateDto.class
new file mode 100644
index 00000000..a33c9f69
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dto/ConcertCreateDto.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dto/ConcertUpdateDto.class b/target/classes/fr/istic/taa/jaxrs/dto/ConcertUpdateDto.class
new file mode 100644
index 00000000..0a60bd1f
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dto/ConcertUpdateDto.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dto/PersonBaseDto.class b/target/classes/fr/istic/taa/jaxrs/dto/PersonBaseDto.class
new file mode 100644
index 00000000..549aa296
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dto/PersonBaseDto.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dto/PersonCreateDto.class b/target/classes/fr/istic/taa/jaxrs/dto/PersonCreateDto.class
new file mode 100644
index 00000000..ce4e5aa3
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dto/PersonCreateDto.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dto/PersonUpdateDto.class b/target/classes/fr/istic/taa/jaxrs/dto/PersonUpdateDto.class
new file mode 100644
index 00000000..a5394bad
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dto/PersonUpdateDto.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dto/TicketCreateDto.class b/target/classes/fr/istic/taa/jaxrs/dto/TicketCreateDto.class
new file mode 100644
index 00000000..6ffc29ac
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dto/TicketCreateDto.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/dto/TicketTransferDto.class b/target/classes/fr/istic/taa/jaxrs/dto/TicketTransferDto.class
new file mode 100644
index 00000000..503aa353
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/dto/TicketTransferDto.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/rest/AdminResource.class b/target/classes/fr/istic/taa/jaxrs/rest/AdminResource.class
new file mode 100644
index 00000000..0804a94f
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/rest/AdminResource.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/rest/AdminStatsResource.class b/target/classes/fr/istic/taa/jaxrs/rest/AdminStatsResource.class
new file mode 100644
index 00000000..64ec6f27
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/rest/AdminStatsResource.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/rest/ArtistResource.class b/target/classes/fr/istic/taa/jaxrs/rest/ArtistResource.class
new file mode 100644
index 00000000..6c997d66
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/rest/ArtistResource.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/rest/ConcertResource.class b/target/classes/fr/istic/taa/jaxrs/rest/ConcertResource.class
new file mode 100644
index 00000000..fbeaaddb
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/rest/ConcertResource.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/rest/NotificationResource.class b/target/classes/fr/istic/taa/jaxrs/rest/NotificationResource.class
new file mode 100644
index 00000000..ab1889ab
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/rest/NotificationResource.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/rest/OrganizerResource.class b/target/classes/fr/istic/taa/jaxrs/rest/OrganizerResource.class
new file mode 100644
index 00000000..bc321a3a
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/rest/OrganizerResource.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/rest/PetResource.class b/target/classes/fr/istic/taa/jaxrs/rest/PetResource.class
new file mode 100644
index 00000000..7db9f096
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/rest/PetResource.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/rest/TicketResource.class b/target/classes/fr/istic/taa/jaxrs/rest/TicketResource.class
new file mode 100644
index 00000000..5f207566
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/rest/TicketResource.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/rest/UserResource.class b/target/classes/fr/istic/taa/jaxrs/rest/UserResource.class
new file mode 100644
index 00000000..92bb9724
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/rest/UserResource.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/service/AdminService.class b/target/classes/fr/istic/taa/jaxrs/service/AdminService.class
new file mode 100644
index 00000000..a8e30235
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/service/AdminService.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/service/ArtistService.class b/target/classes/fr/istic/taa/jaxrs/service/ArtistService.class
new file mode 100644
index 00000000..b4266794
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/service/ArtistService.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/service/ConcertService.class b/target/classes/fr/istic/taa/jaxrs/service/ConcertService.class
new file mode 100644
index 00000000..b49f0b58
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/service/ConcertService.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/service/NotificationService.class b/target/classes/fr/istic/taa/jaxrs/service/NotificationService.class
new file mode 100644
index 00000000..34023852
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/service/NotificationService.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/service/OrganizerService.class b/target/classes/fr/istic/taa/jaxrs/service/OrganizerService.class
new file mode 100644
index 00000000..9780530f
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/service/OrganizerService.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/service/TicketService.class b/target/classes/fr/istic/taa/jaxrs/service/TicketService.class
new file mode 100644
index 00000000..4b020518
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/service/TicketService.class differ
diff --git a/target/classes/fr/istic/taa/jaxrs/service/UserService.class b/target/classes/fr/istic/taa/jaxrs/service/UserService.class
new file mode 100644
index 00000000..f6d96313
Binary files /dev/null and b/target/classes/fr/istic/taa/jaxrs/service/UserService.class differ
diff --git a/target/dependency/angus-activation-1.0.0.jar b/target/dependency/angus-activation-1.0.0.jar
new file mode 100644
index 00000000..7bca6d99
Binary files /dev/null and b/target/dependency/angus-activation-1.0.0.jar differ
diff --git a/target/dependency/antlr4-runtime-4.10.1.jar b/target/dependency/antlr4-runtime-4.10.1.jar
new file mode 100644
index 00000000..1365d5a4
Binary files /dev/null and b/target/dependency/antlr4-runtime-4.10.1.jar differ
diff --git a/target/dependency/asyncutil-0.1.0.jar b/target/dependency/asyncutil-0.1.0.jar
new file mode 100644
index 00000000..29c267e6
Binary files /dev/null and b/target/dependency/asyncutil-0.1.0.jar differ
diff --git a/target/dependency/btf-1.3.jar b/target/dependency/btf-1.3.jar
new file mode 100644
index 00000000..523c40d2
Binary files /dev/null and b/target/dependency/btf-1.3.jar differ
diff --git a/target/dependency/byte-buddy-1.12.18.jar b/target/dependency/byte-buddy-1.12.18.jar
new file mode 100644
index 00000000..7b307fbe
Binary files /dev/null and b/target/dependency/byte-buddy-1.12.18.jar differ
diff --git a/target/dependency/classgraph-4.8.154.jar b/target/dependency/classgraph-4.8.154.jar
new file mode 100644
index 00000000..9ba21e56
Binary files /dev/null and b/target/dependency/classgraph-4.8.154.jar differ
diff --git a/target/dependency/classmate-1.5.1.jar b/target/dependency/classmate-1.5.1.jar
new file mode 100644
index 00000000..819f5eaf
Binary files /dev/null and b/target/dependency/classmate-1.5.1.jar differ
diff --git a/target/dependency/codemodel-4.0.2.jar b/target/dependency/codemodel-4.0.2.jar
new file mode 100644
index 00000000..ac73daf8
Binary files /dev/null and b/target/dependency/codemodel-4.0.2.jar differ
diff --git a/target/dependency/commons-codec-1.15.jar b/target/dependency/commons-codec-1.15.jar
new file mode 100644
index 00000000..f14985ac
Binary files /dev/null and b/target/dependency/commons-codec-1.15.jar differ
diff --git a/target/dependency/commons-lang3-3.12.0.jar b/target/dependency/commons-lang3-3.12.0.jar
new file mode 100644
index 00000000..4d434a2a
Binary files /dev/null and b/target/dependency/commons-lang3-3.12.0.jar differ
diff --git a/target/dependency/commons-logging-1.2.jar b/target/dependency/commons-logging-1.2.jar
new file mode 100644
index 00000000..93a3b9f6
Binary files /dev/null and b/target/dependency/commons-logging-1.2.jar differ
diff --git a/target/dependency/hamcrest-core-1.3.jar b/target/dependency/hamcrest-core-1.3.jar
new file mode 100644
index 00000000..9d5fe16e
Binary files /dev/null and b/target/dependency/hamcrest-core-1.3.jar differ
diff --git a/target/dependency/hibernate-commons-annotations-6.0.6.Final.jar b/target/dependency/hibernate-commons-annotations-6.0.6.Final.jar
new file mode 100644
index 00000000..fe67e633
Binary files /dev/null and b/target/dependency/hibernate-commons-annotations-6.0.6.Final.jar differ
diff --git a/target/dependency/hibernate-core-6.2.7.Final.jar b/target/dependency/hibernate-core-6.2.7.Final.jar
new file mode 100644
index 00000000..6d2dc25b
Binary files /dev/null and b/target/dependency/hibernate-core-6.2.7.Final.jar differ
diff --git a/target/dependency/hsqldb-2.7.2.jar b/target/dependency/hsqldb-2.7.2.jar
new file mode 100644
index 00000000..13387392
Binary files /dev/null and b/target/dependency/hsqldb-2.7.2.jar differ
diff --git a/target/dependency/httpclient-4.5.14.jar b/target/dependency/httpclient-4.5.14.jar
new file mode 100644
index 00000000..2bb7c073
Binary files /dev/null and b/target/dependency/httpclient-4.5.14.jar differ
diff --git a/target/dependency/httpcore-4.4.16.jar b/target/dependency/httpcore-4.4.16.jar
new file mode 100644
index 00000000..f0bdebeb
Binary files /dev/null and b/target/dependency/httpcore-4.4.16.jar differ
diff --git a/target/dependency/istack-commons-runtime-4.1.2.jar b/target/dependency/istack-commons-runtime-4.1.2.jar
new file mode 100644
index 00000000..d1a642b1
Binary files /dev/null and b/target/dependency/istack-commons-runtime-4.1.2.jar differ
diff --git a/target/dependency/istack-commons-tools-4.1.2.jar b/target/dependency/istack-commons-tools-4.1.2.jar
new file mode 100644
index 00000000..6967a103
Binary files /dev/null and b/target/dependency/istack-commons-tools-4.1.2.jar differ
diff --git a/target/dependency/jackson-annotations-2.14.3.jar b/target/dependency/jackson-annotations-2.14.3.jar
new file mode 100644
index 00000000..f10f7802
Binary files /dev/null and b/target/dependency/jackson-annotations-2.14.3.jar differ
diff --git a/target/dependency/jackson-core-2.14.3.jar b/target/dependency/jackson-core-2.14.3.jar
new file mode 100644
index 00000000..b1fb3f27
Binary files /dev/null and b/target/dependency/jackson-core-2.14.3.jar differ
diff --git a/target/dependency/jackson-coreutils-2.0.jar b/target/dependency/jackson-coreutils-2.0.jar
new file mode 100644
index 00000000..cc22bd3d
Binary files /dev/null and b/target/dependency/jackson-coreutils-2.0.jar differ
diff --git a/target/dependency/jackson-databind-2.14.3.jar b/target/dependency/jackson-databind-2.14.3.jar
new file mode 100644
index 00000000..a4791e50
Binary files /dev/null and b/target/dependency/jackson-databind-2.14.3.jar differ
diff --git a/target/dependency/jackson-dataformat-yaml-2.15.1.jar b/target/dependency/jackson-dataformat-yaml-2.15.1.jar
new file mode 100644
index 00000000..f2f596e3
Binary files /dev/null and b/target/dependency/jackson-dataformat-yaml-2.15.1.jar differ
diff --git a/target/dependency/jackson-datatype-jsr310-2.15.1.jar b/target/dependency/jackson-datatype-jsr310-2.15.1.jar
new file mode 100644
index 00000000..fb2460e6
Binary files /dev/null and b/target/dependency/jackson-datatype-jsr310-2.15.1.jar differ
diff --git a/target/dependency/jackson-jakarta-rs-base-2.14.3.jar b/target/dependency/jackson-jakarta-rs-base-2.14.3.jar
new file mode 100644
index 00000000..c020edba
Binary files /dev/null and b/target/dependency/jackson-jakarta-rs-base-2.14.3.jar differ
diff --git a/target/dependency/jackson-jakarta-rs-json-provider-2.14.3.jar b/target/dependency/jackson-jakarta-rs-json-provider-2.14.3.jar
new file mode 100644
index 00000000..90ff595c
Binary files /dev/null and b/target/dependency/jackson-jakarta-rs-json-provider-2.14.3.jar differ
diff --git a/target/dependency/jackson-module-jakarta-xmlbind-annotations-2.14.3.jar b/target/dependency/jackson-module-jakarta-xmlbind-annotations-2.14.3.jar
new file mode 100644
index 00000000..8fc8a349
Binary files /dev/null and b/target/dependency/jackson-module-jakarta-xmlbind-annotations-2.14.3.jar differ
diff --git a/target/dependency/jakarta.activation-api-2.1.0.jar b/target/dependency/jakarta.activation-api-2.1.0.jar
new file mode 100644
index 00000000..b1259856
Binary files /dev/null and b/target/dependency/jakarta.activation-api-2.1.0.jar differ
diff --git a/target/dependency/jakarta.annotation-api-2.1.1.jar b/target/dependency/jakarta.annotation-api-2.1.1.jar
new file mode 100644
index 00000000..e13b7df5
Binary files /dev/null and b/target/dependency/jakarta.annotation-api-2.1.1.jar differ
diff --git a/target/dependency/jakarta.inject-api-2.0.1.jar b/target/dependency/jakarta.inject-api-2.0.1.jar
new file mode 100644
index 00000000..a92e099d
Binary files /dev/null and b/target/dependency/jakarta.inject-api-2.0.1.jar differ
diff --git a/target/dependency/jakarta.persistence-api-3.1.0.jar b/target/dependency/jakarta.persistence-api-3.1.0.jar
new file mode 100644
index 00000000..40307969
Binary files /dev/null and b/target/dependency/jakarta.persistence-api-3.1.0.jar differ
diff --git a/target/dependency/jakarta.servlet-api-6.0.0.jar b/target/dependency/jakarta.servlet-api-6.0.0.jar
new file mode 100644
index 00000000..d15c10cb
Binary files /dev/null and b/target/dependency/jakarta.servlet-api-6.0.0.jar differ
diff --git a/target/dependency/jakarta.transaction-api-2.0.1.jar b/target/dependency/jakarta.transaction-api-2.0.1.jar
new file mode 100644
index 00000000..b1e7da4b
Binary files /dev/null and b/target/dependency/jakarta.transaction-api-2.0.1.jar differ
diff --git a/target/dependency/jakarta.validation-api-3.0.2.jar b/target/dependency/jakarta.validation-api-3.0.2.jar
new file mode 100644
index 00000000..254c7a27
Binary files /dev/null and b/target/dependency/jakarta.validation-api-3.0.2.jar differ
diff --git a/target/dependency/jakarta.ws.rs-api-3.1.0.jar b/target/dependency/jakarta.ws.rs-api-3.1.0.jar
new file mode 100644
index 00000000..80670a1b
Binary files /dev/null and b/target/dependency/jakarta.ws.rs-api-3.1.0.jar differ
diff --git a/target/dependency/jakarta.xml.bind-api-4.0.0.jar b/target/dependency/jakarta.xml.bind-api-4.0.0.jar
new file mode 100644
index 00000000..b10d606b
Binary files /dev/null and b/target/dependency/jakarta.xml.bind-api-4.0.0.jar differ
diff --git a/target/dependency/jandex-2.4.3.Final.jar b/target/dependency/jandex-2.4.3.Final.jar
new file mode 100644
index 00000000..7f8e2a05
Binary files /dev/null and b/target/dependency/jandex-2.4.3.Final.jar differ
diff --git a/target/dependency/jandex-3.0.5.jar b/target/dependency/jandex-3.0.5.jar
new file mode 100644
index 00000000..157169a1
Binary files /dev/null and b/target/dependency/jandex-3.0.5.jar differ
diff --git a/target/dependency/javassist-3.29.2-GA.jar b/target/dependency/javassist-3.29.2-GA.jar
new file mode 100644
index 00000000..68fc3010
Binary files /dev/null and b/target/dependency/javassist-3.29.2-GA.jar differ
diff --git a/target/dependency/jaxb-core-4.0.2.jar b/target/dependency/jaxb-core-4.0.2.jar
new file mode 100644
index 00000000..e4fdfe2b
Binary files /dev/null and b/target/dependency/jaxb-core-4.0.2.jar differ
diff --git a/target/dependency/jaxb-jxc-4.0.2.jar b/target/dependency/jaxb-jxc-4.0.2.jar
new file mode 100644
index 00000000..82ccd9a6
Binary files /dev/null and b/target/dependency/jaxb-jxc-4.0.2.jar differ
diff --git a/target/dependency/jaxb-runtime-4.0.2.jar b/target/dependency/jaxb-runtime-4.0.2.jar
new file mode 100644
index 00000000..9490a45d
Binary files /dev/null and b/target/dependency/jaxb-runtime-4.0.2.jar differ
diff --git a/target/dependency/jaxb-xjc-4.0.2.jar b/target/dependency/jaxb-xjc-4.0.2.jar
new file mode 100644
index 00000000..3e8ec45e
Binary files /dev/null and b/target/dependency/jaxb-xjc-4.0.2.jar differ
diff --git a/target/dependency/jboss-logging-3.5.0.Final.jar b/target/dependency/jboss-logging-3.5.0.Final.jar
new file mode 100644
index 00000000..d39dfcfa
Binary files /dev/null and b/target/dependency/jboss-logging-3.5.0.Final.jar differ
diff --git a/target/dependency/jboss-threads-3.5.0.Final.jar b/target/dependency/jboss-threads-3.5.0.Final.jar
new file mode 100644
index 00000000..8b33b3b3
Binary files /dev/null and b/target/dependency/jboss-threads-3.5.0.Final.jar differ
diff --git a/target/dependency/json-patch-1.13.jar b/target/dependency/json-patch-1.13.jar
new file mode 100644
index 00000000..93a8c95f
Binary files /dev/null and b/target/dependency/json-patch-1.13.jar differ
diff --git a/target/dependency/junit-4.12.jar b/target/dependency/junit-4.12.jar
new file mode 100644
index 00000000..3a7fc266
Binary files /dev/null and b/target/dependency/junit-4.12.jar differ
diff --git a/target/dependency/log4j-1.2.17.jar b/target/dependency/log4j-1.2.17.jar
new file mode 100644
index 00000000..1d425cf7
Binary files /dev/null and b/target/dependency/log4j-1.2.17.jar differ
diff --git a/target/dependency/msg-simple-1.2.jar b/target/dependency/msg-simple-1.2.jar
new file mode 100644
index 00000000..0e293d5a
Binary files /dev/null and b/target/dependency/msg-simple-1.2.jar differ
diff --git a/target/dependency/mysql-connector-j-8.1.0.jar b/target/dependency/mysql-connector-j-8.1.0.jar
new file mode 100644
index 00000000..9e38a719
Binary files /dev/null and b/target/dependency/mysql-connector-j-8.1.0.jar differ
diff --git a/target/dependency/protobuf-java-3.21.9.jar b/target/dependency/protobuf-java-3.21.9.jar
new file mode 100644
index 00000000..c4fd860d
Binary files /dev/null and b/target/dependency/protobuf-java-3.21.9.jar differ
diff --git a/target/dependency/reactive-streams-1.0.4.jar b/target/dependency/reactive-streams-1.0.4.jar
new file mode 100644
index 00000000..e58c483f
Binary files /dev/null and b/target/dependency/reactive-streams-1.0.4.jar differ
diff --git a/target/dependency/relaxng-datatype-4.0.2.jar b/target/dependency/relaxng-datatype-4.0.2.jar
new file mode 100644
index 00000000..36f17e3d
Binary files /dev/null and b/target/dependency/relaxng-datatype-4.0.2.jar differ
diff --git a/target/dependency/resteasy-client-6.2.4.Final.jar b/target/dependency/resteasy-client-6.2.4.Final.jar
new file mode 100644
index 00000000..93c0610e
Binary files /dev/null and b/target/dependency/resteasy-client-6.2.4.Final.jar differ
diff --git a/target/dependency/resteasy-client-api-6.2.4.Final.jar b/target/dependency/resteasy-client-api-6.2.4.Final.jar
new file mode 100644
index 00000000..031aadd1
Binary files /dev/null and b/target/dependency/resteasy-client-api-6.2.4.Final.jar differ
diff --git a/target/dependency/resteasy-core-6.2.4.Final.jar b/target/dependency/resteasy-core-6.2.4.Final.jar
new file mode 100644
index 00000000..b3754b8e
Binary files /dev/null and b/target/dependency/resteasy-core-6.2.4.Final.jar differ
diff --git a/target/dependency/resteasy-core-spi-6.2.4.Final.jar b/target/dependency/resteasy-core-spi-6.2.4.Final.jar
new file mode 100644
index 00000000..ce550847
Binary files /dev/null and b/target/dependency/resteasy-core-spi-6.2.4.Final.jar differ
diff --git a/target/dependency/resteasy-jackson2-provider-6.2.4.Final.jar b/target/dependency/resteasy-jackson2-provider-6.2.4.Final.jar
new file mode 100644
index 00000000..a5efd077
Binary files /dev/null and b/target/dependency/resteasy-jackson2-provider-6.2.4.Final.jar differ
diff --git a/target/dependency/resteasy-jaxb-provider-6.2.4.Final.jar b/target/dependency/resteasy-jaxb-provider-6.2.4.Final.jar
new file mode 100644
index 00000000..d94c3070
Binary files /dev/null and b/target/dependency/resteasy-jaxb-provider-6.2.4.Final.jar differ
diff --git a/target/dependency/resteasy-undertow-6.2.4.Final.jar b/target/dependency/resteasy-undertow-6.2.4.Final.jar
new file mode 100644
index 00000000..6442b919
Binary files /dev/null and b/target/dependency/resteasy-undertow-6.2.4.Final.jar differ
diff --git a/target/dependency/rngom-4.0.2.jar b/target/dependency/rngom-4.0.2.jar
new file mode 100644
index 00000000..425adf0a
Binary files /dev/null and b/target/dependency/rngom-4.0.2.jar differ
diff --git a/target/dependency/slf4j-api-1.7.30.jar b/target/dependency/slf4j-api-1.7.30.jar
new file mode 100644
index 00000000..29ac26fb
Binary files /dev/null and b/target/dependency/slf4j-api-1.7.30.jar differ
diff --git a/target/dependency/slf4j-log4j12-1.7.30.jar b/target/dependency/slf4j-log4j12-1.7.30.jar
new file mode 100644
index 00000000..c6bc8b2e
Binary files /dev/null and b/target/dependency/slf4j-log4j12-1.7.30.jar differ
diff --git a/target/dependency/snakeyaml-2.0.jar b/target/dependency/snakeyaml-2.0.jar
new file mode 100644
index 00000000..469b0430
Binary files /dev/null and b/target/dependency/snakeyaml-2.0.jar differ
diff --git a/target/dependency/swagger-annotations-jakarta-2.2.15.jar b/target/dependency/swagger-annotations-jakarta-2.2.15.jar
new file mode 100644
index 00000000..fd59a5a0
Binary files /dev/null and b/target/dependency/swagger-annotations-jakarta-2.2.15.jar differ
diff --git a/target/dependency/swagger-core-jakarta-2.2.15.jar b/target/dependency/swagger-core-jakarta-2.2.15.jar
new file mode 100644
index 00000000..c013e59e
Binary files /dev/null and b/target/dependency/swagger-core-jakarta-2.2.15.jar differ
diff --git a/target/dependency/swagger-integration-jakarta-2.2.15.jar b/target/dependency/swagger-integration-jakarta-2.2.15.jar
new file mode 100644
index 00000000..9f801090
Binary files /dev/null and b/target/dependency/swagger-integration-jakarta-2.2.15.jar differ
diff --git a/target/dependency/swagger-jaxrs2-jakarta-2.2.15.jar b/target/dependency/swagger-jaxrs2-jakarta-2.2.15.jar
new file mode 100644
index 00000000..df8c385c
Binary files /dev/null and b/target/dependency/swagger-jaxrs2-jakarta-2.2.15.jar differ
diff --git a/target/dependency/swagger-jaxrs2-servlet-initializer-v2-2.2.15.jar b/target/dependency/swagger-jaxrs2-servlet-initializer-v2-2.2.15.jar
new file mode 100644
index 00000000..e8d81b36
Binary files /dev/null and b/target/dependency/swagger-jaxrs2-servlet-initializer-v2-2.2.15.jar differ
diff --git a/target/dependency/swagger-models-jakarta-2.2.15.jar b/target/dependency/swagger-models-jakarta-2.2.15.jar
new file mode 100644
index 00000000..35bf10a1
Binary files /dev/null and b/target/dependency/swagger-models-jakarta-2.2.15.jar differ
diff --git a/target/dependency/txw2-4.0.2.jar b/target/dependency/txw2-4.0.2.jar
new file mode 100644
index 00000000..a16699f8
Binary files /dev/null and b/target/dependency/txw2-4.0.2.jar differ
diff --git a/target/dependency/undertow-core-2.3.5.Final.jar b/target/dependency/undertow-core-2.3.5.Final.jar
new file mode 100644
index 00000000..819c122d
Binary files /dev/null and b/target/dependency/undertow-core-2.3.5.Final.jar differ
diff --git a/target/dependency/undertow-servlet-2.3.5.Final.jar b/target/dependency/undertow-servlet-2.3.5.Final.jar
new file mode 100644
index 00000000..7125d9aa
Binary files /dev/null and b/target/dependency/undertow-servlet-2.3.5.Final.jar differ
diff --git a/target/dependency/wildfly-client-config-1.0.1.Final.jar b/target/dependency/wildfly-client-config-1.0.1.Final.jar
new file mode 100644
index 00000000..370e8c7f
Binary files /dev/null and b/target/dependency/wildfly-client-config-1.0.1.Final.jar differ
diff --git a/target/dependency/wildfly-common-1.5.4.Final.jar b/target/dependency/wildfly-common-1.5.4.Final.jar
new file mode 100644
index 00000000..a5b5892e
Binary files /dev/null and b/target/dependency/wildfly-common-1.5.4.Final.jar differ
diff --git a/target/dependency/xnio-api-3.8.8.Final.jar b/target/dependency/xnio-api-3.8.8.Final.jar
new file mode 100644
index 00000000..201a0e62
Binary files /dev/null and b/target/dependency/xnio-api-3.8.8.Final.jar differ
diff --git a/target/dependency/xnio-nio-3.8.8.Final.jar b/target/dependency/xnio-nio-3.8.8.Final.jar
new file mode 100644
index 00000000..432c494d
Binary files /dev/null and b/target/dependency/xnio-nio-3.8.8.Final.jar differ
diff --git a/target/dependency/xsom-4.0.2.jar b/target/dependency/xsom-4.0.2.jar
new file mode 100644
index 00000000..9f0b22e6
Binary files /dev/null and b/target/dependency/xsom-4.0.2.jar differ