You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
179 lines
5.7 KiB
179 lines
5.7 KiB
[retour au README.md](../../../README.md)
|
|
[Retour aux Documents](../../README_DOCUMENTS.md)
|
|
[Retour au diagramme de classes](../README_DIAGRAMMES.md)
|
|
|
|
# Diagramme de Classes : Gestions des données aux niveau de la base de données
|
|
|
|
```plantuml
|
|
@startuml
|
|
class ActiviteEntity {
|
|
- idActivite: int
|
|
- type: string
|
|
- date: string
|
|
- heureDebut: string
|
|
- heureFin: string
|
|
- effortRessenti: int
|
|
- variabilite: int
|
|
- variance: int
|
|
- ecartType: int
|
|
- moyenne: int
|
|
- maximum: int
|
|
- minimum: int
|
|
- temperatureMoyenne: int
|
|
+ getIdActivite(): int
|
|
+ getType(): string
|
|
+ getDate(): string
|
|
+ getHeureDebut(): string
|
|
+ getHeureFin(): string
|
|
+ getEffortRessenti(): int
|
|
+ getVariabilite(): int
|
|
+ getVariance(): int
|
|
+ getEcartType(): int
|
|
+ getMoyenne(): int
|
|
+ getMaximum(): int
|
|
+ getMinimum(): int
|
|
+ getTemperatureMoyenne(): int
|
|
+ setIdActivite(idActivite: int): void
|
|
+ setType(type: string): void
|
|
+ setDate(date: string): void
|
|
+ setHeureDebut(heureDebut: string): void
|
|
+ setHeureFin(heureFin: string): void
|
|
+ setEffortRessenti(effortRessenti: int): void
|
|
+ setVariabilite(variabilite: int): void
|
|
+ setVariance(variance: int): void
|
|
+ setEcartType(ecartType: int): void
|
|
+ setMoyenne(moyenne: int): void
|
|
+ setMaximum(maximum: int): void
|
|
+ setMinimum(minimum: int): void
|
|
+ setTemperatureMoyenne(temperatureMoyenne: int): void
|
|
}
|
|
class ActiviteGateway {
|
|
- connection: Connection
|
|
+ __construct(connection: Connection)
|
|
+ getActivite(): ?array
|
|
+ getActiviteById(activiteId: int): ?array
|
|
+ getActiviteByType(type: string): ?array
|
|
+ getActiviteByDate(date: string): ?array
|
|
+ getActiviteByTimeRange(startTime: string, endTime: string): ?array
|
|
+ getActiviteByEffort(effortRessenti: int): ?array
|
|
+ getActiviteByVariability(variabilite: int): ?array
|
|
+ getActiviteByTemperature(temperatureMoyenne: int): ?array
|
|
+ addActivite(activite: ActiviteEntity): bool
|
|
+ updateActivite(oldActivite: ActiviteEntity, newActivite: ActiviteEntity): bool
|
|
+ deleteActivite(idActivite: int): bool
|
|
}
|
|
class ActiviteMapper {
|
|
+ map(data: array): ActiviteEntity
|
|
+ ActiviteEntityToModel(activiteEntity: ActiviteEntity): Activite
|
|
}
|
|
class AthleteEntity {
|
|
- idAthlete: int
|
|
- nom: string
|
|
- prenom: string
|
|
- email: string
|
|
- sexe: string
|
|
- taille: float
|
|
- poids: float
|
|
- motDePasse: string
|
|
- dateNaissance: string
|
|
+ getIdAthlete(): int
|
|
+ getNom(): string
|
|
+ getPrenom(): string
|
|
+ getEmail(): string
|
|
+ getSexe(): string
|
|
+ getTaille(): float
|
|
+ getPoids(): float
|
|
+ getMotDePasse(): string
|
|
+ getDateNaissance(): string
|
|
+ setIdAthlete(idAthlete: int): void
|
|
+ setNom(nom: string): void
|
|
+ setPrenom(prenom: string): void
|
|
+ setEmail(email: string): void
|
|
+ setSexe(sexe: string): void
|
|
+ setTaille(taille: float): void
|
|
+ setPoids(poids: float): void
|
|
+ setMotDePasse(motDePasse: string): void
|
|
+ setDateNaissance(dateNaissance: string): void
|
|
}
|
|
class AtheletGateway {
|
|
- connection: Connection
|
|
+ __construct(connection: Connection)
|
|
+ getAthlete(): ?array
|
|
+ getAthleteById(userId: int): ?array
|
|
+ getAthleteByName(name: string): ?array
|
|
+ getAthleteByFirstName(firstName: string): ?array
|
|
+ getAthleteByEmail(email: string): ?array
|
|
+ getAthleteByGender(gender: string): ?array
|
|
+ getAthleteByHeight(height: int): ?array
|
|
+ getAthleteByWeight(weight: int): ?array
|
|
+ getAthleteByBirthDate(birthdate: string): ?array
|
|
+ addAthlete(athlete: AthleteEntity): bool
|
|
+ updateAthlete(oldAthlete: AthleteEntity, newAthlete: AthleteEntity): bool
|
|
+ deleteAthlete(idAthlete: int): bool
|
|
}
|
|
class AthleteMapper {
|
|
+ fromSqlToEntity(data: array): array
|
|
+ athleteEntityToModel(athleteEntity: AthleteEntity): User
|
|
+ athleteToEntity(user: User): AthleteEntity
|
|
}
|
|
class CoachEntity {
|
|
- idCoach: int
|
|
- nom: string
|
|
- prenom: string
|
|
- email: string
|
|
- sexe: string
|
|
- taille: float
|
|
- poids: float
|
|
- motDePasse: string
|
|
- dateNaissance: string
|
|
+ getIdCoach(): int
|
|
+ getNom(): string
|
|
+ getPrenom(): string
|
|
+ getEmail(): string
|
|
+ getSexe(): string
|
|
+ getTaille(): float
|
|
+ getPoids(): float
|
|
+ getMotDePasse(): string
|
|
+ getDateNaissance(): string
|
|
+ setIdCoach(idCoach: int): void
|
|
+ setNom(nom: string): void
|
|
+ setPrenom(prenom: string): void
|
|
+ setEmail(email: string): void
|
|
+ setSexe(sexe: string): void
|
|
+ setTaille(taille: float): void
|
|
+ setPoids(poids: float): void
|
|
+ setMotDePasse(motDePasse: string): void
|
|
+ setDateNaissance(dateNaissance: string): void
|
|
}
|
|
class CoachGateway {
|
|
- connection: Connection
|
|
+ __construct(connection: Connection)
|
|
+ getCoach(): ?array
|
|
+ getCoachById(userId: int): ?array
|
|
+ getCoachByName(name: string): ?array
|
|
+ getCoachByFirstName(firstName: string): ?array
|
|
+ getCoachByEmail(email: string): ?array
|
|
+ getCoachByGender(gender : string): ?array
|
|
+ getCoachByHeight(height: int): ?array
|
|
+ getCoachByBirthDate(birthdate: string): ?array
|
|
+ addCoach(coach: CoachEntity): bool
|
|
+ updateCoach(oldCoach: CoachEntity, newCoach: CoachEntity): bool
|
|
+ deleteCoach(idCoach: int): bool
|
|
}
|
|
class CoachMapper {
|
|
+ map(data: array): CoachEntity
|
|
+ CoachEntityToModel(coachEntity: CoachEntity): User
|
|
+ CoachToEntity(user: User): CoachEntity
|
|
}
|
|
class Connection extends PDO {
|
|
- stmt
|
|
+ __construct(dsn: string, username: string, password: string)
|
|
+ executeQuery(query: string, parameters: array): bool
|
|
+ executeWithErrorHandling(query: string, params: array): array
|
|
+ getResults(): array
|
|
}
|
|
|
|
Connection *-- "1" ActiviteGateway
|
|
Connection *-- "1" AtheletGateway
|
|
Connection *-- "1" CoachGateway
|