Class Ticket
java.lang.Object
domain.Ticket
Represents a support ticket in the system |
Représente un ticket de support dans le système.
- Author:
- FIGUEIRAS Jossua
-
Constructor Summary
ConstructorsConstructorDescriptionTicket(int id, Machine m, Admin creator, Technician technician, String title, String description, String status, LocalDateTime open_at, LocalDateTime closed_at) Creates a Ticket instance with explicit values | Crée une instance Ticket à partir de valeurs explicites.Creates a Ticket instance from a SQL result set | Crée une instance Ticket à partir d'un résultat SQL. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the ticket and sets the closing timestamp | Ferme le ticket et définit la date de fermeture.voidCreates this ticket in the database | Crée ce ticket dans la base de données.intgetId()getTitle()voidSets the status of the ticket if valid | Définit le statut du ticket si valide.voidUpdates this ticket in the database | Met à jour ce ticket dans la base de données.
-
Constructor Details
-
Ticket
public Ticket(int id, Machine m, Admin creator, Technician technician, String title, String description, String status, LocalDateTime open_at, LocalDateTime closed_at) Creates a Ticket instance with explicit values | Crée une instance Ticket à partir de valeurs explicites.- Parameters:
id- the unique identifier of the ticket | l'identifiant unique du ticketm- the machine associated with the ticket | la machine associée au ticketcreator- the admin who created the ticket | l'admin ayant créé le tickettechnician- the technician assigned to the ticket | le technicien assigné au tickettitle- the title of the ticket | le titre du ticketdescription- the detailed description of the issue | la description détaillée du problèmestatus- the current status of the ticket ("open", "in_progress", "closed") | le statut actuel du ticket ("open", "in_progress", "closed")open_at- the date and time the ticket was opened | la date et l'heure d'ouverture du ticketclosed_at- the date and time the ticket was closed | la date et l'heure de fermeture du ticket
-
Ticket
Creates a Ticket instance from a SQL result set | Crée une instance Ticket à partir d'un résultat SQL.- Parameters:
result- the SQL result set containing ticket data | le résultat SQL contenant les données du ticket
-
-
Method Details
-
createTicket
public void createTicket()Creates this ticket in the database | Crée ce ticket dans la base de données. -
SetStatus
Sets the status of the ticket if valid | Définit le statut du ticket si valide.- Parameters:
newStatus- the new status ("open", "in_progress", "closed") | le nouveau statut ("open", "in_progress", "closed")
-
close
public void close()Closes the ticket and sets the closing timestamp | Ferme le ticket et définit la date de fermeture. -
getId
public int getId() -
getMachine
-
getCreator
-
getTechnician
-
getTitle
-
getDescription
-
getStatus
-
getOpen_at
-
getClosed_at
-
updateInDb
public void updateInDb()Updates this ticket in the database | Met à jour ce ticket dans la base de données.
-